diff --git a/generation_config.yaml b/generation_config.yaml index 6651ac99fab..9fab2b12e92 100644 --- a/generation_config.yaml +++ b/generation_config.yaml @@ -1,5 +1,5 @@ gapic_generator_version: 2.58.0 -googleapis_commitish: bbeb0530ac9d8a61d8156f0d4e111909fc2827aa +googleapis_commitish: 5e49af896d45b0a0aa06de04354db58c05c79aca libraries_bom_version: 26.61.0 libraries: - api_shortname: spanner diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java index e0c10822cb6..c085e0a6e6c 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/package-info.java @@ -15,7 +15,7 @@ */ /** - * A client to Cloud Spanner Instance Admin API + * A client to Cloud Spanner API * *
The interfaces provided are listed below, along with usage samples. * diff --git a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java index 55a10bc2436..5af29072b57 100644 --- a/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java +++ b/google-cloud-spanner/src/main/java/com/google/cloud/spanner/admin/instance/v1/stub/HttpJsonInstanceAdminStub.java @@ -1053,6 +1053,26 @@ protected HttpJsonInstanceAdminStub( HttpRule.newBuilder() .setPost("/v1/{name=projects/*/instances/*/operations/*}:cancel") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instances/*/backups/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instances/*/instancePartitions/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instanceConfigs/*/operations/*}:cancel") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setPost( + "/v1/{name=projects/*/instanceConfigs/*/ssdCaches/*/operations/*}:cancel") + .build()) .build()) .put( "google.longrunning.Operations.DeleteOperation", @@ -1062,6 +1082,25 @@ protected HttpJsonInstanceAdminStub( HttpRule.newBuilder() .setDelete("/v1/{name=projects/*/instances/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/instances/*/backups/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/instances/*/instancePartitions/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete("/v1/{name=projects/*/instanceConfigs/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setDelete( + "/v1/{name=projects/*/instanceConfigs/*/ssdCaches/*/operations/*}") + .build()) .build()) .put( "google.longrunning.Operations.GetOperation", @@ -1071,6 +1110,24 @@ protected HttpJsonInstanceAdminStub( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/instances/*/operations/*}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/backups/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/instances/*/instancePartitions/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instanceConfigs/*/operations/*}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/instanceConfigs/*/ssdCaches/*/operations/*}") + .build()) .build()) .put( "google.longrunning.Operations.ListOperations", @@ -1080,6 +1137,24 @@ protected HttpJsonInstanceAdminStub( HttpRule.newBuilder() .setGet("/v1/{name=projects/*/instances/*/operations}") .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instances/*/backups/*/operations}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/instances/*/instancePartitions/*/operations}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet("/v1/{name=projects/*/instanceConfigs/*/operations}") + .build()) + .addAdditionalBindings( + HttpRule.newBuilder() + .setGet( + "/v1/{name=projects/*/instanceConfigs/*/ssdCaches/*/operations}") + .build()) .build()) .build()); diff --git a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json index 20a93919949..90fb979315e 100644 --- a/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json +++ b/google-cloud-spanner/src/main/resources/META-INF/native-image/com.google.cloud.spanner.v1/reflect-config.json @@ -1403,6 +1403,222 @@ "allDeclaredClasses": true, "allPublicClasses": true }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ColumnMetadata", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ColumnMetadata$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$Mod", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$Mod$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ModType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ModValue", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ModValue$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$DataChangeRecord$ValueCaptureType", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$HeartbeatRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$HeartbeatRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEndRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEndRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord$MoveInEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord$MoveInEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord$MoveOutEvent", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionEventRecord$MoveOutEvent$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionStartRecord", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, + { + "name": "com.google.spanner.v1.ChangeStreamRecord$PartitionStartRecord$Builder", + "queryAllDeclaredConstructors": true, + "queryAllPublicConstructors": true, + "queryAllDeclaredMethods": true, + "allPublicMethods": true, + "allDeclaredClasses": true, + "allPublicClasses": true + }, { "name": "com.google.spanner.v1.CommitRequest", "queryAllDeclaredConstructors": true, diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java new file mode 100644 index 00000000000..773b0f4b977 --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamProto.java @@ -0,0 +1,292 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/change_stream.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.v1; + +public final class ChangeStreamProto { + private ChangeStreamProto() {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistryLite registry) {} + + public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry registry) { + registerAllExtensions((com.google.protobuf.ExtensionRegistryLite) registry); + } + + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable; + + public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + return descriptor; + } + + private static com.google.protobuf.Descriptors.FileDescriptor descriptor; + + static { + java.lang.String[] descriptorData = { + "\n%google/spanner/v1/change_stream.proto\022" + + "\021google.spanner.v1\032\034google/protobuf/stru" + + "ct.proto\032\037google/protobuf/timestamp.prot" + + "o\032\034google/spanner/v1/type.proto\"\226\024\n\022Chan" + + "geStreamRecord\022T\n\022data_change_record\030\001 \001" + + "(\01326.google.spanner.v1.ChangeStreamRecor" + + "d.DataChangeRecordH\000\022Q\n\020heartbeat_record" + + "\030\002 \001(\01325.google.spanner.v1.ChangeStreamR" + + "ecord.HeartbeatRecordH\000\022\\\n\026partition_sta" + + "rt_record\030\003 \001(\0132:.google.spanner.v1.Chan" + + "geStreamRecord.PartitionStartRecordH\000\022X\n" + + "\024partition_end_record\030\004 \001(\01328.google.spa" + + "nner.v1.ChangeStreamRecord.PartitionEndR" + + "ecordH\000\022\\\n\026partition_event_record\030\005 \001(\0132" + + ":.google.spanner.v1.ChangeStreamRecord.P" + + "artitionEventRecordH\000\032\322\n\n\020DataChangeReco" + + "rd\0224\n\020commit_timestamp\030\001 \001(\0132\032.google.pr" + + "otobuf.Timestamp\022\027\n\017record_sequence\030\002 \001(" + + "\t\022\035\n\025server_transaction_id\030\003 \001(\t\0222\n*is_l" + + "ast_record_in_transaction_in_partition\030\004" + + " \001(\010\022\r\n\005table\030\005 \001(\t\022^\n\017column_metadata\030\006" + + " \003(\0132E.google.spanner.v1.ChangeStreamRec" + + "ord.DataChangeRecord.ColumnMetadata\022H\n\004m" + + "ods\030\007 \003(\0132:.google.spanner.v1.ChangeStre" + + "amRecord.DataChangeRecord.Mod\022P\n\010mod_typ" + + "e\030\010 \001(\0162>.google.spanner.v1.ChangeStream" + + "Record.DataChangeRecord.ModType\022c\n\022value" + + "_capture_type\030\t \001(\0162G.google.spanner.v1." + + "ChangeStreamRecord.DataChangeRecord.Valu" + + "eCaptureType\022(\n number_of_records_in_tra" + + "nsaction\030\n \001(\005\022+\n#number_of_partitions_i" + + "n_transaction\030\013 \001(\005\022\027\n\017transaction_tag\030\014" + + " \001(\t\022\035\n\025is_system_transaction\030\r \001(\010\032w\n\016C" + + "olumnMetadata\022\014\n\004name\030\001 \001(\t\022%\n\004type\030\002 \001(" + + "\0132\027.google.spanner.v1.Type\022\026\n\016is_primary" + + "_key\030\003 \001(\010\022\030\n\020ordinal_position\030\004 \001(\003\032P\n\010" + + "ModValue\022\035\n\025column_metadata_index\030\001 \001(\005\022" + + "%\n\005value\030\002 \001(\0132\026.google.protobuf.Value\032\376" + + "\001\n\003Mod\022M\n\004keys\030\001 \003(\0132?.google.spanner.v1" + + ".ChangeStreamRecord.DataChangeRecord.Mod" + + "Value\022S\n\nold_values\030\002 \003(\0132?.google.spann" + + "er.v1.ChangeStreamRecord.DataChangeRecor" + + "d.ModValue\022S\n\nnew_values\030\003 \003(\0132?.google." + + "spanner.v1.ChangeStreamRecord.DataChange" + + "Record.ModValue\"G\n\007ModType\022\030\n\024MOD_TYPE_U" + + "NSPECIFIED\020\000\022\n\n\006INSERT\020\n\022\n\n\006UPDATE\020\024\022\n\n\006" + + "DELETE\020\036\"\207\001\n\020ValueCaptureType\022\"\n\036VALUE_C" + + "APTURE_TYPE_UNSPECIFIED\020\000\022\026\n\022OLD_AND_NEW" + + "_VALUES\020\n\022\016\n\nNEW_VALUES\020\024\022\013\n\007NEW_ROW\020\036\022\032" + + "\n\026NEW_ROW_AND_OLD_VALUES\020(\032@\n\017HeartbeatR" + + "ecord\022-\n\ttimestamp\030\001 \001(\0132\032.google.protob" + + "uf.Timestamp\032~\n\024PartitionStartRecord\0223\n\017" + + "start_timestamp\030\001 \001(\0132\032.google.protobuf." + + "Timestamp\022\027\n\017record_sequence\030\002 \001(\t\022\030\n\020pa" + + "rtition_tokens\030\003 \003(\t\032y\n\022PartitionEndReco" + + "rd\0221\n\rend_timestamp\030\001 \001(\0132\032.google.proto" + + "buf.Timestamp\022\027\n\017record_sequence\030\002 \001(\t\022\027" + + "\n\017partition_token\030\003 \001(\t\032\244\003\n\024PartitionEve" + + "ntRecord\0224\n\020commit_timestamp\030\001 \001(\0132\032.goo" + + "gle.protobuf.Timestamp\022\027\n\017record_sequenc" + + "e\030\002 \001(\t\022\027\n\017partition_token\030\003 \001(\t\022^\n\016move" + + "_in_events\030\004 \003(\0132F.google.spanner.v1.Cha" + + "ngeStreamRecord.PartitionEventRecord.Mov" + + "eInEvent\022`\n\017move_out_events\030\005 \003(\0132G.goog" + + "le.spanner.v1.ChangeStreamRecord.Partiti" + + "onEventRecord.MoveOutEvent\032-\n\013MoveInEven" + + "t\022\036\n\026source_partition_token\030\001 \001(\t\0323\n\014Mov" + + "eOutEvent\022#\n\033destination_partition_token" + + "\030\001 \001(\tB\010\n\006recordB\264\001\n\025com.google.spanner." + + "v1B\021ChangeStreamProtoP\001Z5cloud.google.co" + + "m/go/spanner/apiv1/spannerpb;spannerpb\252\002" + + "\027Google.Cloud.Spanner.V1\312\002\027Google\\Cloud\\" + + "Spanner\\V1\352\002\032Google::Cloud::Spanner::V1b" + + "\006proto3" + }; + descriptor = + com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( + descriptorData, + new com.google.protobuf.Descriptors.FileDescriptor[] { + com.google.protobuf.StructProto.getDescriptor(), + com.google.protobuf.TimestampProto.getDescriptor(), + com.google.spanner.v1.TypeProto.getDescriptor(), + }); + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor = + getDescriptor().getMessageTypes().get(0); + internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor, + new java.lang.String[] { + "DataChangeRecord", + "HeartbeatRecord", + "PartitionStartRecord", + "PartitionEndRecord", + "PartitionEventRecord", + "Record", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(0); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor, + new java.lang.String[] { + "CommitTimestamp", + "RecordSequence", + "ServerTransactionId", + "IsLastRecordInTransactionInPartition", + "Table", + "ColumnMetadata", + "Mods", + "ModType", + "ValueCaptureType", + "NumberOfRecordsInTransaction", + "NumberOfPartitionsInTransaction", + "TransactionTag", + "IsSystemTransaction", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor, + new java.lang.String[] { + "Name", "Type", "IsPrimaryKey", "OrdinalPosition", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor + .getNestedTypes() + .get(1); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor, + new java.lang.String[] { + "ColumnMetadataIndex", "Value", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor + .getNestedTypes() + .get(2); + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor, + new java.lang.String[] { + "Keys", "OldValues", "NewValues", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(1); + internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor, + new java.lang.String[] { + "Timestamp", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(2); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor, + new java.lang.String[] { + "StartTimestamp", "RecordSequence", "PartitionTokens", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(3); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor, + new java.lang.String[] { + "EndTimestamp", "RecordSequence", "PartitionToken", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_descriptor.getNestedTypes().get(4); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor, + new java.lang.String[] { + "CommitTimestamp", + "RecordSequence", + "PartitionToken", + "MoveInEvents", + "MoveOutEvents", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor + .getNestedTypes() + .get(0); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor, + new java.lang.String[] { + "SourcePartitionToken", + }); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor = + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor + .getNestedTypes() + .get(1); + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor, + new java.lang.String[] { + "DestinationPartitionToken", + }); + com.google.protobuf.StructProto.getDescriptor(); + com.google.protobuf.TimestampProto.getDescriptor(); + com.google.spanner.v1.TypeProto.getDescriptor(); + } + + // @@protoc_insertion_point(outer_class_scope) +} diff --git a/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java new file mode 100644 index 00000000000..eaab3001b8f --- /dev/null +++ b/proto-google-cloud-spanner-v1/src/main/java/com/google/spanner/v1/ChangeStreamRecord.java @@ -0,0 +1,21325 @@ +/* + * Copyright 2025 Google LLC + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * https://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +// Generated by the protocol buffer compiler. DO NOT EDIT! +// source: google/spanner/v1/change_stream.proto + +// Protobuf Java Version: 3.25.5 +package com.google.spanner.v1; + +/** + * + * + *
+ * Spanner Change Streams enable customers to capture and stream out changes to + * their Spanner databases in real-time. A change stream + * can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or + * partition_mode='MUTABLE_KEY_RANGE'. + * + * This message is only used in Change Streams created with the option + * partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special + * Table-Valued Function (TVF) along with each Change Streams. The function + * provides access to the change stream's records. The function is named + * READ_<change_stream_name> (where <change_stream_name> is the + * name of the change stream), and it returns a table with only one column + * called ChangeRecord. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord} + */ +public final class ChangeStreamRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord) + ChangeStreamRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ChangeStreamRecord.newBuilder() to construct. + private ChangeStreamRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ChangeStreamRecord() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ChangeStreamRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.class, + com.google.spanner.v1.ChangeStreamRecord.Builder.class); + } + + public interface DataChangeRecordOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.ChangeStreamRecord.DataChangeRecord) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ boolean hasCommitTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ com.google.protobuf.Timestamp getCommitTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ java.lang.String getRecordSequence();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ com.google.protobuf.ByteString getRecordSequenceBytes();
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The serverTransactionId.
+ */
+ java.lang.String getServerTransactionId();
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The bytes for serverTransactionId.
+ */
+ com.google.protobuf.ByteString getServerTransactionIdBytes();
+
+ /**
+ *
+ *
+ * + * Indicates whether this is the last record for a transaction in the + * current partition. Clients can use this field to determine when all + * records for a transaction in the current partition have been received. + *+ * + *
bool is_last_record_in_transaction_in_partition = 4;
+ *
+ * @return The isLastRecordInTransactionInPartition.
+ */
+ boolean getIsLastRecordInTransactionInPartition();
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The table.
+ */
+ java.lang.String getTable();
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The bytes for table.
+ */
+ com.google.protobuf.ByteString getTableBytes();
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ java.util.List+ * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata getColumnMetadata(
+ int index);
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ int getColumnMetadataCount();
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder>
+ getColumnMetadataOrBuilderList();
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder
+ getColumnMetadataOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ java.util.List+ * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod getMods(int index);
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ int getModsCount();
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ java.util.List extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder>
+ getModsOrBuilderList();
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder getModsOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The enum numeric value on the wire for modType.
+ */
+ int getModTypeValue();
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The modType.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType getModType();
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The enum numeric value on the wire for valueCaptureType.
+ */
+ int getValueCaptureTypeValue();
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The valueCaptureType.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ getValueCaptureType();
+
+ /**
+ *
+ *
+ * + * Indicates the number of data change records that are part of this + * transaction across all change stream partitions. This value can be used + * to assemble all the records associated with a particular transaction. + *+ * + *
int32 number_of_records_in_transaction = 10;
+ *
+ * @return The numberOfRecordsInTransaction.
+ */
+ int getNumberOfRecordsInTransaction();
+
+ /**
+ *
+ *
+ * + * Indicates the number of partitions that return data change records for + * this transaction. This value can be helpful in assembling all records + * associated with a particular transaction. + *+ * + *
int32 number_of_partitions_in_transaction = 11;
+ *
+ * @return The numberOfPartitionsInTransaction.
+ */
+ int getNumberOfPartitionsInTransaction();
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The transactionTag.
+ */
+ java.lang.String getTransactionTag();
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The bytes for transactionTag.
+ */
+ com.google.protobuf.ByteString getTransactionTagBytes();
+
+ /**
+ *
+ *
+ * + * Indicates whether the transaction is a system transaction. System + * transactions include those issued by time-to-live (TTL), column backfill, + * etc. + *+ * + *
bool is_system_transaction = 13;
+ *
+ * @return The isSystemTransaction.
+ */
+ boolean getIsSystemTransaction();
+ }
+
+ /**
+ *
+ *
+ * + * A data change record contains a set of changes to a table with the same + * modification type (insert, update, or delete) committed at the same commit + * timestamp in one change stream partition for the same transaction. Multiple + * data change records can be returned for the same transaction across + * multiple change stream partitions. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord} + */ + public static final class DataChangeRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord) + DataChangeRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use DataChangeRecord.newBuilder() to construct. + private DataChangeRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private DataChangeRecord() { + recordSequence_ = ""; + serverTransactionId_ = ""; + table_ = ""; + columnMetadata_ = java.util.Collections.emptyList(); + mods_ = java.util.Collections.emptyList(); + modType_ = 0; + valueCaptureType_ = 0; + transactionTag_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new DataChangeRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.class, + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder.class); + } + + /** + * + * + *
+ * Mod type describes the type of change Spanner applied to the data. For + * example, if the client submits an INSERT_OR_UPDATE request, Spanner will + * perform an insert if there is no existing row and return ModType INSERT. + * Alternatively, if there is an existing row, Spanner will perform an + * update and return ModType UPDATE. + *+ * + * Protobuf enum {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType} + */ + public enum ModType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Not specified. + *+ * + *
MOD_TYPE_UNSPECIFIED = 0;
+ */
+ MOD_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Indicates data was inserted. + *+ * + *
INSERT = 10;
+ */
+ INSERT(10),
+ /**
+ *
+ *
+ * + * Indicates existing data was updated. + *+ * + *
UPDATE = 20;
+ */
+ UPDATE(20),
+ /**
+ *
+ *
+ * + * Indicates existing data was deleted. + *+ * + *
DELETE = 30;
+ */
+ DELETE(30),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Not specified. + *+ * + *
MOD_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int MOD_TYPE_UNSPECIFIED_VALUE = 0;
+
+ /**
+ *
+ *
+ * + * Indicates data was inserted. + *+ * + *
INSERT = 10;
+ */
+ public static final int INSERT_VALUE = 10;
+
+ /**
+ *
+ *
+ * + * Indicates existing data was updated. + *+ * + *
UPDATE = 20;
+ */
+ public static final int UPDATE_VALUE = 20;
+
+ /**
+ *
+ *
+ * + * Indicates existing data was deleted. + *+ * + *
DELETE = 30;
+ */
+ public static final int DELETE_VALUE = 30;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ModType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ModType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return MOD_TYPE_UNSPECIFIED;
+ case 10:
+ return INSERT;
+ case 20:
+ return UPDATE;
+ case 30:
+ return DELETE;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Value capture type describes which values are recorded in the data + * change record. + *+ * + * Protobuf enum {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType} + */ + public enum ValueCaptureType implements com.google.protobuf.ProtocolMessageEnum { + /** + * + * + *
+ * Not specified. + *+ * + *
VALUE_CAPTURE_TYPE_UNSPECIFIED = 0;
+ */
+ VALUE_CAPTURE_TYPE_UNSPECIFIED(0),
+ /**
+ *
+ *
+ * + * Records both old and new values of the modified watched columns. + *+ * + *
OLD_AND_NEW_VALUES = 10;
+ */
+ OLD_AND_NEW_VALUES(10),
+ /**
+ *
+ *
+ * + * Records only new values of the modified watched columns. + *+ * + *
NEW_VALUES = 20;
+ */
+ NEW_VALUES(20),
+ /**
+ *
+ *
+ * + * Records new values of all watched columns, including modified and + * unmodified columns. + *+ * + *
NEW_ROW = 30;
+ */
+ NEW_ROW(30),
+ /**
+ *
+ *
+ * + * Records the new values of all watched columns, including modified and + * unmodified columns. Also records the old values of the modified + * columns. + *+ * + *
NEW_ROW_AND_OLD_VALUES = 40;
+ */
+ NEW_ROW_AND_OLD_VALUES(40),
+ UNRECOGNIZED(-1),
+ ;
+
+ /**
+ *
+ *
+ * + * Not specified. + *+ * + *
VALUE_CAPTURE_TYPE_UNSPECIFIED = 0;
+ */
+ public static final int VALUE_CAPTURE_TYPE_UNSPECIFIED_VALUE = 0;
+
+ /**
+ *
+ *
+ * + * Records both old and new values of the modified watched columns. + *+ * + *
OLD_AND_NEW_VALUES = 10;
+ */
+ public static final int OLD_AND_NEW_VALUES_VALUE = 10;
+
+ /**
+ *
+ *
+ * + * Records only new values of the modified watched columns. + *+ * + *
NEW_VALUES = 20;
+ */
+ public static final int NEW_VALUES_VALUE = 20;
+
+ /**
+ *
+ *
+ * + * Records new values of all watched columns, including modified and + * unmodified columns. + *+ * + *
NEW_ROW = 30;
+ */
+ public static final int NEW_ROW_VALUE = 30;
+
+ /**
+ *
+ *
+ * + * Records the new values of all watched columns, including modified and + * unmodified columns. Also records the old values of the modified + * columns. + *+ * + *
NEW_ROW_AND_OLD_VALUES = 40;
+ */
+ public static final int NEW_ROW_AND_OLD_VALUES_VALUE = 40;
+
+ public final int getNumber() {
+ if (this == UNRECOGNIZED) {
+ throw new java.lang.IllegalArgumentException(
+ "Can't get the number of an unknown enum value.");
+ }
+ return value;
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ * @deprecated Use {@link #forNumber(int)} instead.
+ */
+ @java.lang.Deprecated
+ public static ValueCaptureType valueOf(int value) {
+ return forNumber(value);
+ }
+
+ /**
+ * @param value The numeric wire value of the corresponding enum entry.
+ * @return The enum associated with the given numeric wire value.
+ */
+ public static ValueCaptureType forNumber(int value) {
+ switch (value) {
+ case 0:
+ return VALUE_CAPTURE_TYPE_UNSPECIFIED;
+ case 10:
+ return OLD_AND_NEW_VALUES;
+ case 20:
+ return NEW_VALUES;
+ case 30:
+ return NEW_ROW;
+ case 40:
+ return NEW_ROW_AND_OLD_VALUES;
+ default:
+ return null;
+ }
+ }
+
+ public static com.google.protobuf.Internal.EnumLiteMap+ * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ java.lang.String getName();
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ com.google.protobuf.ByteString getNameBytes();
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return Whether the type field is set.
+ */
+ boolean hasType();
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return The type.
+ */
+ com.google.spanner.v1.Type getType();
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder();
+
+ /**
+ *
+ *
+ * + * Indicates whether the column is a primary key column. + *+ * + *
bool is_primary_key = 3;
+ *
+ * @return The isPrimaryKey.
+ */
+ boolean getIsPrimaryKey();
+
+ /**
+ *
+ *
+ * + * Ordinal position of the column based on the original table definition + * in the schema starting with a value of 1. + *+ * + *
int64 ordinal_position = 4;
+ *
+ * @return The ordinalPosition.
+ */
+ long getOrdinalPosition();
+ }
+
+ /**
+ *
+ *
+ * + * Metadata for a column. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} + */ + public static final class ColumnMetadata extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata) + ColumnMetadataOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ColumnMetadata.newBuilder() to construct. + private ColumnMetadata(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ColumnMetadata() { + name_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ColumnMetadata(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ColumnMetadata_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.class, + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder + .class); + } + + private int bitField0_; + public static final int NAME_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object name_ = ""; + + /** + * + * + *
+ * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ @java.lang.Override
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int TYPE_FIELD_NUMBER = 2;
+ private com.google.spanner.v1.Type type_;
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return Whether the type field is set.
+ */
+ @java.lang.Override
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return The type.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.Type getType() {
+ return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_;
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() {
+ return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_;
+ }
+
+ public static final int IS_PRIMARY_KEY_FIELD_NUMBER = 3;
+ private boolean isPrimaryKey_ = false;
+
+ /**
+ *
+ *
+ * + * Indicates whether the column is a primary key column. + *+ * + *
bool is_primary_key = 3;
+ *
+ * @return The isPrimaryKey.
+ */
+ @java.lang.Override
+ public boolean getIsPrimaryKey() {
+ return isPrimaryKey_;
+ }
+
+ public static final int ORDINAL_POSITION_FIELD_NUMBER = 4;
+ private long ordinalPosition_ = 0L;
+
+ /**
+ *
+ *
+ * + * Ordinal position of the column based on the original table definition + * in the schema starting with a value of 1. + *+ * + *
int64 ordinal_position = 4;
+ *
+ * @return The ordinalPosition.
+ */
+ @java.lang.Override
+ public long getOrdinalPosition() {
+ return ordinalPosition_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(2, getType());
+ }
+ if (isPrimaryKey_ != false) {
+ output.writeBool(3, isPrimaryKey_);
+ }
+ if (ordinalPosition_ != 0L) {
+ output.writeInt64(4, ordinalPosition_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getType());
+ }
+ if (isPrimaryKey_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, isPrimaryKey_);
+ }
+ if (ordinalPosition_ != 0L) {
+ size += com.google.protobuf.CodedOutputStream.computeInt64Size(4, ordinalPosition_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata other =
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata) obj;
+
+ if (!getName().equals(other.getName())) return false;
+ if (hasType() != other.hasType()) return false;
+ if (hasType()) {
+ if (!getType().equals(other.getType())) return false;
+ }
+ if (getIsPrimaryKey() != other.getIsPrimaryKey()) return false;
+ if (getOrdinalPosition() != other.getOrdinalPosition()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + NAME_FIELD_NUMBER;
+ hash = (53 * hash) + getName().hashCode();
+ if (hasType()) {
+ hash = (37 * hash) + TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + getType().hashCode();
+ }
+ hash = (37 * hash) + IS_PRIMARY_KEY_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsPrimaryKey());
+ hash = (37 * hash) + ORDINAL_POSITION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getOrdinalPosition());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * Metadata for a column. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The name.
+ */
+ public java.lang.String getName() {
+ java.lang.Object ref = name_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ name_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return The bytes for name.
+ */
+ public com.google.protobuf.ByteString getNameBytes() {
+ java.lang.Object ref = name_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ name_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @param value The name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setName(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ name_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearName() {
+ name_ = getDefaultInstance().getName();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Name of the column. + *+ * + *
string name = 1;
+ *
+ * @param value The bytes for name to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNameBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ name_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ private com.google.spanner.v1.Type type_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.Type,
+ com.google.spanner.v1.Type.Builder,
+ com.google.spanner.v1.TypeOrBuilder>
+ typeBuilder_;
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return Whether the type field is set.
+ */
+ public boolean hasType() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ *
+ * @return The type.
+ */
+ public com.google.spanner.v1.Type getType() {
+ if (typeBuilder_ == null) {
+ return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_;
+ } else {
+ return typeBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public Builder setType(com.google.spanner.v1.Type value) {
+ if (typeBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ type_ = value;
+ } else {
+ typeBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public Builder setType(com.google.spanner.v1.Type.Builder builderForValue) {
+ if (typeBuilder_ == null) {
+ type_ = builderForValue.build();
+ } else {
+ typeBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public Builder mergeType(com.google.spanner.v1.Type value) {
+ if (typeBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && type_ != null
+ && type_ != com.google.spanner.v1.Type.getDefaultInstance()) {
+ getTypeBuilder().mergeFrom(value);
+ } else {
+ type_ = value;
+ }
+ } else {
+ typeBuilder_.mergeFrom(value);
+ }
+ if (type_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public Builder clearType() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ type_ = null;
+ if (typeBuilder_ != null) {
+ typeBuilder_.dispose();
+ typeBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public com.google.spanner.v1.Type.Builder getTypeBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getTypeFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ public com.google.spanner.v1.TypeOrBuilder getTypeOrBuilder() {
+ if (typeBuilder_ != null) {
+ return typeBuilder_.getMessageOrBuilder();
+ } else {
+ return type_ == null ? com.google.spanner.v1.Type.getDefaultInstance() : type_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Type of the column. + *+ * + *
.google.spanner.v1.Type type = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.Type,
+ com.google.spanner.v1.Type.Builder,
+ com.google.spanner.v1.TypeOrBuilder>
+ getTypeFieldBuilder() {
+ if (typeBuilder_ == null) {
+ typeBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.Type,
+ com.google.spanner.v1.Type.Builder,
+ com.google.spanner.v1.TypeOrBuilder>(
+ getType(), getParentForChildren(), isClean());
+ type_ = null;
+ }
+ return typeBuilder_;
+ }
+
+ private boolean isPrimaryKey_;
+
+ /**
+ *
+ *
+ * + * Indicates whether the column is a primary key column. + *+ * + *
bool is_primary_key = 3;
+ *
+ * @return The isPrimaryKey.
+ */
+ @java.lang.Override
+ public boolean getIsPrimaryKey() {
+ return isPrimaryKey_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether the column is a primary key column. + *+ * + *
bool is_primary_key = 3;
+ *
+ * @param value The isPrimaryKey to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIsPrimaryKey(boolean value) {
+
+ isPrimaryKey_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether the column is a primary key column. + *+ * + *
bool is_primary_key = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIsPrimaryKey() {
+ bitField0_ = (bitField0_ & ~0x00000004);
+ isPrimaryKey_ = false;
+ onChanged();
+ return this;
+ }
+
+ private long ordinalPosition_;
+
+ /**
+ *
+ *
+ * + * Ordinal position of the column based on the original table definition + * in the schema starting with a value of 1. + *+ * + *
int64 ordinal_position = 4;
+ *
+ * @return The ordinalPosition.
+ */
+ @java.lang.Override
+ public long getOrdinalPosition() {
+ return ordinalPosition_;
+ }
+
+ /**
+ *
+ *
+ * + * Ordinal position of the column based on the original table definition + * in the schema starting with a value of 1. + *+ * + *
int64 ordinal_position = 4;
+ *
+ * @param value The ordinalPosition to set.
+ * @return This builder for chaining.
+ */
+ public Builder setOrdinalPosition(long value) {
+
+ ordinalPosition_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Ordinal position of the column based on the original table definition + * in the schema starting with a value of 1. + *+ * + *
int64 ordinal_position = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearOrdinalPosition() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ ordinalPosition_ = 0L;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata)
+ private static final com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Index within the repeated + * [column_metadata][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.column_metadata] + * field, to obtain the column metadata for the column that was modified. + *+ * + *
int32 column_metadata_index = 1;
+ *
+ * @return The columnMetadataIndex.
+ */
+ int getColumnMetadataIndex();
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return Whether the value field is set.
+ */
+ boolean hasValue();
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return The value.
+ */
+ com.google.protobuf.Value getValue();
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ com.google.protobuf.ValueOrBuilder getValueOrBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value and associated metadata for a particular field of the + * [Mod][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod]. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} + */ + public static final class ModValue extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue) + ModValueOrBuilder { + private static final long serialVersionUID = 0L; + + // Use ModValue.newBuilder() to construct. + private ModValue(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private ModValue() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModValue(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_ModValue_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.class, + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder.class); + } + + private int bitField0_; + public static final int COLUMN_METADATA_INDEX_FIELD_NUMBER = 1; + private int columnMetadataIndex_ = 0; + + /** + * + * + *
+ * Index within the repeated + * [column_metadata][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.column_metadata] + * field, to obtain the column metadata for the column that was modified. + *+ * + *
int32 column_metadata_index = 1;
+ *
+ * @return The columnMetadataIndex.
+ */
+ @java.lang.Override
+ public int getColumnMetadataIndex() {
+ return columnMetadataIndex_;
+ }
+
+ public static final int VALUE_FIELD_NUMBER = 2;
+ private com.google.protobuf.Value value_;
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return Whether the value field is set.
+ */
+ @java.lang.Override
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return The value.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Value getValue() {
+ return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ @java.lang.Override
+ public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
+ return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (columnMetadataIndex_ != 0) {
+ output.writeInt32(1, columnMetadataIndex_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(2, getValue());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (columnMetadataIndex_ != 0) {
+ size += com.google.protobuf.CodedOutputStream.computeInt32Size(1, columnMetadataIndex_);
+ }
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getValue());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue other =
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue) obj;
+
+ if (getColumnMetadataIndex() != other.getColumnMetadataIndex()) return false;
+ if (hasValue() != other.hasValue()) return false;
+ if (hasValue()) {
+ if (!getValue().equals(other.getValue())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + COLUMN_METADATA_INDEX_FIELD_NUMBER;
+ hash = (53 * hash) + getColumnMetadataIndex();
+ if (hasValue()) {
+ hash = (37 * hash) + VALUE_FIELD_NUMBER;
+ hash = (53 * hash) + getValue().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value and associated metadata for a particular field of the + * [Mod][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod]. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Index within the repeated + * [column_metadata][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.column_metadata] + * field, to obtain the column metadata for the column that was modified. + *+ * + *
int32 column_metadata_index = 1;
+ *
+ * @return The columnMetadataIndex.
+ */
+ @java.lang.Override
+ public int getColumnMetadataIndex() {
+ return columnMetadataIndex_;
+ }
+
+ /**
+ *
+ *
+ * + * Index within the repeated + * [column_metadata][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.column_metadata] + * field, to obtain the column metadata for the column that was modified. + *+ * + *
int32 column_metadata_index = 1;
+ *
+ * @param value The columnMetadataIndex to set.
+ * @return This builder for chaining.
+ */
+ public Builder setColumnMetadataIndex(int value) {
+
+ columnMetadataIndex_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Index within the repeated + * [column_metadata][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.column_metadata] + * field, to obtain the column metadata for the column that was modified. + *+ * + *
int32 column_metadata_index = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearColumnMetadataIndex() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ columnMetadataIndex_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.Value value_;
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Value,
+ com.google.protobuf.Value.Builder,
+ com.google.protobuf.ValueOrBuilder>
+ valueBuilder_;
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return Whether the value field is set.
+ */
+ public boolean hasValue() {
+ return ((bitField0_ & 0x00000002) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ *
+ * @return The value.
+ */
+ public com.google.protobuf.Value getValue() {
+ if (valueBuilder_ == null) {
+ return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
+ } else {
+ return valueBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public Builder setValue(com.google.protobuf.Value value) {
+ if (valueBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ value_ = value;
+ } else {
+ valueBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public Builder setValue(com.google.protobuf.Value.Builder builderForValue) {
+ if (valueBuilder_ == null) {
+ value_ = builderForValue.build();
+ } else {
+ valueBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public Builder mergeValue(com.google.protobuf.Value value) {
+ if (valueBuilder_ == null) {
+ if (((bitField0_ & 0x00000002) != 0)
+ && value_ != null
+ && value_ != com.google.protobuf.Value.getDefaultInstance()) {
+ getValueBuilder().mergeFrom(value);
+ } else {
+ value_ = value;
+ }
+ } else {
+ valueBuilder_.mergeFrom(value);
+ }
+ if (value_ != null) {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public Builder clearValue() {
+ bitField0_ = (bitField0_ & ~0x00000002);
+ value_ = null;
+ if (valueBuilder_ != null) {
+ valueBuilder_.dispose();
+ valueBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public com.google.protobuf.Value.Builder getValueBuilder() {
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return getValueFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ public com.google.protobuf.ValueOrBuilder getValueOrBuilder() {
+ if (valueBuilder_ != null) {
+ return valueBuilder_.getMessageOrBuilder();
+ } else {
+ return value_ == null ? com.google.protobuf.Value.getDefaultInstance() : value_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * The value of the column. + *+ * + *
.google.protobuf.Value value = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Value,
+ com.google.protobuf.Value.Builder,
+ com.google.protobuf.ValueOrBuilder>
+ getValueFieldBuilder() {
+ if (valueBuilder_ == null) {
+ valueBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Value,
+ com.google.protobuf.Value.Builder,
+ com.google.protobuf.ValueOrBuilder>(
+ getValue(), getParentForChildren(), isClean());
+ value_ = null;
+ }
+ return valueBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue)
+ private static final com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ java.util.List+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getKeys(int index);
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ int getKeysCount();
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getKeysOrBuilderList();
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder getKeysOrBuilder(
+ int index);
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ java.util.List+ * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getOldValues(int index);
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ int getOldValuesCount();
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getOldValuesOrBuilderList();
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getOldValuesOrBuilder(int index);
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ java.util.List+ * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getNewValues(int index);
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ int getNewValuesCount();
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getNewValuesOrBuilderList();
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getNewValuesOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ * + * A mod describes all data changes in a watched table row. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} + */ + public static final class Mod extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) + ModOrBuilder { + private static final long serialVersionUID = 0L; + + // Use Mod.newBuilder() to construct. + private Mod(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private Mod() { + keys_ = java.util.Collections.emptyList(); + oldValues_ = java.util.Collections.emptyList(); + newValues_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new Mod(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_DataChangeRecord_Mod_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.class, + com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder.class); + } + + public static final int KEYS_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private java.util.List
+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getKeysOrBuilderList() {
+ return keys_;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ @java.lang.Override
+ public int getKeysCount() {
+ return keys_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getKeys(int index) {
+ return keys_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getKeysOrBuilder(int index) {
+ return keys_.get(index);
+ }
+
+ public static final int OLD_VALUES_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private java.util.List+ * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getOldValuesOrBuilderList() {
+ return oldValues_;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ @java.lang.Override
+ public int getOldValuesCount() {
+ return oldValues_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getOldValues(
+ int index) {
+ return oldValues_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getOldValuesOrBuilder(int index) {
+ return oldValues_.get(index);
+ }
+
+ public static final int NEW_VALUES_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private java.util.List+ * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getNewValuesOrBuilderList() {
+ return newValues_;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ @java.lang.Override
+ public int getNewValuesCount() {
+ return newValues_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getNewValues(
+ int index) {
+ return newValues_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getNewValuesOrBuilder(int index) {
+ return newValues_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ for (int i = 0; i < keys_.size(); i++) {
+ output.writeMessage(1, keys_.get(i));
+ }
+ for (int i = 0; i < oldValues_.size(); i++) {
+ output.writeMessage(2, oldValues_.get(i));
+ }
+ for (int i = 0; i < newValues_.size(); i++) {
+ output.writeMessage(3, newValues_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ for (int i = 0; i < keys_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, keys_.get(i));
+ }
+ for (int i = 0; i < oldValues_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, oldValues_.get(i));
+ }
+ for (int i = 0; i < newValues_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, newValues_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod other =
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod) obj;
+
+ if (!getKeysList().equals(other.getKeysList())) return false;
+ if (!getOldValuesList().equals(other.getOldValuesList())) return false;
+ if (!getNewValuesList().equals(other.getNewValuesList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (getKeysCount() > 0) {
+ hash = (37 * hash) + KEYS_FIELD_NUMBER;
+ hash = (53 * hash) + getKeysList().hashCode();
+ }
+ if (getOldValuesCount() > 0) {
+ hash = (37 * hash) + OLD_VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getOldValuesList().hashCode();
+ }
+ if (getNewValuesCount() > 0) {
+ hash = (37 * hash) + NEW_VALUES_FIELD_NUMBER;
+ hash = (53 * hash) + getNewValuesList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A mod describes all data changes in a watched table row. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public java.util.List+ * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public int getKeysCount() {
+ if (keysBuilder_ == null) {
+ return keys_.size();
+ } else {
+ return keysBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getKeys(
+ int index) {
+ if (keysBuilder_ == null) {
+ return keys_.get(index);
+ } else {
+ return keysBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder setKeys(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.set(index, value);
+ onChanged();
+ } else {
+ keysBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder setKeys(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder addKeys(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.add(value);
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder addKeys(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (keysBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureKeysIsMutable();
+ keys_.add(index, value);
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder addKeys(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.add(builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder addKeys(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ keysBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder addAllKeys(
+ java.lang.Iterable<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue>
+ values) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, keys_);
+ onChanged();
+ } else {
+ keysBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder clearKeys() {
+ if (keysBuilder_ == null) {
+ keys_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ } else {
+ keysBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public Builder removeKeys(int index) {
+ if (keysBuilder_ == null) {
+ ensureKeysIsMutable();
+ keys_.remove(index);
+ onChanged();
+ } else {
+ keysBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ getKeysBuilder(int index) {
+ return getKeysFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getKeysOrBuilder(int index) {
+ if (keysBuilder_ == null) {
+ return keys_.get(index);
+ } else {
+ return keysBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getKeysOrBuilderList() {
+ if (keysBuilder_ != null) {
+ return keysBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(keys_);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addKeysBuilder() {
+ return getKeysFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addKeysBuilder(int index) {
+ return getKeysFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the value of the primary key of the modified row. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue keys = 1;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder>
+ getKeysBuilderList() {
+ return getKeysFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getKeysFieldBuilder() {
+ if (keysBuilder_ == null) {
+ keysBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>(
+ keys_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean());
+ keys_ = null;
+ }
+ return keysBuilder_;
+ }
+
+ private java.util.List+ * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public java.util.List+ * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public int getOldValuesCount() {
+ if (oldValuesBuilder_ == null) {
+ return oldValues_.size();
+ } else {
+ return oldValuesBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getOldValues(
+ int index) {
+ if (oldValuesBuilder_ == null) {
+ return oldValues_.get(index);
+ } else {
+ return oldValuesBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder setOldValues(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (oldValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOldValuesIsMutable();
+ oldValues_.set(index, value);
+ onChanged();
+ } else {
+ oldValuesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder setOldValues(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (oldValuesBuilder_ == null) {
+ ensureOldValuesIsMutable();
+ oldValues_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ oldValuesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder addOldValues(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (oldValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOldValuesIsMutable();
+ oldValues_.add(value);
+ onChanged();
+ } else {
+ oldValuesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder addOldValues(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (oldValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureOldValuesIsMutable();
+ oldValues_.add(index, value);
+ onChanged();
+ } else {
+ oldValuesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder addOldValues(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (oldValuesBuilder_ == null) {
+ ensureOldValuesIsMutable();
+ oldValues_.add(builderForValue.build());
+ onChanged();
+ } else {
+ oldValuesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder addOldValues(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (oldValuesBuilder_ == null) {
+ ensureOldValuesIsMutable();
+ oldValues_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ oldValuesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder addAllOldValues(
+ java.lang.Iterable<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue>
+ values) {
+ if (oldValuesBuilder_ == null) {
+ ensureOldValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, oldValues_);
+ onChanged();
+ } else {
+ oldValuesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder clearOldValues() {
+ if (oldValuesBuilder_ == null) {
+ oldValues_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ } else {
+ oldValuesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public Builder removeOldValues(int index) {
+ if (oldValuesBuilder_ == null) {
+ ensureOldValuesIsMutable();
+ oldValues_.remove(index);
+ onChanged();
+ } else {
+ oldValuesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ getOldValuesBuilder(int index) {
+ return getOldValuesFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getOldValuesOrBuilder(int index) {
+ if (oldValuesBuilder_ == null) {
+ return oldValues_.get(index);
+ } else {
+ return oldValuesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getOldValuesOrBuilderList() {
+ if (oldValuesBuilder_ != null) {
+ return oldValuesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(oldValues_);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addOldValuesBuilder() {
+ return getOldValuesFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addOldValuesBuilder(int index) {
+ return getOldValuesFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the old values before the change for the modified columns. + * Always empty for + * [INSERT][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.INSERT], + * or if old values are not being captured specified by + * [value_capture_type][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue old_values = 2;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder>
+ getOldValuesBuilderList() {
+ return getOldValuesFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getOldValuesFieldBuilder() {
+ if (oldValuesBuilder_ == null) {
+ oldValuesBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>(
+ oldValues_,
+ ((bitField0_ & 0x00000002) != 0),
+ getParentForChildren(),
+ isClean());
+ oldValues_ = null;
+ }
+ return oldValuesBuilder_;
+ }
+
+ private java.util.List+ * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public java.util.List+ * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public int getNewValuesCount() {
+ if (newValuesBuilder_ == null) {
+ return newValues_.size();
+ } else {
+ return newValuesBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue getNewValues(
+ int index) {
+ if (newValuesBuilder_ == null) {
+ return newValues_.get(index);
+ } else {
+ return newValuesBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder setNewValues(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (newValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNewValuesIsMutable();
+ newValues_.set(index, value);
+ onChanged();
+ } else {
+ newValuesBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder setNewValues(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (newValuesBuilder_ == null) {
+ ensureNewValuesIsMutable();
+ newValues_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ newValuesBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder addNewValues(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (newValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNewValuesIsMutable();
+ newValues_.add(value);
+ onChanged();
+ } else {
+ newValuesBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder addNewValues(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue value) {
+ if (newValuesBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureNewValuesIsMutable();
+ newValues_.add(index, value);
+ onChanged();
+ } else {
+ newValuesBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder addNewValues(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (newValuesBuilder_ == null) {
+ ensureNewValuesIsMutable();
+ newValues_.add(builderForValue.build());
+ onChanged();
+ } else {
+ newValuesBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder addNewValues(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ builderForValue) {
+ if (newValuesBuilder_ == null) {
+ ensureNewValuesIsMutable();
+ newValues_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ newValuesBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder addAllNewValues(
+ java.lang.Iterable<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue>
+ values) {
+ if (newValuesBuilder_ == null) {
+ ensureNewValuesIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, newValues_);
+ onChanged();
+ } else {
+ newValuesBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder clearNewValues() {
+ if (newValuesBuilder_ == null) {
+ newValues_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ } else {
+ newValuesBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public Builder removeNewValues(int index) {
+ if (newValuesBuilder_ == null) {
+ ensureNewValuesIsMutable();
+ newValues_.remove(index);
+ onChanged();
+ } else {
+ newValuesBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ getNewValuesBuilder(int index) {
+ return getNewValuesFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder
+ getNewValuesOrBuilder(int index) {
+ if (newValuesBuilder_ == null) {
+ return newValues_.get(index);
+ } else {
+ return newValuesBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getNewValuesOrBuilderList() {
+ if (newValuesBuilder_ != null) {
+ return newValuesBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(newValues_);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addNewValuesBuilder() {
+ return getNewValuesFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder
+ addNewValuesBuilder(int index) {
+ return getNewValuesFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Returns the new values after the change for the modified columns. + * Always empty for + * [DELETE][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.DELETE]. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue new_values = 3;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder>
+ getNewValuesBuilderList() {
+ return getNewValuesFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>
+ getNewValuesFieldBuilder() {
+ if (newValuesBuilder_ == null) {
+ newValuesBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValue.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModValueOrBuilder>(
+ newValues_,
+ ((bitField0_ & 0x00000004) != 0),
+ getParentForChildren(),
+ isClean());
+ newValues_ = null;
+ }
+ return newValuesBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod)
+ private static final com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasCommitTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCommitTimestamp() {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+
+ public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ @java.lang.Override
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int SERVER_TRANSACTION_ID_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object serverTransactionId_ = "";
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The serverTransactionId.
+ */
+ @java.lang.Override
+ public java.lang.String getServerTransactionId() {
+ java.lang.Object ref = serverTransactionId_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serverTransactionId_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The bytes for serverTransactionId.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getServerTransactionIdBytes() {
+ java.lang.Object ref = serverTransactionId_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serverTransactionId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER = 4;
+ private boolean isLastRecordInTransactionInPartition_ = false;
+
+ /**
+ *
+ *
+ * + * Indicates whether this is the last record for a transaction in the + * current partition. Clients can use this field to determine when all + * records for a transaction in the current partition have been received. + *+ * + *
bool is_last_record_in_transaction_in_partition = 4;
+ *
+ * @return The isLastRecordInTransactionInPartition.
+ */
+ @java.lang.Override
+ public boolean getIsLastRecordInTransactionInPartition() {
+ return isLastRecordInTransactionInPartition_;
+ }
+
+ public static final int TABLE_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object table_ = "";
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The table.
+ */
+ @java.lang.Override
+ public java.lang.String getTable() {
+ java.lang.Object ref = table_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ table_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The bytes for table.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTableBytes() {
+ java.lang.Object ref = table_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ table_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int COLUMN_METADATA_FIELD_NUMBER = 6;
+
+ @SuppressWarnings("serial")
+ private java.util.List+ * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ @java.lang.Override
+ public java.util.List+ * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder>
+ getColumnMetadataOrBuilderList() {
+ return columnMetadata_;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ @java.lang.Override
+ public int getColumnMetadataCount() {
+ return columnMetadata_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ getColumnMetadata(int index) {
+ return columnMetadata_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder
+ getColumnMetadataOrBuilder(int index) {
+ return columnMetadata_.get(index);
+ }
+
+ public static final int MODS_FIELD_NUMBER = 7;
+
+ @SuppressWarnings("serial")
+ private java.util.List+ * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ @java.lang.Override
+ public java.util.List+ * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder>
+ getModsOrBuilderList() {
+ return mods_;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ @java.lang.Override
+ public int getModsCount() {
+ return mods_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod getMods(int index) {
+ return mods_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder getModsOrBuilder(
+ int index) {
+ return mods_.get(index);
+ }
+
+ public static final int MOD_TYPE_FIELD_NUMBER = 8;
+ private int modType_ = 0;
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The enum numeric value on the wire for modType.
+ */
+ @java.lang.Override
+ public int getModTypeValue() {
+ return modType_;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The modType.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType getModType() {
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType result =
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.forNumber(modType_);
+ return result == null
+ ? com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int VALUE_CAPTURE_TYPE_FIELD_NUMBER = 9;
+ private int valueCaptureType_ = 0;
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The enum numeric value on the wire for valueCaptureType.
+ */
+ @java.lang.Override
+ public int getValueCaptureTypeValue() {
+ return valueCaptureType_;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The valueCaptureType.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ getValueCaptureType() {
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType result =
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType.forNumber(
+ valueCaptureType_);
+ return result == null
+ ? com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType.UNRECOGNIZED
+ : result;
+ }
+
+ public static final int NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER = 10;
+ private int numberOfRecordsInTransaction_ = 0;
+
+ /**
+ *
+ *
+ * + * Indicates the number of data change records that are part of this + * transaction across all change stream partitions. This value can be used + * to assemble all the records associated with a particular transaction. + *+ * + *
int32 number_of_records_in_transaction = 10;
+ *
+ * @return The numberOfRecordsInTransaction.
+ */
+ @java.lang.Override
+ public int getNumberOfRecordsInTransaction() {
+ return numberOfRecordsInTransaction_;
+ }
+
+ public static final int NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER = 11;
+ private int numberOfPartitionsInTransaction_ = 0;
+
+ /**
+ *
+ *
+ * + * Indicates the number of partitions that return data change records for + * this transaction. This value can be helpful in assembling all records + * associated with a particular transaction. + *+ * + *
int32 number_of_partitions_in_transaction = 11;
+ *
+ * @return The numberOfPartitionsInTransaction.
+ */
+ @java.lang.Override
+ public int getNumberOfPartitionsInTransaction() {
+ return numberOfPartitionsInTransaction_;
+ }
+
+ public static final int TRANSACTION_TAG_FIELD_NUMBER = 12;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object transactionTag_ = "";
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The transactionTag.
+ */
+ @java.lang.Override
+ public java.lang.String getTransactionTag() {
+ java.lang.Object ref = transactionTag_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ transactionTag_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The bytes for transactionTag.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getTransactionTagBytes() {
+ java.lang.Object ref = transactionTag_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ transactionTag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int IS_SYSTEM_TRANSACTION_FIELD_NUMBER = 13;
+ private boolean isSystemTransaction_ = false;
+
+ /**
+ *
+ *
+ * + * Indicates whether the transaction is a system transaction. System + * transactions include those issued by time-to-live (TTL), column backfill, + * etc. + *+ * + *
bool is_system_transaction = 13;
+ *
+ * @return The isSystemTransaction.
+ */
+ @java.lang.Override
+ public boolean getIsSystemTransaction() {
+ return isSystemTransaction_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getCommitTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverTransactionId_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, serverTransactionId_);
+ }
+ if (isLastRecordInTransactionInPartition_ != false) {
+ output.writeBool(4, isLastRecordInTransactionInPartition_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 5, table_);
+ }
+ for (int i = 0; i < columnMetadata_.size(); i++) {
+ output.writeMessage(6, columnMetadata_.get(i));
+ }
+ for (int i = 0; i < mods_.size(); i++) {
+ output.writeMessage(7, mods_.get(i));
+ }
+ if (modType_
+ != com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.MOD_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(8, modType_);
+ }
+ if (valueCaptureType_
+ != com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ .VALUE_CAPTURE_TYPE_UNSPECIFIED
+ .getNumber()) {
+ output.writeEnum(9, valueCaptureType_);
+ }
+ if (numberOfRecordsInTransaction_ != 0) {
+ output.writeInt32(10, numberOfRecordsInTransaction_);
+ }
+ if (numberOfPartitionsInTransaction_ != 0) {
+ output.writeInt32(11, numberOfPartitionsInTransaction_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 12, transactionTag_);
+ }
+ if (isSystemTransaction_ != false) {
+ output.writeBool(13, isSystemTransaction_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverTransactionId_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, serverTransactionId_);
+ }
+ if (isLastRecordInTransactionInPartition_ != false) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeBoolSize(
+ 4, isLastRecordInTransactionInPartition_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(table_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, table_);
+ }
+ for (int i = 0; i < columnMetadata_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, columnMetadata_.get(i));
+ }
+ for (int i = 0; i < mods_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, mods_.get(i));
+ }
+ if (modType_
+ != com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.MOD_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(8, modType_);
+ }
+ if (valueCaptureType_
+ != com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ .VALUE_CAPTURE_TYPE_UNSPECIFIED
+ .getNumber()) {
+ size += com.google.protobuf.CodedOutputStream.computeEnumSize(9, valueCaptureType_);
+ }
+ if (numberOfRecordsInTransaction_ != 0) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeInt32Size(
+ 10, numberOfRecordsInTransaction_);
+ }
+ if (numberOfPartitionsInTransaction_ != 0) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeInt32Size(
+ 11, numberOfPartitionsInTransaction_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(transactionTag_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, transactionTag_);
+ }
+ if (isSystemTransaction_ != false) {
+ size += com.google.protobuf.CodedOutputStream.computeBoolSize(13, isSystemTransaction_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord other =
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) obj;
+
+ if (hasCommitTimestamp() != other.hasCommitTimestamp()) return false;
+ if (hasCommitTimestamp()) {
+ if (!getCommitTimestamp().equals(other.getCommitTimestamp())) return false;
+ }
+ if (!getRecordSequence().equals(other.getRecordSequence())) return false;
+ if (!getServerTransactionId().equals(other.getServerTransactionId())) return false;
+ if (getIsLastRecordInTransactionInPartition()
+ != other.getIsLastRecordInTransactionInPartition()) return false;
+ if (!getTable().equals(other.getTable())) return false;
+ if (!getColumnMetadataList().equals(other.getColumnMetadataList())) return false;
+ if (!getModsList().equals(other.getModsList())) return false;
+ if (modType_ != other.modType_) return false;
+ if (valueCaptureType_ != other.valueCaptureType_) return false;
+ if (getNumberOfRecordsInTransaction() != other.getNumberOfRecordsInTransaction())
+ return false;
+ if (getNumberOfPartitionsInTransaction() != other.getNumberOfPartitionsInTransaction())
+ return false;
+ if (!getTransactionTag().equals(other.getTransactionTag())) return false;
+ if (getIsSystemTransaction() != other.getIsSystemTransaction()) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasCommitTimestamp()) {
+ hash = (37 * hash) + COMMIT_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getCommitTimestamp().hashCode();
+ }
+ hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getRecordSequence().hashCode();
+ hash = (37 * hash) + SERVER_TRANSACTION_ID_FIELD_NUMBER;
+ hash = (53 * hash) + getServerTransactionId().hashCode();
+ hash = (37 * hash) + IS_LAST_RECORD_IN_TRANSACTION_IN_PARTITION_FIELD_NUMBER;
+ hash =
+ (53 * hash)
+ + com.google.protobuf.Internal.hashBoolean(getIsLastRecordInTransactionInPartition());
+ hash = (37 * hash) + TABLE_FIELD_NUMBER;
+ hash = (53 * hash) + getTable().hashCode();
+ if (getColumnMetadataCount() > 0) {
+ hash = (37 * hash) + COLUMN_METADATA_FIELD_NUMBER;
+ hash = (53 * hash) + getColumnMetadataList().hashCode();
+ }
+ if (getModsCount() > 0) {
+ hash = (37 * hash) + MODS_FIELD_NUMBER;
+ hash = (53 * hash) + getModsList().hashCode();
+ }
+ hash = (37 * hash) + MOD_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + modType_;
+ hash = (37 * hash) + VALUE_CAPTURE_TYPE_FIELD_NUMBER;
+ hash = (53 * hash) + valueCaptureType_;
+ hash = (37 * hash) + NUMBER_OF_RECORDS_IN_TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getNumberOfRecordsInTransaction();
+ hash = (37 * hash) + NUMBER_OF_PARTITIONS_IN_TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + getNumberOfPartitionsInTransaction();
+ hash = (37 * hash) + TRANSACTION_TAG_FIELD_NUMBER;
+ hash = (53 * hash) + getTransactionTag().hashCode();
+ hash = (37 * hash) + IS_SYSTEM_TRANSACTION_FIELD_NUMBER;
+ hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getIsSystemTransaction());
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A data change record contains a set of changes to a table with the same + * modification type (insert, update, or delete) committed at the same commit + * timestamp in one change stream partition for the same transaction. Multiple + * data change records can be returned for the same transaction across + * multiple change stream partitions. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.DataChangeRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ public boolean hasCommitTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ public com.google.protobuf.Timestamp getCommitTimestamp() {
+ if (commitTimestampBuilder_ == null) {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ } else {
+ return commitTimestampBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) {
+ if (commitTimestampBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ commitTimestamp_ = value;
+ } else {
+ commitTimestampBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (commitTimestampBuilder_ == null) {
+ commitTimestamp_ = builderForValue.build();
+ } else {
+ commitTimestampBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) {
+ if (commitTimestampBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && commitTimestamp_ != null
+ && commitTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getCommitTimestampBuilder().mergeFrom(value);
+ } else {
+ commitTimestamp_ = value;
+ }
+ } else {
+ commitTimestampBuilder_.mergeFrom(value);
+ }
+ if (commitTimestamp_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder clearCommitTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ commitTimestamp_ = null;
+ if (commitTimestampBuilder_ != null) {
+ commitTimestampBuilder_.dispose();
+ commitTimestampBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getCommitTimestampFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() {
+ if (commitTimestampBuilder_ != null) {
+ return commitTimestampBuilder_.getMessageOrBuilder();
+ } else {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp in which the change was committed. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCommitTimestampFieldBuilder() {
+ if (commitTimestampBuilder_ == null) {
+ commitTimestampBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCommitTimestamp(), getParentForChildren(), isClean());
+ commitTimestamp_ = null;
+ }
+ return commitTimestampBuilder_;
+ }
+
+ private java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequence(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRecordSequence() {
+ recordSequence_ = getDefaultInstance().getRecordSequence();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + * + * The record sequence number ordering across partitions is only meaningful + * in the context of a specific transaction. Record sequence numbers are + * unique across partitions for a specific transaction. Sort the + * DataChangeRecords for the same + * [server_transaction_id][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.server_transaction_id] + * by + * [record_sequence][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.record_sequence] + * to reconstruct the ordering of the changes within the transaction. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The bytes for recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object serverTransactionId_ = "";
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The serverTransactionId.
+ */
+ public java.lang.String getServerTransactionId() {
+ java.lang.Object ref = serverTransactionId_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ serverTransactionId_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return The bytes for serverTransactionId.
+ */
+ public com.google.protobuf.ByteString getServerTransactionIdBytes() {
+ java.lang.Object ref = serverTransactionId_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ serverTransactionId_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @param value The serverTransactionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServerTransactionId(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ serverTransactionId_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearServerTransactionId() {
+ serverTransactionId_ = getDefaultInstance().getServerTransactionId();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides a globally unique string that represents the transaction in + * which the change was committed. Multiple transactions can have the same + * commit timestamp, but each transaction has a unique + * server_transaction_id. + *+ * + *
string server_transaction_id = 3;
+ *
+ * @param value The bytes for serverTransactionId to set.
+ * @return This builder for chaining.
+ */
+ public Builder setServerTransactionIdBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ serverTransactionId_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private boolean isLastRecordInTransactionInPartition_;
+
+ /**
+ *
+ *
+ * + * Indicates whether this is the last record for a transaction in the + * current partition. Clients can use this field to determine when all + * records for a transaction in the current partition have been received. + *+ * + *
bool is_last_record_in_transaction_in_partition = 4;
+ *
+ * @return The isLastRecordInTransactionInPartition.
+ */
+ @java.lang.Override
+ public boolean getIsLastRecordInTransactionInPartition() {
+ return isLastRecordInTransactionInPartition_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether this is the last record for a transaction in the + * current partition. Clients can use this field to determine when all + * records for a transaction in the current partition have been received. + *+ * + *
bool is_last_record_in_transaction_in_partition = 4;
+ *
+ * @param value The isLastRecordInTransactionInPartition to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIsLastRecordInTransactionInPartition(boolean value) {
+
+ isLastRecordInTransactionInPartition_ = value;
+ bitField0_ |= 0x00000008;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether this is the last record for a transaction in the + * current partition. Clients can use this field to determine when all + * records for a transaction in the current partition have been received. + *+ * + *
bool is_last_record_in_transaction_in_partition = 4;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIsLastRecordInTransactionInPartition() {
+ bitField0_ = (bitField0_ & ~0x00000008);
+ isLastRecordInTransactionInPartition_ = false;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object table_ = "";
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The table.
+ */
+ public java.lang.String getTable() {
+ java.lang.Object ref = table_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ table_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return The bytes for table.
+ */
+ public com.google.protobuf.ByteString getTableBytes() {
+ java.lang.Object ref = table_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ table_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @param value The table to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTable(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ table_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTable() {
+ table_ = getDefaultInstance().getTable();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Name of the table affected by the change. + *+ * + *
string table = 5;
+ *
+ * @param value The bytes for table to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTableBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ table_ = value;
+ bitField0_ |= 0x00000010;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata>
+ columnMetadata_ = java.util.Collections.emptyList();
+
+ private void ensureColumnMetadataIsMutable() {
+ if (!((bitField0_ & 0x00000020) != 0)) {
+ columnMetadata_ =
+ new java.util.ArrayList<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata>(
+ columnMetadata_);
+ bitField0_ |= 0x00000020;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder>
+ columnMetadataBuilder_;
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata>
+ getColumnMetadataList() {
+ if (columnMetadataBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(columnMetadata_);
+ } else {
+ return columnMetadataBuilder_.getMessageList();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public int getColumnMetadataCount() {
+ if (columnMetadataBuilder_ == null) {
+ return columnMetadata_.size();
+ } else {
+ return columnMetadataBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ getColumnMetadata(int index) {
+ if (columnMetadataBuilder_ == null) {
+ return columnMetadata_.get(index);
+ } else {
+ return columnMetadataBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder setColumnMetadata(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata value) {
+ if (columnMetadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.set(index, value);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder setColumnMetadata(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ builderForValue) {
+ if (columnMetadataBuilder_ == null) {
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ columnMetadataBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder addColumnMetadata(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata value) {
+ if (columnMetadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.add(value);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder addColumnMetadata(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata value) {
+ if (columnMetadataBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.add(index, value);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder addColumnMetadata(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ builderForValue) {
+ if (columnMetadataBuilder_ == null) {
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.add(builderForValue.build());
+ onChanged();
+ } else {
+ columnMetadataBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder addColumnMetadata(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ builderForValue) {
+ if (columnMetadataBuilder_ == null) {
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ columnMetadataBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder addAllColumnMetadata(
+ java.lang.Iterable<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata>
+ values) {
+ if (columnMetadataBuilder_ == null) {
+ ensureColumnMetadataIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, columnMetadata_);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder clearColumnMetadata() {
+ if (columnMetadataBuilder_ == null) {
+ columnMetadata_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000020);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public Builder removeColumnMetadata(int index) {
+ if (columnMetadataBuilder_ == null) {
+ ensureColumnMetadataIsMutable();
+ columnMetadata_.remove(index);
+ onChanged();
+ } else {
+ columnMetadataBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ getColumnMetadataBuilder(int index) {
+ return getColumnMetadataFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder
+ getColumnMetadataOrBuilder(int index) {
+ if (columnMetadataBuilder_ == null) {
+ return columnMetadata_.get(index);
+ } else {
+ return columnMetadataBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder>
+ getColumnMetadataOrBuilderList() {
+ if (columnMetadataBuilder_ != null) {
+ return columnMetadataBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(columnMetadata_);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ addColumnMetadataBuilder() {
+ return getColumnMetadataFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder
+ addColumnMetadataBuilder(int index) {
+ return getColumnMetadataFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Provides metadata describing the columns associated with the + * [mods][google.spanner.v1.ChangeStreamRecord.DataChangeRecord.mods] listed + * below. + *+ * + *
+ * repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata column_metadata = 6;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder>
+ getColumnMetadataBuilderList() {
+ return getColumnMetadataFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadataOrBuilder>
+ getColumnMetadataFieldBuilder() {
+ if (columnMetadataBuilder_ == null) {
+ columnMetadataBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ColumnMetadata.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord
+ .ColumnMetadataOrBuilder>(
+ columnMetadata_,
+ ((bitField0_ & 0x00000020) != 0),
+ getParentForChildren(),
+ isClean());
+ columnMetadata_ = null;
+ }
+ return columnMetadataBuilder_;
+ }
+
+ private java.util.List+ * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public java.util.List+ * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public int getModsCount() {
+ if (modsBuilder_ == null) {
+ return mods_.size();
+ } else {
+ return modsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod getMods(int index) {
+ if (modsBuilder_ == null) {
+ return mods_.get(index);
+ } else {
+ return modsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder setMods(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod value) {
+ if (modsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureModsIsMutable();
+ mods_.set(index, value);
+ onChanged();
+ } else {
+ modsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder setMods(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder builderForValue) {
+ if (modsBuilder_ == null) {
+ ensureModsIsMutable();
+ mods_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ modsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder addMods(com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod value) {
+ if (modsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureModsIsMutable();
+ mods_.add(value);
+ onChanged();
+ } else {
+ modsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder addMods(
+ int index, com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod value) {
+ if (modsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureModsIsMutable();
+ mods_.add(index, value);
+ onChanged();
+ } else {
+ modsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder addMods(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder builderForValue) {
+ if (modsBuilder_ == null) {
+ ensureModsIsMutable();
+ mods_.add(builderForValue.build());
+ onChanged();
+ } else {
+ modsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder addMods(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder builderForValue) {
+ if (modsBuilder_ == null) {
+ ensureModsIsMutable();
+ mods_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ modsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder addAllMods(
+ java.lang.Iterable<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod>
+ values) {
+ if (modsBuilder_ == null) {
+ ensureModsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, mods_);
+ onChanged();
+ } else {
+ modsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder clearMods() {
+ if (modsBuilder_ == null) {
+ mods_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000040);
+ onChanged();
+ } else {
+ modsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public Builder removeMods(int index) {
+ if (modsBuilder_ == null) {
+ ensureModsIsMutable();
+ mods_.remove(index);
+ onChanged();
+ } else {
+ modsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder getModsBuilder(
+ int index) {
+ return getModsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder
+ getModsOrBuilder(int index) {
+ if (modsBuilder_ == null) {
+ return mods_.get(index);
+ } else {
+ return modsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public java.util.List<
+ ? extends com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModOrBuilder>
+ getModsOrBuilderList() {
+ if (modsBuilder_ != null) {
+ return modsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(mods_);
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder
+ addModsBuilder() {
+ return getModsFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.Builder addModsBuilder(
+ int index) {
+ return getModsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod.getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ * + * Describes the changes that were made. + *+ * + *
repeated .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Mod mods = 7;
+ */
+ public java.util.List+ * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The enum numeric value on the wire for modType.
+ */
+ @java.lang.Override
+ public int getModTypeValue() {
+ return modType_;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @param value The enum numeric value on the wire for modType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModTypeValue(int value) {
+ modType_ = value;
+ bitField0_ |= 0x00000080;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return The modType.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType getModType() {
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType result =
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.forNumber(modType_);
+ return result == null
+ ? com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType.UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @param value The modType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setModType(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000080;
+ modType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the type of change. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ModType mod_type = 8;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearModType() {
+ bitField0_ = (bitField0_ & ~0x00000080);
+ modType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int valueCaptureType_ = 0;
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The enum numeric value on the wire for valueCaptureType.
+ */
+ @java.lang.Override
+ public int getValueCaptureTypeValue() {
+ return valueCaptureType_;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @param value The enum numeric value on the wire for valueCaptureType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValueCaptureTypeValue(int value) {
+ valueCaptureType_ = value;
+ bitField0_ |= 0x00000100;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return The valueCaptureType.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ getValueCaptureType() {
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType result =
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType.forNumber(
+ valueCaptureType_);
+ return result == null
+ ? com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType
+ .UNRECOGNIZED
+ : result;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @param value The valueCaptureType to set.
+ * @return This builder for chaining.
+ */
+ public Builder setValueCaptureType(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ bitField0_ |= 0x00000100;
+ valueCaptureType_ = value.getNumber();
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Describes the value capture type that was specified in the change stream + * configuration when this change was captured. + *+ * + *
+ * .google.spanner.v1.ChangeStreamRecord.DataChangeRecord.ValueCaptureType value_capture_type = 9;
+ *
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearValueCaptureType() {
+ bitField0_ = (bitField0_ & ~0x00000100);
+ valueCaptureType_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int numberOfRecordsInTransaction_;
+
+ /**
+ *
+ *
+ * + * Indicates the number of data change records that are part of this + * transaction across all change stream partitions. This value can be used + * to assemble all the records associated with a particular transaction. + *+ * + *
int32 number_of_records_in_transaction = 10;
+ *
+ * @return The numberOfRecordsInTransaction.
+ */
+ @java.lang.Override
+ public int getNumberOfRecordsInTransaction() {
+ return numberOfRecordsInTransaction_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the number of data change records that are part of this + * transaction across all change stream partitions. This value can be used + * to assemble all the records associated with a particular transaction. + *+ * + *
int32 number_of_records_in_transaction = 10;
+ *
+ * @param value The numberOfRecordsInTransaction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNumberOfRecordsInTransaction(int value) {
+
+ numberOfRecordsInTransaction_ = value;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the number of data change records that are part of this + * transaction across all change stream partitions. This value can be used + * to assemble all the records associated with a particular transaction. + *+ * + *
int32 number_of_records_in_transaction = 10;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNumberOfRecordsInTransaction() {
+ bitField0_ = (bitField0_ & ~0x00000200);
+ numberOfRecordsInTransaction_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private int numberOfPartitionsInTransaction_;
+
+ /**
+ *
+ *
+ * + * Indicates the number of partitions that return data change records for + * this transaction. This value can be helpful in assembling all records + * associated with a particular transaction. + *+ * + *
int32 number_of_partitions_in_transaction = 11;
+ *
+ * @return The numberOfPartitionsInTransaction.
+ */
+ @java.lang.Override
+ public int getNumberOfPartitionsInTransaction() {
+ return numberOfPartitionsInTransaction_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the number of partitions that return data change records for + * this transaction. This value can be helpful in assembling all records + * associated with a particular transaction. + *+ * + *
int32 number_of_partitions_in_transaction = 11;
+ *
+ * @param value The numberOfPartitionsInTransaction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setNumberOfPartitionsInTransaction(int value) {
+
+ numberOfPartitionsInTransaction_ = value;
+ bitField0_ |= 0x00000400;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the number of partitions that return data change records for + * this transaction. This value can be helpful in assembling all records + * associated with a particular transaction. + *+ * + *
int32 number_of_partitions_in_transaction = 11;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearNumberOfPartitionsInTransaction() {
+ bitField0_ = (bitField0_ & ~0x00000400);
+ numberOfPartitionsInTransaction_ = 0;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object transactionTag_ = "";
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The transactionTag.
+ */
+ public java.lang.String getTransactionTag() {
+ java.lang.Object ref = transactionTag_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ transactionTag_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return The bytes for transactionTag.
+ */
+ public com.google.protobuf.ByteString getTransactionTagBytes() {
+ java.lang.Object ref = transactionTag_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ transactionTag_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @param value The transactionTag to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTransactionTag(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ transactionTag_ = value;
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearTransactionTag() {
+ transactionTag_ = getDefaultInstance().getTransactionTag();
+ bitField0_ = (bitField0_ & ~0x00000800);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the transaction tag associated with this transaction. + *+ * + *
string transaction_tag = 12;
+ *
+ * @param value The bytes for transactionTag to set.
+ * @return This builder for chaining.
+ */
+ public Builder setTransactionTagBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ transactionTag_ = value;
+ bitField0_ |= 0x00000800;
+ onChanged();
+ return this;
+ }
+
+ private boolean isSystemTransaction_;
+
+ /**
+ *
+ *
+ * + * Indicates whether the transaction is a system transaction. System + * transactions include those issued by time-to-live (TTL), column backfill, + * etc. + *+ * + *
bool is_system_transaction = 13;
+ *
+ * @return The isSystemTransaction.
+ */
+ @java.lang.Override
+ public boolean getIsSystemTransaction() {
+ return isSystemTransaction_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether the transaction is a system transaction. System + * transactions include those issued by time-to-live (TTL), column backfill, + * etc. + *+ * + *
bool is_system_transaction = 13;
+ *
+ * @param value The isSystemTransaction to set.
+ * @return This builder for chaining.
+ */
+ public Builder setIsSystemTransaction(boolean value) {
+
+ isSystemTransaction_ = value;
+ bitField0_ |= 0x00001000;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates whether the transaction is a system transaction. System + * transactions include those issued by time-to-live (TTL), column backfill, + * etc. + *+ * + *
bool is_system_transaction = 13;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearIsSystemTransaction() {
+ bitField0_ = (bitField0_ & ~0x00001000);
+ isSystemTransaction_ = false;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.DataChangeRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return Whether the timestamp field is set.
+ */
+ boolean hasTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return The timestamp.
+ */
+ com.google.protobuf.Timestamp getTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * A heartbeat record is returned as a progress indicator, when there are no + * data changes or any other partition record types in the change stream + * partition. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} + */ + public static final class HeartbeatRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) + HeartbeatRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use HeartbeatRecord.newBuilder() to construct. + private HeartbeatRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private HeartbeatRecord() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new HeartbeatRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_HeartbeatRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.class, + com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder.class); + } + + private int bitField0_; + public static final int TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp timestamp_; + + /** + * + * + *
+ * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return Whether the timestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return The timestamp.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getTimestamp() {
+ return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
+ return timestamp_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : timestamp_;
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getTimestamp());
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getTimestamp());
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord other =
+ (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) obj;
+
+ if (hasTimestamp() != other.hasTimestamp()) return false;
+ if (hasTimestamp()) {
+ if (!getTimestamp().equals(other.getTimestamp())) return false;
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasTimestamp()) {
+ hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getTimestamp().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A heartbeat record is returned as a progress indicator, when there are no + * data changes or any other partition record types in the change stream + * partition. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.HeartbeatRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return Whether the timestamp field is set.
+ */
+ public boolean hasTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ *
+ * @return The timestamp.
+ */
+ public com.google.protobuf.Timestamp getTimestamp() {
+ if (timestampBuilder_ == null) {
+ return timestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : timestamp_;
+ } else {
+ return timestampBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public Builder setTimestamp(com.google.protobuf.Timestamp value) {
+ if (timestampBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ timestamp_ = value;
+ } else {
+ timestampBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public Builder setTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (timestampBuilder_ == null) {
+ timestamp_ = builderForValue.build();
+ } else {
+ timestampBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public Builder mergeTimestamp(com.google.protobuf.Timestamp value) {
+ if (timestampBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && timestamp_ != null
+ && timestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getTimestampBuilder().mergeFrom(value);
+ } else {
+ timestamp_ = value;
+ }
+ } else {
+ timestampBuilder_.mergeFrom(value);
+ }
+ if (timestamp_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public Builder clearTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ timestamp_ = null;
+ if (timestampBuilder_ != null) {
+ timestampBuilder_.dispose();
+ timestampBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getTimestampBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getTimestampFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getTimestampOrBuilder() {
+ if (timestampBuilder_ != null) {
+ return timestampBuilder_.getMessageOrBuilder();
+ } else {
+ return timestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : timestamp_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the timestamp at which the query has returned all the records + * in the change stream partition with timestamp <= heartbeat timestamp. + * The heartbeat timestamp will not be the same as the timestamps of other + * record types in the same partition. + *+ * + *
.google.protobuf.Timestamp timestamp = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getTimestampFieldBuilder() {
+ if (timestampBuilder_ == null) {
+ timestampBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getTimestamp(), getParentForChildren(), isClean());
+ timestamp_ = null;
+ }
+ return timestampBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.HeartbeatRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return Whether the startTimestamp field is set.
+ */
+ boolean hasStartTimestamp();
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return The startTimestamp.
+ */
+ com.google.protobuf.Timestamp getStartTimestamp();
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getStartTimestampOrBuilder();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ java.lang.String getRecordSequence();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ com.google.protobuf.ByteString getRecordSequenceBytes();
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return A list containing the partitionTokens.
+ */
+ java.util.List+ * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return The count of partitionTokens.
+ */
+ int getPartitionTokensCount();
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The partitionTokens at the given index.
+ */
+ java.lang.String getPartitionTokens(int index);
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the partitionTokens at the given index.
+ */
+ com.google.protobuf.ByteString getPartitionTokensBytes(int index);
+ }
+
+ /**
+ *
+ *
+ * + * A partition start record serves as a notification that the client should + * schedule the partitions to be queried. PartitionStartRecord returns + * information about one or more partitions. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} + */ + public static final class PartitionStartRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) + PartitionStartRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PartitionStartRecord.newBuilder() to construct. + private PartitionStartRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private PartitionStartRecord() { + recordSequence_ = ""; + partitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionStartRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionStartRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.class, + com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder.class); + } + + private int bitField0_; + public static final int START_TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp startTimestamp_; + + /** + * + * + *
+ * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return Whether the startTimestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasStartTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return The startTimestamp.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getStartTimestamp() {
+ return startTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : startTimestamp_;
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getStartTimestampOrBuilder() {
+ return startTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : startTimestamp_;
+ }
+
+ public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ @java.lang.Override
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PARTITION_TOKENS_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private com.google.protobuf.LazyStringArrayList partitionTokens_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return A list containing the partitionTokens.
+ */
+ public com.google.protobuf.ProtocolStringList getPartitionTokensList() {
+ return partitionTokens_;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return The count of partitionTokens.
+ */
+ public int getPartitionTokensCount() {
+ return partitionTokens_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The partitionTokens at the given index.
+ */
+ public java.lang.String getPartitionTokens(int index) {
+ return partitionTokens_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the partitionTokens at the given index.
+ */
+ public com.google.protobuf.ByteString getPartitionTokensBytes(int index) {
+ return partitionTokens_.getByteString(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getStartTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_);
+ }
+ for (int i = 0; i < partitionTokens_.size(); i++) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionTokens_.getRaw(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getStartTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_);
+ }
+ {
+ int dataSize = 0;
+ for (int i = 0; i < partitionTokens_.size(); i++) {
+ dataSize += computeStringSizeNoTag(partitionTokens_.getRaw(i));
+ }
+ size += dataSize;
+ size += 1 * getPartitionTokensList().size();
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord other =
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) obj;
+
+ if (hasStartTimestamp() != other.hasStartTimestamp()) return false;
+ if (hasStartTimestamp()) {
+ if (!getStartTimestamp().equals(other.getStartTimestamp())) return false;
+ }
+ if (!getRecordSequence().equals(other.getRecordSequence())) return false;
+ if (!getPartitionTokensList().equals(other.getPartitionTokensList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasStartTimestamp()) {
+ hash = (37 * hash) + START_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getStartTimestamp().hashCode();
+ }
+ hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getRecordSequence().hashCode();
+ if (getPartitionTokensCount() > 0) {
+ hash = (37 * hash) + PARTITION_TOKENS_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionTokensList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A partition start record serves as a notification that the client should + * schedule the partitions to be queried. PartitionStartRecord returns + * information about one or more partitions. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionStartRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return Whether the startTimestamp field is set.
+ */
+ public boolean hasStartTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ *
+ * @return The startTimestamp.
+ */
+ public com.google.protobuf.Timestamp getStartTimestamp() {
+ if (startTimestampBuilder_ == null) {
+ return startTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : startTimestamp_;
+ } else {
+ return startTimestampBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public Builder setStartTimestamp(com.google.protobuf.Timestamp value) {
+ if (startTimestampBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ startTimestamp_ = value;
+ } else {
+ startTimestampBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public Builder setStartTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (startTimestampBuilder_ == null) {
+ startTimestamp_ = builderForValue.build();
+ } else {
+ startTimestampBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public Builder mergeStartTimestamp(com.google.protobuf.Timestamp value) {
+ if (startTimestampBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && startTimestamp_ != null
+ && startTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getStartTimestampBuilder().mergeFrom(value);
+ } else {
+ startTimestamp_ = value;
+ }
+ } else {
+ startTimestampBuilder_.mergeFrom(value);
+ }
+ if (startTimestamp_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public Builder clearStartTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ startTimestamp_ = null;
+ if (startTimestampBuilder_ != null) {
+ startTimestampBuilder_.dispose();
+ startTimestampBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getStartTimestampBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getStartTimestampFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getStartTimestampOrBuilder() {
+ if (startTimestampBuilder_ != null) {
+ return startTimestampBuilder_.getMessageOrBuilder();
+ } else {
+ return startTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : startTimestamp_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Start timestamp at which the partitions should be queried to return + * change stream records with timestamps >= start_timestamp. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp start_timestamp = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getStartTimestampFieldBuilder() {
+ if (startTimestampBuilder_ == null) {
+ startTimestampBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getStartTimestamp(), getParentForChildren(), isClean());
+ startTimestamp_ = null;
+ }
+ return startTimestampBuilder_;
+ }
+
+ private java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequence(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRecordSequence() {
+ recordSequence_ = getDefaultInstance().getRecordSequence();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The bytes for recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private com.google.protobuf.LazyStringArrayList partitionTokens_ =
+ com.google.protobuf.LazyStringArrayList.emptyList();
+
+ private void ensurePartitionTokensIsMutable() {
+ if (!partitionTokens_.isModifiable()) {
+ partitionTokens_ = new com.google.protobuf.LazyStringArrayList(partitionTokens_);
+ }
+ bitField0_ |= 0x00000004;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return A list containing the partitionTokens.
+ */
+ public com.google.protobuf.ProtocolStringList getPartitionTokensList() {
+ partitionTokens_.makeImmutable();
+ return partitionTokens_;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return The count of partitionTokens.
+ */
+ public int getPartitionTokensCount() {
+ return partitionTokens_.size();
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the element to return.
+ * @return The partitionTokens at the given index.
+ */
+ public java.lang.String getPartitionTokens(int index) {
+ return partitionTokens_.get(index);
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index of the value to return.
+ * @return The bytes of the partitionTokens at the given index.
+ */
+ public com.google.protobuf.ByteString getPartitionTokensBytes(int index) {
+ return partitionTokens_.getByteString(index);
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param index The index to set the value at.
+ * @param value The partitionTokens to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPartitionTokens(int index, java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePartitionTokensIsMutable();
+ partitionTokens_.set(index, value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param value The partitionTokens to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPartitionTokens(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensurePartitionTokensIsMutable();
+ partitionTokens_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param values The partitionTokens to add.
+ * @return This builder for chaining.
+ */
+ public Builder addAllPartitionTokens(java.lang.Iterable+ * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPartitionTokens() {
+ partitionTokens_ = com.google.protobuf.LazyStringArrayList.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ ;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifiers to be used in queries. + *+ * + *
repeated string partition_tokens = 3;
+ *
+ * @param value The bytes of the partitionTokens to add.
+ * @return This builder for chaining.
+ */
+ public Builder addPartitionTokensBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ ensurePartitionTokensIsMutable();
+ partitionTokens_.add(value);
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.PartitionStartRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return Whether the endTimestamp field is set.
+ */
+ boolean hasEndTimestamp();
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return The endTimestamp.
+ */
+ com.google.protobuf.Timestamp getEndTimestamp();
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getEndTimestampOrBuilder();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ java.lang.String getRecordSequence();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ com.google.protobuf.ByteString getRecordSequenceBytes();
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ java.lang.String getPartitionToken();
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ com.google.protobuf.ByteString getPartitionTokenBytes();
+ }
+
+ /**
+ *
+ *
+ * + * A partition end record serves as a notification that the client should stop + * reading the partition. No further records are expected to be retrieved on + * it. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} + */ + public static final class PartitionEndRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) + PartitionEndRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PartitionEndRecord.newBuilder() to construct. + private PartitionEndRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private PartitionEndRecord() { + recordSequence_ = ""; + partitionToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionEndRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEndRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.class, + com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder.class); + } + + private int bitField0_; + public static final int END_TIMESTAMP_FIELD_NUMBER = 1; + private com.google.protobuf.Timestamp endTimestamp_; + + /** + * + * + *
+ * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return Whether the endTimestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasEndTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return The endTimestamp.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getEndTimestamp() {
+ return endTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : endTimestamp_;
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getEndTimestampOrBuilder() {
+ return endTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : endTimestamp_;
+ }
+
+ public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ @java.lang.Override
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PARTITION_TOKEN_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object partitionToken_ = "";
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPartitionToken() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ partitionToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPartitionTokenBytes() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ partitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getEndTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionToken_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getEndTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, partitionToken_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord other =
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) obj;
+
+ if (hasEndTimestamp() != other.hasEndTimestamp()) return false;
+ if (hasEndTimestamp()) {
+ if (!getEndTimestamp().equals(other.getEndTimestamp())) return false;
+ }
+ if (!getRecordSequence().equals(other.getRecordSequence())) return false;
+ if (!getPartitionToken().equals(other.getPartitionToken())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasEndTimestamp()) {
+ hash = (37 * hash) + END_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getEndTimestamp().hashCode();
+ }
+ hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getRecordSequence().hashCode();
+ hash = (37 * hash) + PARTITION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionToken().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A partition end record serves as a notification that the client should stop + * reading the partition. No further records are expected to be retrieved on + * it. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEndRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return Whether the endTimestamp field is set.
+ */
+ public boolean hasEndTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ *
+ * @return The endTimestamp.
+ */
+ public com.google.protobuf.Timestamp getEndTimestamp() {
+ if (endTimestampBuilder_ == null) {
+ return endTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : endTimestamp_;
+ } else {
+ return endTimestampBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public Builder setEndTimestamp(com.google.protobuf.Timestamp value) {
+ if (endTimestampBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ endTimestamp_ = value;
+ } else {
+ endTimestampBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public Builder setEndTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (endTimestampBuilder_ == null) {
+ endTimestamp_ = builderForValue.build();
+ } else {
+ endTimestampBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public Builder mergeEndTimestamp(com.google.protobuf.Timestamp value) {
+ if (endTimestampBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && endTimestamp_ != null
+ && endTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getEndTimestampBuilder().mergeFrom(value);
+ } else {
+ endTimestamp_ = value;
+ }
+ } else {
+ endTimestampBuilder_.mergeFrom(value);
+ }
+ if (endTimestamp_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public Builder clearEndTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ endTimestamp_ = null;
+ if (endTimestampBuilder_ != null) {
+ endTimestampBuilder_.dispose();
+ endTimestampBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getEndTimestampBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getEndTimestampFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getEndTimestampOrBuilder() {
+ if (endTimestampBuilder_ != null) {
+ return endTimestampBuilder_.getMessageOrBuilder();
+ } else {
+ return endTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : endTimestamp_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * End timestamp at which the change stream partition is terminated. All + * changes generated by this partition will have timestamps <= + * end_timestamp. DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. PartitionEndRecord is the last record returned for a + * partition. + *+ * + *
.google.protobuf.Timestamp end_timestamp = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getEndTimestampFieldBuilder() {
+ if (endTimestampBuilder_ == null) {
+ endTimestampBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getEndTimestamp(), getParentForChildren(), isClean());
+ endTimestamp_ = null;
+ }
+ return endTimestampBuilder_;
+ }
+
+ private java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequence(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRecordSequence() {
+ recordSequence_ = getDefaultInstance().getRecordSequence();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The bytes for recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object partitionToken_ = "";
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ public java.lang.String getPartitionToken() {
+ java.lang.Object ref = partitionToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ partitionToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ public com.google.protobuf.ByteString getPartitionTokenBytes() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ partitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @param value The partitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPartitionToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ partitionToken_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPartitionToken() {
+ partitionToken_ = getDefaultInstance().getPartitionToken();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the terminated change stream + * partition. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEndRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @param value The bytes for partitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPartitionTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ partitionToken_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.PartitionEndRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ boolean hasCommitTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ com.google.protobuf.Timestamp getCommitTimestamp();
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ java.lang.String getRecordSequence();
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ com.google.protobuf.ByteString getRecordSequenceBytes();
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ java.lang.String getPartitionToken();
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ com.google.protobuf.ByteString getPartitionTokenBytes();
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ java.util.List
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent getMoveInEvents(
+ int index);
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ int getMoveInEventsCount();
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder>
+ getMoveInEventsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder
+ getMoveInEventsOrBuilder(int index);
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ java.util.List
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent getMoveOutEvents(
+ int index);
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ int getMoveOutEventsCount();
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder>
+ getMoveOutEventsOrBuilderList();
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder
+ getMoveOutEventsOrBuilder(int index);
+ }
+
+ /**
+ *
+ *
+ * + * A partition event record describes key range changes for a change stream + * partition. The changes to a row defined by its primary key can be captured + * in one change stream partition for a specific time range, and then be + * captured in a different change stream partition for a different time range. + * This movement of key ranges across change stream partitions is a reflection + * of activities, such as Spanner's dynamic splitting and load balancing, etc. + * Processing this event is needed if users want to guarantee processing of + * the changes for any key in timestamp order. If time ordered processing of + * changes for a primary key is not needed, this event can be ignored. + * To guarantee time ordered processing for each primary key, if the event + * describes move-ins, the reader of this partition needs to wait until the + * readers of the source partitions have processed all records with timestamps + * <= this PartitionEventRecord.commit_timestamp, before advancing beyond this + * PartitionEventRecord. If the event describes move-outs, the reader can + * notify the readers of the destination partitions that they can continue + * processing. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} + */ + public static final class PartitionEventRecord extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) + PartitionEventRecordOrBuilder { + private static final long serialVersionUID = 0L; + + // Use PartitionEventRecord.newBuilder() to construct. + private PartitionEventRecord(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private PartitionEventRecord() { + recordSequence_ = ""; + partitionToken_ = ""; + moveInEvents_ = java.util.Collections.emptyList(); + moveOutEvents_ = java.util.Collections.emptyList(); + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new PartitionEventRecord(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.class, + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder.class); + } + + public interface MoveInEventOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+ * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The sourcePartitionToken.
+ */
+ java.lang.String getSourcePartitionToken();
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The bytes for sourcePartitionToken.
+ */
+ com.google.protobuf.ByteString getSourcePartitionTokenBytes();
+ }
+
+ /**
+ *
+ *
+ * + * Describes move-in of the key ranges into the change stream partition + * identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token]. + * + * To maintain processing the changes for a particular key in timestamp + * order, the query processing the change stream partition identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * should not advance beyond the partition event record commit timestamp + * until the queries processing the source change stream partitions have + * processed all change stream records with timestamps <= the partition + * event record commit timestamp. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} + */ + public static final class MoveInEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) + MoveInEventOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MoveInEvent.newBuilder() to construct. + private MoveInEvent(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private MoveInEvent() { + sourcePartitionToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MoveInEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveInEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.class, + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder + .class); + } + + public static final int SOURCE_PARTITION_TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object sourcePartitionToken_ = ""; + + /** + * + * + *
+ * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The sourcePartitionToken.
+ */
+ @java.lang.Override
+ public java.lang.String getSourcePartitionToken() {
+ java.lang.Object ref = sourcePartitionToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourcePartitionToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The bytes for sourcePartitionToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSourcePartitionTokenBytes() {
+ java.lang.Object ref = sourcePartitionToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourcePartitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePartitionToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, sourcePartitionToken_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(sourcePartitionToken_)) {
+ size +=
+ com.google.protobuf.GeneratedMessageV3.computeStringSize(1, sourcePartitionToken_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent other =
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent) obj;
+
+ if (!getSourcePartitionToken().equals(other.getSourcePartitionToken())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + SOURCE_PARTITION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getSourcePartitionToken().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * Describes move-in of the key ranges into the change stream partition + * identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token]. + * + * To maintain processing the changes for a particular key in timestamp + * order, the query processing the change stream partition identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * should not advance beyond the partition event record commit timestamp + * until the queries processing the source change stream partitions have + * processed all change stream records with timestamps <= the partition + * event record commit timestamp. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The sourcePartitionToken.
+ */
+ public java.lang.String getSourcePartitionToken() {
+ java.lang.Object ref = sourcePartitionToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ sourcePartitionToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return The bytes for sourcePartitionToken.
+ */
+ public com.google.protobuf.ByteString getSourcePartitionTokenBytes() {
+ java.lang.Object ref = sourcePartitionToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ sourcePartitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @param value The sourcePartitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourcePartitionToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ sourcePartitionToken_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearSourcePartitionToken() {
+ sourcePartitionToken_ = getDefaultInstance().getSourcePartitionToken();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the source change stream + * partition that recorded changes for the key range that is moving + * into this partition. + *+ * + *
string source_partition_token = 1;
+ *
+ * @param value The bytes for sourcePartitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSourcePartitionTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ sourcePartitionToken_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent)
+ private static final com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The destinationPartitionToken.
+ */
+ java.lang.String getDestinationPartitionToken();
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The bytes for destinationPartitionToken.
+ */
+ com.google.protobuf.ByteString getDestinationPartitionTokenBytes();
+ }
+
+ /**
+ *
+ *
+ * + * Describes move-out of the key ranges out of the change stream partition + * identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token]. + * + * To maintain processing the changes for a particular key in timestamp + * order, the query processing the + * [MoveOutEvent][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent] + * in the partition identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * should inform the queries processing the destination partitions that + * they can unblock and proceed processing records past the + * [commit_timestamp][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.commit_timestamp]. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} + */ + public static final class MoveOutEvent extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent) + MoveOutEventOrBuilder { + private static final long serialVersionUID = 0L; + + // Use MoveOutEvent.newBuilder() to construct. + private MoveOutEvent(com.google.protobuf.GeneratedMessageV3.Builder> builder) { + super(builder); + } + + private MoveOutEvent() { + destinationPartitionToken_ = ""; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new MoveOutEvent(); + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.spanner.v1.ChangeStreamProto + .internal_static_google_spanner_v1_ChangeStreamRecord_PartitionEventRecord_MoveOutEvent_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.class, + com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder + .class); + } + + public static final int DESTINATION_PARTITION_TOKEN_FIELD_NUMBER = 1; + + @SuppressWarnings("serial") + private volatile java.lang.Object destinationPartitionToken_ = ""; + + /** + * + * + *
+ * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The destinationPartitionToken.
+ */
+ @java.lang.Override
+ public java.lang.String getDestinationPartitionToken() {
+ java.lang.Object ref = destinationPartitionToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ destinationPartitionToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The bytes for destinationPartitionToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getDestinationPartitionTokenBytes() {
+ java.lang.Object ref = destinationPartitionToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ destinationPartitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPartitionToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 1, destinationPartitionToken_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(destinationPartitionToken_)) {
+ size +=
+ com.google.protobuf.GeneratedMessageV3.computeStringSize(
+ 1, destinationPartitionToken_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj
+ instanceof
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent other =
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent) obj;
+
+ if (!getDestinationPartitionToken().equals(other.getDestinationPartitionToken()))
+ return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ hash = (37 * hash) + DESTINATION_PARTITION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getDestinationPartitionToken().hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseDelimitedFrom(
+ java.io.InputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * Describes move-out of the key ranges out of the change stream partition + * identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token]. + * + * To maintain processing the changes for a particular key in timestamp + * order, the query processing the + * [MoveOutEvent][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent] + * in the partition identified by + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * should inform the queries processing the destination partitions that + * they can unblock and proceed processing records past the + * [commit_timestamp][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.commit_timestamp]. + *+ * + * Protobuf type {@code + * google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The destinationPartitionToken.
+ */
+ public java.lang.String getDestinationPartitionToken() {
+ java.lang.Object ref = destinationPartitionToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ destinationPartitionToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return The bytes for destinationPartitionToken.
+ */
+ public com.google.protobuf.ByteString getDestinationPartitionTokenBytes() {
+ java.lang.Object ref = destinationPartitionToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ destinationPartitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @param value The destinationPartitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDestinationPartitionToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ destinationPartitionToken_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearDestinationPartitionToken() {
+ destinationPartitionToken_ = getDefaultInstance().getDestinationPartitionToken();
+ bitField0_ = (bitField0_ & ~0x00000001);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * An unique partition identifier describing the destination change + * stream partition that will record changes for the key range that is + * moving out of this partition. + *+ * + *
string destination_partition_token = 1;
+ *
+ * @param value The bytes for destinationPartitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setDestinationPartitionTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ destinationPartitionToken_ = value;
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent)
+ private static final com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .MoveOutEvent
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE =
+ new com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ @java.lang.Override
+ public boolean hasCommitTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ @java.lang.Override
+ public com.google.protobuf.Timestamp getCommitTimestamp() {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ @java.lang.Override
+ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+
+ public static final int RECORD_SEQUENCE_FIELD_NUMBER = 2;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ @java.lang.Override
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int PARTITION_TOKEN_FIELD_NUMBER = 3;
+
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object partitionToken_ = "";
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ @java.lang.Override
+ public java.lang.String getPartitionToken() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof java.lang.String) {
+ return (java.lang.String) ref;
+ } else {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ partitionToken_ = s;
+ return s;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getPartitionTokenBytes() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof java.lang.String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ partitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ public static final int MOVE_IN_EVENTS_FIELD_NUMBER = 4;
+
+ @SuppressWarnings("serial")
+ private java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent>
+ moveInEvents_;
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ @java.lang.Override
+ public java.util.List
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder>
+ getMoveInEventsOrBuilderList() {
+ return moveInEvents_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ @java.lang.Override
+ public int getMoveInEventsCount() {
+ return moveInEvents_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ getMoveInEvents(int index) {
+ return moveInEvents_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder
+ getMoveInEventsOrBuilder(int index) {
+ return moveInEvents_.get(index);
+ }
+
+ public static final int MOVE_OUT_EVENTS_FIELD_NUMBER = 5;
+
+ @SuppressWarnings("serial")
+ private java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>
+ moveOutEvents_;
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>
+ getMoveOutEventsList() {
+ return moveOutEvents_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ @java.lang.Override
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder>
+ getMoveOutEventsOrBuilderList() {
+ return moveOutEvents_;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ @java.lang.Override
+ public int getMoveOutEventsCount() {
+ return moveOutEvents_.size();
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ getMoveOutEvents(int index) {
+ return moveOutEvents_.get(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder
+ getMoveOutEventsOrBuilder(int index) {
+ return moveOutEvents_.get(index);
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (((bitField0_ & 0x00000001) != 0)) {
+ output.writeMessage(1, getCommitTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) {
+ com.google.protobuf.GeneratedMessageV3.writeString(output, 3, partitionToken_);
+ }
+ for (int i = 0; i < moveInEvents_.size(); i++) {
+ output.writeMessage(4, moveInEvents_.get(i));
+ }
+ for (int i = 0; i < moveOutEvents_.size(); i++) {
+ output.writeMessage(5, moveOutEvents_.get(i));
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (((bitField0_ & 0x00000001) != 0)) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, getCommitTimestamp());
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(recordSequence_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, recordSequence_);
+ }
+ if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(partitionToken_)) {
+ size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, partitionToken_);
+ }
+ for (int i = 0; i < moveInEvents_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, moveInEvents_.get(i));
+ }
+ for (int i = 0; i < moveOutEvents_.size(); i++) {
+ size += com.google.protobuf.CodedOutputStream.computeMessageSize(5, moveOutEvents_.get(i));
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord other =
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) obj;
+
+ if (hasCommitTimestamp() != other.hasCommitTimestamp()) return false;
+ if (hasCommitTimestamp()) {
+ if (!getCommitTimestamp().equals(other.getCommitTimestamp())) return false;
+ }
+ if (!getRecordSequence().equals(other.getRecordSequence())) return false;
+ if (!getPartitionToken().equals(other.getPartitionToken())) return false;
+ if (!getMoveInEventsList().equals(other.getMoveInEventsList())) return false;
+ if (!getMoveOutEventsList().equals(other.getMoveOutEventsList())) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ if (hasCommitTimestamp()) {
+ hash = (37 * hash) + COMMIT_TIMESTAMP_FIELD_NUMBER;
+ hash = (53 * hash) + getCommitTimestamp().hashCode();
+ }
+ hash = (37 * hash) + RECORD_SEQUENCE_FIELD_NUMBER;
+ hash = (53 * hash) + getRecordSequence().hashCode();
+ hash = (37 * hash) + PARTITION_TOKEN_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionToken().hashCode();
+ if (getMoveInEventsCount() > 0) {
+ hash = (37 * hash) + MOVE_IN_EVENTS_FIELD_NUMBER;
+ hash = (53 * hash) + getMoveInEventsList().hashCode();
+ }
+ if (getMoveOutEventsCount() > 0) {
+ hash = (37 * hash) + MOVE_OUT_EVENTS_FIELD_NUMBER;
+ hash = (53 * hash) + getMoveOutEventsList().hashCode();
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(
+ com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * A partition event record describes key range changes for a change stream + * partition. The changes to a row defined by its primary key can be captured + * in one change stream partition for a specific time range, and then be + * captured in a different change stream partition for a different time range. + * This movement of key ranges across change stream partitions is a reflection + * of activities, such as Spanner's dynamic splitting and load balancing, etc. + * Processing this event is needed if users want to guarantee processing of + * the changes for any key in timestamp order. If time ordered processing of + * changes for a primary key is not needed, this event can be ignored. + * To guarantee time ordered processing for each primary key, if the event + * describes move-ins, the reader of this partition needs to wait until the + * readers of the source partitions have processed all records with timestamps + * <= this PartitionEventRecord.commit_timestamp, before advancing beyond this + * PartitionEventRecord. If the event describes move-outs, the reader can + * notify the readers of the destination partitions that they can continue + * processing. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord.PartitionEventRecord} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return Whether the commitTimestamp field is set.
+ */
+ public boolean hasCommitTimestamp() {
+ return ((bitField0_ & 0x00000001) != 0);
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ *
+ * @return The commitTimestamp.
+ */
+ public com.google.protobuf.Timestamp getCommitTimestamp() {
+ if (commitTimestampBuilder_ == null) {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ } else {
+ return commitTimestampBuilder_.getMessage();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder setCommitTimestamp(com.google.protobuf.Timestamp value) {
+ if (commitTimestampBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ commitTimestamp_ = value;
+ } else {
+ commitTimestampBuilder_.setMessage(value);
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder setCommitTimestamp(com.google.protobuf.Timestamp.Builder builderForValue) {
+ if (commitTimestampBuilder_ == null) {
+ commitTimestamp_ = builderForValue.build();
+ } else {
+ commitTimestampBuilder_.setMessage(builderForValue.build());
+ }
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder mergeCommitTimestamp(com.google.protobuf.Timestamp value) {
+ if (commitTimestampBuilder_ == null) {
+ if (((bitField0_ & 0x00000001) != 0)
+ && commitTimestamp_ != null
+ && commitTimestamp_ != com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getCommitTimestampBuilder().mergeFrom(value);
+ } else {
+ commitTimestamp_ = value;
+ }
+ } else {
+ commitTimestampBuilder_.mergeFrom(value);
+ }
+ if (commitTimestamp_ != null) {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public Builder clearCommitTimestamp() {
+ bitField0_ = (bitField0_ & ~0x00000001);
+ commitTimestamp_ = null;
+ if (commitTimestampBuilder_ != null) {
+ commitTimestampBuilder_.dispose();
+ commitTimestampBuilder_ = null;
+ }
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public com.google.protobuf.Timestamp.Builder getCommitTimestampBuilder() {
+ bitField0_ |= 0x00000001;
+ onChanged();
+ return getCommitTimestampFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ public com.google.protobuf.TimestampOrBuilder getCommitTimestampOrBuilder() {
+ if (commitTimestampBuilder_ != null) {
+ return commitTimestampBuilder_.getMessageOrBuilder();
+ } else {
+ return commitTimestamp_ == null
+ ? com.google.protobuf.Timestamp.getDefaultInstance()
+ : commitTimestamp_;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Indicates the commit timestamp at which the key range change occurred. + * DataChangeRecord.commit_timestamps, + * PartitionStartRecord.start_timestamps, + * PartitionEventRecord.commit_timestamps, and + * PartitionEndRecord.end_timestamps can have the same value in the same + * partition. + *+ * + *
.google.protobuf.Timestamp commit_timestamp = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>
+ getCommitTimestampFieldBuilder() {
+ if (commitTimestampBuilder_ == null) {
+ commitTimestampBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.protobuf.Timestamp,
+ com.google.protobuf.Timestamp.Builder,
+ com.google.protobuf.TimestampOrBuilder>(
+ getCommitTimestamp(), getParentForChildren(), isClean());
+ commitTimestamp_ = null;
+ }
+ return commitTimestampBuilder_;
+ }
+
+ private java.lang.Object recordSequence_ = "";
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The recordSequence.
+ */
+ public java.lang.String getRecordSequence() {
+ java.lang.Object ref = recordSequence_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ recordSequence_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return The bytes for recordSequence.
+ */
+ public com.google.protobuf.ByteString getRecordSequenceBytes() {
+ java.lang.Object ref = recordSequence_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ recordSequence_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequence(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearRecordSequence() {
+ recordSequence_ = getDefaultInstance().getRecordSequence();
+ bitField0_ = (bitField0_ & ~0x00000002);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Record sequence numbers are unique and monotonically increasing (but not + * necessarily contiguous) for a specific timestamp across record + * types in the same partition. To guarantee ordered processing, the reader + * should process records (of potentially different types) in + * record_sequence order for a specific timestamp in the same partition. + *+ * + *
string record_sequence = 2;
+ *
+ * @param value The bytes for recordSequence to set.
+ * @return This builder for chaining.
+ */
+ public Builder setRecordSequenceBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ recordSequence_ = value;
+ bitField0_ |= 0x00000002;
+ onChanged();
+ return this;
+ }
+
+ private java.lang.Object partitionToken_ = "";
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The partitionToken.
+ */
+ public java.lang.String getPartitionToken() {
+ java.lang.Object ref = partitionToken_;
+ if (!(ref instanceof java.lang.String)) {
+ com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
+ java.lang.String s = bs.toStringUtf8();
+ partitionToken_ = s;
+ return s;
+ } else {
+ return (java.lang.String) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return The bytes for partitionToken.
+ */
+ public com.google.protobuf.ByteString getPartitionTokenBytes() {
+ java.lang.Object ref = partitionToken_;
+ if (ref instanceof String) {
+ com.google.protobuf.ByteString b =
+ com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
+ partitionToken_ = b;
+ return b;
+ } else {
+ return (com.google.protobuf.ByteString) ref;
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @param value The partitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPartitionToken(java.lang.String value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ partitionToken_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @return This builder for chaining.
+ */
+ public Builder clearPartitionToken() {
+ partitionToken_ = getDefaultInstance().getPartitionToken();
+ bitField0_ = (bitField0_ & ~0x00000004);
+ onChanged();
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Unique partition identifier describing the partition this event + * occurred on. + * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token] + * is equal to the partition token of the change stream partition currently + * queried to return this PartitionEventRecord. + *+ * + *
string partition_token = 3;
+ *
+ * @param value The bytes for partitionToken to set.
+ * @return This builder for chaining.
+ */
+ public Builder setPartitionTokenBytes(com.google.protobuf.ByteString value) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ checkByteStringIsUtf8(value);
+ partitionToken_ = value;
+ bitField0_ |= 0x00000004;
+ onChanged();
+ return this;
+ }
+
+ private java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent>
+ moveInEvents_ = java.util.Collections.emptyList();
+
+ private void ensureMoveInEventsIsMutable() {
+ if (!((bitField0_ & 0x00000008) != 0)) {
+ moveInEvents_ =
+ new java.util.ArrayList<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent>(
+ moveInEvents_);
+ bitField0_ |= 0x00000008;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder>
+ moveInEventsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent>
+ getMoveInEventsList() {
+ if (moveInEventsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(moveInEvents_);
+ } else {
+ return moveInEventsBuilder_.getMessageList();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public int getMoveInEventsCount() {
+ if (moveInEventsBuilder_ == null) {
+ return moveInEvents_.size();
+ } else {
+ return moveInEventsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ getMoveInEvents(int index) {
+ if (moveInEventsBuilder_ == null) {
+ return moveInEvents_.get(index);
+ } else {
+ return moveInEventsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder setMoveInEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent value) {
+ if (moveInEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.set(index, value);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder setMoveInEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ builderForValue) {
+ if (moveInEventsBuilder_ == null) {
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ moveInEventsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder addMoveInEvents(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent value) {
+ if (moveInEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.add(value);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder addMoveInEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent value) {
+ if (moveInEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.add(index, value);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder addMoveInEvents(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ builderForValue) {
+ if (moveInEventsBuilder_ == null) {
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.add(builderForValue.build());
+ onChanged();
+ } else {
+ moveInEventsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder addMoveInEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ builderForValue) {
+ if (moveInEventsBuilder_ == null) {
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ moveInEventsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder addAllMoveInEvents(
+ java.lang.Iterable<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent>
+ values) {
+ if (moveInEventsBuilder_ == null) {
+ ensureMoveInEventsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, moveInEvents_);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder clearMoveInEvents() {
+ if (moveInEventsBuilder_ == null) {
+ moveInEvents_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000008);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public Builder removeMoveInEvents(int index) {
+ if (moveInEventsBuilder_ == null) {
+ ensureMoveInEventsIsMutable();
+ moveInEvents_.remove(index);
+ onChanged();
+ } else {
+ moveInEventsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ getMoveInEventsBuilder(int index) {
+ return getMoveInEventsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder
+ getMoveInEventsOrBuilder(int index) {
+ if (moveInEventsBuilder_ == null) {
+ return moveInEvents_.get(index);
+ } else {
+ return moveInEventsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .MoveInEventOrBuilder>
+ getMoveInEventsOrBuilderList() {
+ if (moveInEventsBuilder_ != null) {
+ return moveInEventsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(moveInEvents_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ addMoveInEventsBuilder() {
+ return getMoveInEventsFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder
+ addMoveInEventsBuilder(int index) {
+ return getMoveInEventsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved into the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved into partition (P1) from partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_in_events {
+ * source_partition_token: "P2"
+ * }
+ * move_in_events {
+ * source_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_out_events {
+ * destination_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent move_in_events = 4;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder>
+ getMoveInEventsBuilderList() {
+ return getMoveInEventsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEventOrBuilder>
+ getMoveInEventsFieldBuilder() {
+ if (moveInEventsBuilder_ == null) {
+ moveInEventsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveInEvent.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .MoveInEventOrBuilder>(
+ moveInEvents_,
+ ((bitField0_ & 0x00000008) != 0),
+ getParentForChildren(),
+ isClean());
+ moveInEvents_ = null;
+ }
+ return moveInEventsBuilder_;
+ }
+
+ private java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>
+ moveOutEvents_ = java.util.Collections.emptyList();
+
+ private void ensureMoveOutEventsIsMutable() {
+ if (!((bitField0_ & 0x00000010) != 0)) {
+ moveOutEvents_ =
+ new java.util.ArrayList<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>(
+ moveOutEvents_);
+ bitField0_ |= 0x00000010;
+ }
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder>
+ moveOutEventsBuilder_;
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>
+ getMoveOutEventsList() {
+ if (moveOutEventsBuilder_ == null) {
+ return java.util.Collections.unmodifiableList(moveOutEvents_);
+ } else {
+ return moveOutEventsBuilder_.getMessageList();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public int getMoveOutEventsCount() {
+ if (moveOutEventsBuilder_ == null) {
+ return moveOutEvents_.size();
+ } else {
+ return moveOutEventsBuilder_.getCount();
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ getMoveOutEvents(int index) {
+ if (moveOutEventsBuilder_ == null) {
+ return moveOutEvents_.get(index);
+ } else {
+ return moveOutEventsBuilder_.getMessage(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder setMoveOutEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent value) {
+ if (moveOutEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.set(index, value);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.setMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder setMoveOutEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ builderForValue) {
+ if (moveOutEventsBuilder_ == null) {
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.set(index, builderForValue.build());
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.setMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder addMoveOutEvents(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent value) {
+ if (moveOutEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.add(value);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.addMessage(value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder addMoveOutEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent value) {
+ if (moveOutEventsBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.add(index, value);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.addMessage(index, value);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder addMoveOutEvents(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ builderForValue) {
+ if (moveOutEventsBuilder_ == null) {
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.add(builderForValue.build());
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.addMessage(builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder addMoveOutEvents(
+ int index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ builderForValue) {
+ if (moveOutEventsBuilder_ == null) {
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.add(index, builderForValue.build());
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.addMessage(index, builderForValue.build());
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder addAllMoveOutEvents(
+ java.lang.Iterable<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent>
+ values) {
+ if (moveOutEventsBuilder_ == null) {
+ ensureMoveOutEventsIsMutable();
+ com.google.protobuf.AbstractMessageLite.Builder.addAll(values, moveOutEvents_);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.addAllMessages(values);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder clearMoveOutEvents() {
+ if (moveOutEventsBuilder_ == null) {
+ moveOutEvents_ = java.util.Collections.emptyList();
+ bitField0_ = (bitField0_ & ~0x00000010);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public Builder removeMoveOutEvents(int index) {
+ if (moveOutEventsBuilder_ == null) {
+ ensureMoveOutEventsIsMutable();
+ moveOutEvents_.remove(index);
+ onChanged();
+ } else {
+ moveOutEventsBuilder_.remove(index);
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ getMoveOutEventsBuilder(int index) {
+ return getMoveOutEventsFieldBuilder().getBuilder(index);
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder
+ getMoveOutEventsOrBuilder(int index) {
+ if (moveOutEventsBuilder_ == null) {
+ return moveOutEvents_.get(index);
+ } else {
+ return moveOutEventsBuilder_.getMessageOrBuilder(index);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public java.util.List<
+ ? extends
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .MoveOutEventOrBuilder>
+ getMoveOutEventsOrBuilderList() {
+ if (moveOutEventsBuilder_ != null) {
+ return moveOutEventsBuilder_.getMessageOrBuilderList();
+ } else {
+ return java.util.Collections.unmodifiableList(moveOutEvents_);
+ }
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ addMoveOutEventsBuilder() {
+ return getMoveOutEventsFieldBuilder()
+ .addBuilder(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder
+ addMoveOutEventsBuilder(int index) {
+ return getMoveOutEventsFieldBuilder()
+ .addBuilder(
+ index,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ .getDefaultInstance());
+ }
+
+ /**
+ *
+ *
+ *
+ * Set when one or more key ranges are moved out of the change stream
+ * partition identified by
+ * [partition_token][google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.partition_token].
+ *
+ * Example: Two key ranges are moved out of partition (P1) to partition (P2)
+ * and partition (P3) in a single transaction at timestamp T.
+ *
+ * The PartitionEventRecord returned in P1 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P1"
+ * move_out_events {
+ * destination_partition_token: "P2"
+ * }
+ * move_out_events {
+ * destination_partition_token: "P3"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P2 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P2"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ * The PartitionEventRecord returned in P3 will reflect the move as:
+ *
+ * PartitionEventRecord {
+ * commit_timestamp: T
+ * partition_token: "P3"
+ * move_in_events {
+ * source_partition_token: "P1"
+ * }
+ * }
+ *
+ *
+ *
+ * repeated .google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent move_out_events = 5;
+ *
+ */
+ public java.util.List<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder>
+ getMoveOutEventsBuilderList() {
+ return getMoveOutEventsFieldBuilder().getBuilderList();
+ }
+
+ private com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEventOrBuilder>
+ getMoveOutEventsFieldBuilder() {
+ if (moveOutEventsBuilder_ == null) {
+ moveOutEventsBuilder_ =
+ new com.google.protobuf.RepeatedFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.MoveOutEvent
+ .Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .MoveOutEventOrBuilder>(
+ moveOutEvents_,
+ ((bitField0_ & 0x00000010) != 0),
+ getParentForChildren(),
+ isClean());
+ moveOutEvents_ = null;
+ }
+ return moveOutEventsBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord.PartitionEventRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return Whether the dataChangeRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasDataChangeRecord() {
+ return recordCase_ == 1;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return The dataChangeRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord getDataChangeRecord() {
+ if (recordCase_ == 1) {
+ return (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder
+ getDataChangeRecordOrBuilder() {
+ if (recordCase_ == 1) {
+ return (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ }
+
+ public static final int HEARTBEAT_RECORD_FIELD_NUMBER = 2;
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return Whether the heartbeatRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeartbeatRecord() {
+ return recordCase_ == 2;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return The heartbeatRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord getHeartbeatRecord() {
+ if (recordCase_ == 2) {
+ return (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder
+ getHeartbeatRecordOrBuilder() {
+ if (recordCase_ == 2) {
+ return (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ }
+
+ public static final int PARTITION_START_RECORD_FIELD_NUMBER = 3;
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return Whether the partitionStartRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionStartRecord() {
+ return recordCase_ == 3;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return The partitionStartRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord getPartitionStartRecord() {
+ if (recordCase_ == 3) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder
+ getPartitionStartRecordOrBuilder() {
+ if (recordCase_ == 3) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ }
+
+ public static final int PARTITION_END_RECORD_FIELD_NUMBER = 4;
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ * @return Whether the partitionEndRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionEndRecord() {
+ return recordCase_ == 4;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ * @return The partitionEndRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord getPartitionEndRecord() {
+ if (recordCase_ == 4) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder
+ getPartitionEndRecordOrBuilder() {
+ if (recordCase_ == 4) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ }
+
+ public static final int PARTITION_EVENT_RECORD_FIELD_NUMBER = 5;
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return Whether the partitionEventRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionEventRecord() {
+ return recordCase_ == 5;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return The partitionEventRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord getPartitionEventRecord() {
+ if (recordCase_ == 5) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder
+ getPartitionEventRecordOrBuilder() {
+ if (recordCase_ == 5) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ }
+
+ private byte memoizedIsInitialized = -1;
+
+ @java.lang.Override
+ public final boolean isInitialized() {
+ byte isInitialized = memoizedIsInitialized;
+ if (isInitialized == 1) return true;
+ if (isInitialized == 0) return false;
+
+ memoizedIsInitialized = 1;
+ return true;
+ }
+
+ @java.lang.Override
+ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
+ if (recordCase_ == 1) {
+ output.writeMessage(1, (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_);
+ }
+ if (recordCase_ == 2) {
+ output.writeMessage(2, (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_);
+ }
+ if (recordCase_ == 3) {
+ output.writeMessage(
+ 3, (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_);
+ }
+ if (recordCase_ == 4) {
+ output.writeMessage(4, (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_);
+ }
+ if (recordCase_ == 5) {
+ output.writeMessage(
+ 5, (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_);
+ }
+ getUnknownFields().writeTo(output);
+ }
+
+ @java.lang.Override
+ public int getSerializedSize() {
+ int size = memoizedSize;
+ if (size != -1) return size;
+
+ size = 0;
+ if (recordCase_ == 1) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 1, (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_);
+ }
+ if (recordCase_ == 2) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 2, (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_);
+ }
+ if (recordCase_ == 3) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 3, (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_);
+ }
+ if (recordCase_ == 4) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 4, (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_);
+ }
+ if (recordCase_ == 5) {
+ size +=
+ com.google.protobuf.CodedOutputStream.computeMessageSize(
+ 5, (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_);
+ }
+ size += getUnknownFields().getSerializedSize();
+ memoizedSize = size;
+ return size;
+ }
+
+ @java.lang.Override
+ public boolean equals(final java.lang.Object obj) {
+ if (obj == this) {
+ return true;
+ }
+ if (!(obj instanceof com.google.spanner.v1.ChangeStreamRecord)) {
+ return super.equals(obj);
+ }
+ com.google.spanner.v1.ChangeStreamRecord other = (com.google.spanner.v1.ChangeStreamRecord) obj;
+
+ if (!getRecordCase().equals(other.getRecordCase())) return false;
+ switch (recordCase_) {
+ case 1:
+ if (!getDataChangeRecord().equals(other.getDataChangeRecord())) return false;
+ break;
+ case 2:
+ if (!getHeartbeatRecord().equals(other.getHeartbeatRecord())) return false;
+ break;
+ case 3:
+ if (!getPartitionStartRecord().equals(other.getPartitionStartRecord())) return false;
+ break;
+ case 4:
+ if (!getPartitionEndRecord().equals(other.getPartitionEndRecord())) return false;
+ break;
+ case 5:
+ if (!getPartitionEventRecord().equals(other.getPartitionEventRecord())) return false;
+ break;
+ case 0:
+ default:
+ }
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
+ return true;
+ }
+
+ @java.lang.Override
+ public int hashCode() {
+ if (memoizedHashCode != 0) {
+ return memoizedHashCode;
+ }
+ int hash = 41;
+ hash = (19 * hash) + getDescriptor().hashCode();
+ switch (recordCase_) {
+ case 1:
+ hash = (37 * hash) + DATA_CHANGE_RECORD_FIELD_NUMBER;
+ hash = (53 * hash) + getDataChangeRecord().hashCode();
+ break;
+ case 2:
+ hash = (37 * hash) + HEARTBEAT_RECORD_FIELD_NUMBER;
+ hash = (53 * hash) + getHeartbeatRecord().hashCode();
+ break;
+ case 3:
+ hash = (37 * hash) + PARTITION_START_RECORD_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionStartRecord().hashCode();
+ break;
+ case 4:
+ hash = (37 * hash) + PARTITION_END_RECORD_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionEndRecord().hashCode();
+ break;
+ case 5:
+ hash = (37 * hash) + PARTITION_EVENT_RECORD_FIELD_NUMBER;
+ hash = (53 * hash) + getPartitionEventRecord().hashCode();
+ break;
+ case 0:
+ default:
+ }
+ hash = (29 * hash) + getUnknownFields().hashCode();
+ memoizedHashCode = hash;
+ return hash;
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(java.nio.ByteBuffer data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ com.google.protobuf.ByteString data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ com.google.protobuf.ByteString data,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(byte[] data)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ return PARSER.parseFrom(data, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(java.io.InputStream input)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseDelimitedFrom(
+ java.io.InputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseDelimitedFrom(
+ java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ com.google.protobuf.CodedInputStream input) throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord parseFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws java.io.IOException {
+ return com.google.protobuf.GeneratedMessageV3.parseWithIOException(
+ PARSER, input, extensionRegistry);
+ }
+
+ @java.lang.Override
+ public Builder newBuilderForType() {
+ return newBuilder();
+ }
+
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
+
+ public static Builder newBuilder(com.google.spanner.v1.ChangeStreamRecord prototype) {
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+
+ @java.lang.Override
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE ? new Builder() : new Builder().mergeFrom(this);
+ }
+
+ @java.lang.Override
+ protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
+ Builder builder = new Builder(parent);
+ return builder;
+ }
+
+ /**
+ *
+ *
+ * + * Spanner Change Streams enable customers to capture and stream out changes to + * their Spanner databases in real-time. A change stream + * can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or + * partition_mode='MUTABLE_KEY_RANGE'. + * + * This message is only used in Change Streams created with the option + * partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special + * Table-Valued Function (TVF) along with each Change Streams. The function + * provides access to the change stream's records. The function is named + * READ_<change_stream_name> (where <change_stream_name> is the + * name of the change stream), and it returns a table with only one column + * called ChangeRecord. + *+ * + * Protobuf type {@code google.spanner.v1.ChangeStreamRecord} + */ + public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
+ * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return Whether the dataChangeRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasDataChangeRecord() {
+ return recordCase_ == 1;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return The dataChangeRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord getDataChangeRecord() {
+ if (dataChangeRecordBuilder_ == null) {
+ if (recordCase_ == 1) {
+ return (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ } else {
+ if (recordCase_ == 1) {
+ return dataChangeRecordBuilder_.getMessage();
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ public Builder setDataChangeRecord(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord value) {
+ if (dataChangeRecordBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ record_ = value;
+ onChanged();
+ } else {
+ dataChangeRecordBuilder_.setMessage(value);
+ }
+ recordCase_ = 1;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ public Builder setDataChangeRecord(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder builderForValue) {
+ if (dataChangeRecordBuilder_ == null) {
+ record_ = builderForValue.build();
+ onChanged();
+ } else {
+ dataChangeRecordBuilder_.setMessage(builderForValue.build());
+ }
+ recordCase_ = 1;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ public Builder mergeDataChangeRecord(
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord value) {
+ if (dataChangeRecordBuilder_ == null) {
+ if (recordCase_ == 1
+ && record_
+ != com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance()) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.newBuilder(
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ record_ = value;
+ }
+ onChanged();
+ } else {
+ if (recordCase_ == 1) {
+ dataChangeRecordBuilder_.mergeFrom(value);
+ } else {
+ dataChangeRecordBuilder_.setMessage(value);
+ }
+ }
+ recordCase_ = 1;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ public Builder clearDataChangeRecord() {
+ if (dataChangeRecordBuilder_ == null) {
+ if (recordCase_ == 1) {
+ recordCase_ = 0;
+ record_ = null;
+ onChanged();
+ }
+ } else {
+ if (recordCase_ == 1) {
+ recordCase_ = 0;
+ record_ = null;
+ }
+ dataChangeRecordBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder
+ getDataChangeRecordBuilder() {
+ return getDataChangeRecordFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder
+ getDataChangeRecordOrBuilder() {
+ if ((recordCase_ == 1) && (dataChangeRecordBuilder_ != null)) {
+ return dataChangeRecordBuilder_.getMessageOrBuilder();
+ } else {
+ if (recordCase_ == 1) {
+ return (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder>
+ getDataChangeRecordFieldBuilder() {
+ if (dataChangeRecordBuilder_ == null) {
+ if (!(recordCase_ == 1)) {
+ record_ = com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.getDefaultInstance();
+ }
+ dataChangeRecordBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder>(
+ (com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord) record_,
+ getParentForChildren(),
+ isClean());
+ record_ = null;
+ }
+ recordCase_ = 1;
+ onChanged();
+ return dataChangeRecordBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder>
+ heartbeatRecordBuilder_;
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return Whether the heartbeatRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasHeartbeatRecord() {
+ return recordCase_ == 2;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return The heartbeatRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord getHeartbeatRecord() {
+ if (heartbeatRecordBuilder_ == null) {
+ if (recordCase_ == 2) {
+ return (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ } else {
+ if (recordCase_ == 2) {
+ return heartbeatRecordBuilder_.getMessage();
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ public Builder setHeartbeatRecord(
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord value) {
+ if (heartbeatRecordBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ record_ = value;
+ onChanged();
+ } else {
+ heartbeatRecordBuilder_.setMessage(value);
+ }
+ recordCase_ = 2;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ public Builder setHeartbeatRecord(
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder builderForValue) {
+ if (heartbeatRecordBuilder_ == null) {
+ record_ = builderForValue.build();
+ onChanged();
+ } else {
+ heartbeatRecordBuilder_.setMessage(builderForValue.build());
+ }
+ recordCase_ = 2;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ public Builder mergeHeartbeatRecord(
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord value) {
+ if (heartbeatRecordBuilder_ == null) {
+ if (recordCase_ == 2
+ && record_
+ != com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance()) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.newBuilder(
+ (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ record_ = value;
+ }
+ onChanged();
+ } else {
+ if (recordCase_ == 2) {
+ heartbeatRecordBuilder_.mergeFrom(value);
+ } else {
+ heartbeatRecordBuilder_.setMessage(value);
+ }
+ }
+ recordCase_ = 2;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ public Builder clearHeartbeatRecord() {
+ if (heartbeatRecordBuilder_ == null) {
+ if (recordCase_ == 2) {
+ recordCase_ = 0;
+ record_ = null;
+ onChanged();
+ }
+ } else {
+ if (recordCase_ == 2) {
+ recordCase_ = 0;
+ record_ = null;
+ }
+ heartbeatRecordBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder
+ getHeartbeatRecordBuilder() {
+ return getHeartbeatRecordFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder
+ getHeartbeatRecordOrBuilder() {
+ if ((recordCase_ == 2) && (heartbeatRecordBuilder_ != null)) {
+ return heartbeatRecordBuilder_.getMessageOrBuilder();
+ } else {
+ if (recordCase_ == 2) {
+ return (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder>
+ getHeartbeatRecordFieldBuilder() {
+ if (heartbeatRecordBuilder_ == null) {
+ if (!(recordCase_ == 2)) {
+ record_ = com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.getDefaultInstance();
+ }
+ heartbeatRecordBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder>(
+ (com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord) record_,
+ getParentForChildren(),
+ isClean());
+ record_ = null;
+ }
+ recordCase_ = 2;
+ onChanged();
+ return heartbeatRecordBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder>
+ partitionStartRecordBuilder_;
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return Whether the partitionStartRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionStartRecord() {
+ return recordCase_ == 3;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return The partitionStartRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord getPartitionStartRecord() {
+ if (partitionStartRecordBuilder_ == null) {
+ if (recordCase_ == 3) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ } else {
+ if (recordCase_ == 3) {
+ return partitionStartRecordBuilder_.getMessage();
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ public Builder setPartitionStartRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord value) {
+ if (partitionStartRecordBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ record_ = value;
+ onChanged();
+ } else {
+ partitionStartRecordBuilder_.setMessage(value);
+ }
+ recordCase_ = 3;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ public Builder setPartitionStartRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder builderForValue) {
+ if (partitionStartRecordBuilder_ == null) {
+ record_ = builderForValue.build();
+ onChanged();
+ } else {
+ partitionStartRecordBuilder_.setMessage(builderForValue.build());
+ }
+ recordCase_ = 3;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ public Builder mergePartitionStartRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord value) {
+ if (partitionStartRecordBuilder_ == null) {
+ if (recordCase_ == 3
+ && record_
+ != com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord
+ .getDefaultInstance()) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.newBuilder(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ record_ = value;
+ }
+ onChanged();
+ } else {
+ if (recordCase_ == 3) {
+ partitionStartRecordBuilder_.mergeFrom(value);
+ } else {
+ partitionStartRecordBuilder_.setMessage(value);
+ }
+ }
+ recordCase_ = 3;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ public Builder clearPartitionStartRecord() {
+ if (partitionStartRecordBuilder_ == null) {
+ if (recordCase_ == 3) {
+ recordCase_ = 0;
+ record_ = null;
+ onChanged();
+ }
+ } else {
+ if (recordCase_ == 3) {
+ recordCase_ = 0;
+ record_ = null;
+ }
+ partitionStartRecordBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder
+ getPartitionStartRecordBuilder() {
+ return getPartitionStartRecordFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder
+ getPartitionStartRecordOrBuilder() {
+ if ((recordCase_ == 3) && (partitionStartRecordBuilder_ != null)) {
+ return partitionStartRecordBuilder_.getMessageOrBuilder();
+ } else {
+ if (recordCase_ == 3) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder>
+ getPartitionStartRecordFieldBuilder() {
+ if (partitionStartRecordBuilder_ == null) {
+ if (!(recordCase_ == 3)) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.getDefaultInstance();
+ }
+ partitionStartRecordBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder>(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord) record_,
+ getParentForChildren(),
+ isClean());
+ record_ = null;
+ }
+ recordCase_ = 3;
+ onChanged();
+ return partitionStartRecordBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder>
+ partitionEndRecordBuilder_;
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ *
+ * @return Whether the partitionEndRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionEndRecord() {
+ return recordCase_ == 4;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ *
+ * @return The partitionEndRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord getPartitionEndRecord() {
+ if (partitionEndRecordBuilder_ == null) {
+ if (recordCase_ == 4) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ } else {
+ if (recordCase_ == 4) {
+ return partitionEndRecordBuilder_.getMessage();
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ public Builder setPartitionEndRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord value) {
+ if (partitionEndRecordBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ record_ = value;
+ onChanged();
+ } else {
+ partitionEndRecordBuilder_.setMessage(value);
+ }
+ recordCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ public Builder setPartitionEndRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder builderForValue) {
+ if (partitionEndRecordBuilder_ == null) {
+ record_ = builderForValue.build();
+ onChanged();
+ } else {
+ partitionEndRecordBuilder_.setMessage(builderForValue.build());
+ }
+ recordCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ public Builder mergePartitionEndRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord value) {
+ if (partitionEndRecordBuilder_ == null) {
+ if (recordCase_ == 4
+ && record_
+ != com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord
+ .getDefaultInstance()) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.newBuilder(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ record_ = value;
+ }
+ onChanged();
+ } else {
+ if (recordCase_ == 4) {
+ partitionEndRecordBuilder_.mergeFrom(value);
+ } else {
+ partitionEndRecordBuilder_.setMessage(value);
+ }
+ }
+ recordCase_ = 4;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ public Builder clearPartitionEndRecord() {
+ if (partitionEndRecordBuilder_ == null) {
+ if (recordCase_ == 4) {
+ recordCase_ = 0;
+ record_ = null;
+ onChanged();
+ }
+ } else {
+ if (recordCase_ == 4) {
+ recordCase_ = 0;
+ record_ = null;
+ }
+ partitionEndRecordBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder
+ getPartitionEndRecordBuilder() {
+ return getPartitionEndRecordFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder
+ getPartitionEndRecordOrBuilder() {
+ if ((recordCase_ == 4) && (partitionEndRecordBuilder_ != null)) {
+ return partitionEndRecordBuilder_.getMessageOrBuilder();
+ } else {
+ if (recordCase_ == 4) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder>
+ getPartitionEndRecordFieldBuilder() {
+ if (partitionEndRecordBuilder_ == null) {
+ if (!(recordCase_ == 4)) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.getDefaultInstance();
+ }
+ partitionEndRecordBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder>(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord) record_,
+ getParentForChildren(),
+ isClean());
+ record_ = null;
+ }
+ recordCase_ = 4;
+ onChanged();
+ return partitionEndRecordBuilder_;
+ }
+
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder>
+ partitionEventRecordBuilder_;
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return Whether the partitionEventRecord field is set.
+ */
+ @java.lang.Override
+ public boolean hasPartitionEventRecord() {
+ return recordCase_ == 5;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return The partitionEventRecord.
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord getPartitionEventRecord() {
+ if (partitionEventRecordBuilder_ == null) {
+ if (recordCase_ == 5) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ } else {
+ if (recordCase_ == 5) {
+ return partitionEventRecordBuilder_.getMessage();
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ public Builder setPartitionEventRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord value) {
+ if (partitionEventRecordBuilder_ == null) {
+ if (value == null) {
+ throw new NullPointerException();
+ }
+ record_ = value;
+ onChanged();
+ } else {
+ partitionEventRecordBuilder_.setMessage(value);
+ }
+ recordCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ public Builder setPartitionEventRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder builderForValue) {
+ if (partitionEventRecordBuilder_ == null) {
+ record_ = builderForValue.build();
+ onChanged();
+ } else {
+ partitionEventRecordBuilder_.setMessage(builderForValue.build());
+ }
+ recordCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ public Builder mergePartitionEventRecord(
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord value) {
+ if (partitionEventRecordBuilder_ == null) {
+ if (recordCase_ == 5
+ && record_
+ != com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord
+ .getDefaultInstance()) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.newBuilder(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_)
+ .mergeFrom(value)
+ .buildPartial();
+ } else {
+ record_ = value;
+ }
+ onChanged();
+ } else {
+ if (recordCase_ == 5) {
+ partitionEventRecordBuilder_.mergeFrom(value);
+ } else {
+ partitionEventRecordBuilder_.setMessage(value);
+ }
+ }
+ recordCase_ = 5;
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ public Builder clearPartitionEventRecord() {
+ if (partitionEventRecordBuilder_ == null) {
+ if (recordCase_ == 5) {
+ recordCase_ = 0;
+ record_ = null;
+ onChanged();
+ }
+ } else {
+ if (recordCase_ == 5) {
+ recordCase_ = 0;
+ record_ = null;
+ }
+ partitionEventRecordBuilder_.clear();
+ }
+ return this;
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder
+ getPartitionEventRecordBuilder() {
+ return getPartitionEventRecordFieldBuilder().getBuilder();
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ @java.lang.Override
+ public com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder
+ getPartitionEventRecordOrBuilder() {
+ if ((recordCase_ == 5) && (partitionEventRecordBuilder_ != null)) {
+ return partitionEventRecordBuilder_.getMessageOrBuilder();
+ } else {
+ if (recordCase_ == 5) {
+ return (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_;
+ }
+ return com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ }
+ }
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ private com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder>
+ getPartitionEventRecordFieldBuilder() {
+ if (partitionEventRecordBuilder_ == null) {
+ if (!(recordCase_ == 5)) {
+ record_ =
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.getDefaultInstance();
+ }
+ partitionEventRecordBuilder_ =
+ new com.google.protobuf.SingleFieldBuilderV3<
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord.Builder,
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder>(
+ (com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord) record_,
+ getParentForChildren(),
+ isClean());
+ record_ = null;
+ }
+ recordCase_ = 5;
+ onChanged();
+ return partitionEventRecordBuilder_;
+ }
+
+ @java.lang.Override
+ public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.setUnknownFields(unknownFields);
+ }
+
+ @java.lang.Override
+ public final Builder mergeUnknownFields(
+ final com.google.protobuf.UnknownFieldSet unknownFields) {
+ return super.mergeUnknownFields(unknownFields);
+ }
+
+ // @@protoc_insertion_point(builder_scope:google.spanner.v1.ChangeStreamRecord)
+ }
+
+ // @@protoc_insertion_point(class_scope:google.spanner.v1.ChangeStreamRecord)
+ private static final com.google.spanner.v1.ChangeStreamRecord DEFAULT_INSTANCE;
+
+ static {
+ DEFAULT_INSTANCE = new com.google.spanner.v1.ChangeStreamRecord();
+ }
+
+ public static com.google.spanner.v1.ChangeStreamRecord getDefaultInstance() {
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser+ * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return Whether the dataChangeRecord field is set.
+ */
+ boolean hasDataChangeRecord();
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ *
+ * @return The dataChangeRecord.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecord getDataChangeRecord();
+
+ /**
+ *
+ *
+ * + * Data change record describing a data change for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.DataChangeRecord data_change_record = 1;
+ */
+ com.google.spanner.v1.ChangeStreamRecord.DataChangeRecordOrBuilder getDataChangeRecordOrBuilder();
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return Whether the heartbeatRecord field is set.
+ */
+ boolean hasHeartbeatRecord();
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ *
+ * @return The heartbeatRecord.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord getHeartbeatRecord();
+
+ /**
+ *
+ *
+ * + * Heartbeat record describing a heartbeat for a change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.HeartbeatRecord heartbeat_record = 2;
+ */
+ com.google.spanner.v1.ChangeStreamRecord.HeartbeatRecordOrBuilder getHeartbeatRecordOrBuilder();
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return Whether the partitionStartRecord field is set.
+ */
+ boolean hasPartitionStartRecord();
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ *
+ * @return The partitionStartRecord.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord getPartitionStartRecord();
+
+ /**
+ *
+ *
+ * + * Partition start record describing a new change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionStartRecord partition_start_record = 3;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionStartRecordOrBuilder
+ getPartitionStartRecordOrBuilder();
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ * @return Whether the partitionEndRecord field is set.
+ */
+ boolean hasPartitionEndRecord();
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ *
+ * @return The partitionEndRecord.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord getPartitionEndRecord();
+
+ /**
+ *
+ *
+ * + * Partition end record describing a terminated change stream partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEndRecord partition_end_record = 4;
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEndRecordOrBuilder
+ getPartitionEndRecordOrBuilder();
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return Whether the partitionEventRecord field is set.
+ */
+ boolean hasPartitionEventRecord();
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ *
+ * @return The partitionEventRecord.
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord getPartitionEventRecord();
+
+ /**
+ *
+ *
+ * + * Partition event record describing key range changes for a change stream + * partition. + *+ * + *
.google.spanner.v1.ChangeStreamRecord.PartitionEventRecord partition_event_record = 5;
+ *
+ */
+ com.google.spanner.v1.ChangeStreamRecord.PartitionEventRecordOrBuilder
+ getPartitionEventRecordOrBuilder();
+
+ com.google.spanner.v1.ChangeStreamRecord.RecordCase getRecordCase();
+}
diff --git a/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto
new file mode 100644
index 00000000000..53c71078d0e
--- /dev/null
+++ b/proto-google-cloud-spanner-v1/src/main/proto/google/spanner/v1/change_stream.proto
@@ -0,0 +1,451 @@
+// Copyright 2025 Google LLC
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
+syntax = "proto3";
+
+package google.spanner.v1;
+
+import "google/protobuf/struct.proto";
+import "google/protobuf/timestamp.proto";
+import "google/spanner/v1/type.proto";
+
+option csharp_namespace = "Google.Cloud.Spanner.V1";
+option go_package = "cloud.google.com/go/spanner/apiv1/spannerpb;spannerpb";
+option java_multiple_files = true;
+option java_outer_classname = "ChangeStreamProto";
+option java_package = "com.google.spanner.v1";
+option php_namespace = "Google\\Cloud\\Spanner\\V1";
+option ruby_package = "Google::Cloud::Spanner::V1";
+
+// Spanner Change Streams enable customers to capture and stream out changes to
+// their Spanner databases in real-time. A change stream
+// can be created with option partition_mode='IMMUTABLE_KEY_RANGE' or
+// partition_mode='MUTABLE_KEY_RANGE'.
+//
+// This message is only used in Change Streams created with the option
+// partition_mode='MUTABLE_KEY_RANGE'. Spanner automatically creates a special
+// Table-Valued Function (TVF) along with each Change Streams. The function
+// provides access to the change stream's records. The function is named
+// READ_