diff --git a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java index c3090f67d..f5dfe6990 100644 --- a/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java +++ b/google-cloud-pubsub/src/main/java/com/google/cloud/pubsub/v1/SubscriptionAdminClient.java @@ -488,6 +488,7 @@ public final Subscription createSubscription( * .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) * .setRetryPolicy(RetryPolicy.newBuilder().build()) * .setDetached(true) + * .setEnableExactlyOnceDelivery(true) * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .build(); * Subscription response = subscriptionAdminClient.createSubscription(request); @@ -743,6 +744,7 @@ public final Subscription createSubscription( * .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) * .setRetryPolicy(RetryPolicy.newBuilder().build()) * .setDetached(true) + * .setEnableExactlyOnceDelivery(true) * .setTopicMessageRetentionDuration(Duration.newBuilder().build()) * .build(); * ApiFuture future = diff --git a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java index 9d53a7554..4fef8c98c 100644 --- a/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java +++ b/google-cloud-pubsub/src/test/java/com/google/cloud/pubsub/v1/SubscriptionAdminClientTest.java @@ -149,6 +149,7 @@ public void createSubscriptionTest() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -210,6 +211,7 @@ public void createSubscriptionTest2() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -271,6 +273,7 @@ public void createSubscriptionTest3() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -332,6 +335,7 @@ public void createSubscriptionTest4() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -393,6 +397,7 @@ public void getSubscriptionTest() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -444,6 +449,7 @@ public void getSubscriptionTest2() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -495,6 +501,7 @@ public void updateSubscriptionTest() throws Exception { .setDeadLetterPolicy(DeadLetterPolicy.newBuilder().build()) .setRetryPolicy(RetryPolicy.newBuilder().build()) .setDetached(true) + .setEnableExactlyOnceDelivery(true) .setTopicMessageRetentionDuration(Duration.newBuilder().build()) .build(); mockSubscriber.addResponse(expectedResponse); @@ -1015,6 +1022,10 @@ public void streamingPullTest() throws Exception { StreamingPullResponse expectedResponse = StreamingPullResponse.newBuilder() .addAllReceivedMessages(new ArrayList()) + .setAcknowledgeConfirmation( + StreamingPullResponse.AcknowledgeConfirmation.newBuilder().build()) + .setModifyAckDeadlineConfirmation( + StreamingPullResponse.ModifyAckDeadlineConfirmation.newBuilder().build()) .setSubscriptionProperties( StreamingPullResponse.SubscriptionProperties.newBuilder().build()) .build(); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java index 1404e218e..9875c7fe8 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/PubsubProto.java @@ -187,6 +187,14 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_pubsub_v1_StreamingPullResponse_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable; + static final com.google.protobuf.Descriptors.Descriptor + internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; + static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -304,7 +312,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "is.com/Topic\"]\n\031DetachSubscriptionReques" + "t\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub." + "googleapis.com/Subscription\"\034\n\032DetachSub" - + "scriptionResponse\"\212\006\n\014Subscription\022\021\n\004na" + + "scriptionResponse\"\260\006\n\014Subscription\022\021\n\004na" + "me\030\001 \001(\tB\003\340A\002\0222\n\005topic\030\002 \001(\tB#\340A\002\372A\035\n\033pu" + "bsub.googleapis.com/Topic\0221\n\013push_config" + "\030\004 \001(\0132\034.google.pubsub.v1.PushConfig\022\034\n\024" @@ -318,215 +326,227 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "filter\030\014 \001(\t\022>\n\022dead_letter_policy\030\r \001(\013" + "2\".google.pubsub.v1.DeadLetterPolicy\0223\n\014" + "retry_policy\030\016 \001(\0132\035.google.pubsub.v1.Re" - + "tryPolicy\022\020\n\010detached\030\017 \001(\010\022H\n topic_mes" - + "sage_retention_duration\030\021 \001(\0132\031.google.p" - + "rotobuf.DurationB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003" - + "key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU\n\"pubsu" - + "b.googleapis.com/Subscription\022/projects/" - + "{project}/subscriptions/{subscription}\"u" - + "\n\013RetryPolicy\0222\n\017minimum_backoff\030\001 \001(\0132\031" - + ".google.protobuf.Duration\0222\n\017maximum_bac" - + "koff\030\002 \001(\0132\031.google.protobuf.Duration\"L\n" - + "\020DeadLetterPolicy\022\031\n\021dead_letter_topic\030\001" - + " \001(\t\022\035\n\025max_delivery_attempts\030\002 \001(\005\":\n\020E" - + "xpirationPolicy\022&\n\003ttl\030\001 \001(\0132\031.google.pr" - + "otobuf.Duration\"\255\002\n\nPushConfig\022\025\n\rpush_e" - + "ndpoint\030\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.goog" - + "le.pubsub.v1.PushConfig.AttributesEntry\022" - + "<\n\noidc_token\030\003 \001(\0132&.google.pubsub.v1.P" - + "ushConfig.OidcTokenH\000\032<\n\tOidcToken\022\035\n\025se" - + "rvice_account_email\030\001 \001(\t\022\020\n\010audience\030\002 " - + "\001(\t\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" - + "alue\030\002 \001(\t:\0028\001B\027\n\025authentication_method\"" - + "m\n\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007me" - + "ssage\030\002 \001(\0132\037.google.pubsub.v1.PubsubMes" - + "sage\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n\026GetSub" - + "scriptionRequest\022@\n\014subscription\030\001 \001(\tB*" - + "\340A\002\372A$\n\"pubsub.googleapis.com/Subscripti" - + "on\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014subs" - + "cription\030\001 \001(\0132\036.google.pubsub.v1.Subscr" - + "iptionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" - + "e.protobuf.FieldMaskB\003\340A\002\"\207\001\n\030ListSubscr" - + "iptionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n" - + "+cloudresourcemanager.googleapis.com/Pro" - + "ject\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 " - + "\001(\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubs" - + "criptions\030\001 \003(\0132\036.google.pubsub.v1.Subsc" - + "ription\022\027\n\017next_page_token\030\002 \001(\t\"]\n\031Dele" - + "teSubscriptionRequest\022@\n\014subscription\030\001 " - + "\001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subsc" - + "ription\"\223\001\n\027ModifyPushConfigRequest\022@\n\014s" - + "ubscription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.google" - + "apis.com/Subscription\0226\n\013push_config\030\002 \001" - + "(\0132\034.google.pubsub.v1.PushConfigB\003\340A\002\"\215\001" - + "\n\013PullRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002" - + "\372A$\n\"pubsub.googleapis.com/Subscription\022" - + "!\n\022return_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014ma" - + "x_messages\030\003 \001(\005B\003\340A\002\"L\n\014PullResponse\022<\n" - + "\021received_messages\030\001 \003(\0132!.google.pubsub" - + ".v1.ReceivedMessage\"\225\001\n\030ModifyAckDeadlin" - + "eRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"" - + "pubsub.googleapis.com/Subscription\022\024\n\007ac" - + "k_ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadline_seconds" - + "\030\003 \001(\005B\003\340A\002\"l\n\022AcknowledgeRequest\022@\n\014sub" + + "tryPolicy\022\020\n\010detached\030\017 \001(\010\022$\n\034enable_ex" + + "actly_once_delivery\030\020 \001(\010\022H\n topic_messa" + + "ge_retention_duration\030\021 \001(\0132\031.google.pro" + + "tobuf.DurationB\003\340A\003\032-\n\013LabelsEntry\022\013\n\003ke" + + "y\030\001 \001(\t\022\r\n\005value\030\002 \001(\t:\0028\001:X\352AU\n\"pubsub." + + "googleapis.com/Subscription\022/projects/{p" + + "roject}/subscriptions/{subscription}\"u\n\013" + + "RetryPolicy\0222\n\017minimum_backoff\030\001 \001(\0132\031.g" + + "oogle.protobuf.Duration\0222\n\017maximum_backo" + + "ff\030\002 \001(\0132\031.google.protobuf.Duration\"L\n\020D" + + "eadLetterPolicy\022\031\n\021dead_letter_topic\030\001 \001" + + "(\t\022\035\n\025max_delivery_attempts\030\002 \001(\005\":\n\020Exp" + + "irationPolicy\022&\n\003ttl\030\001 \001(\0132\031.google.prot" + + "obuf.Duration\"\255\002\n\nPushConfig\022\025\n\rpush_end" + + "point\030\001 \001(\t\022@\n\nattributes\030\002 \003(\0132,.google" + + ".pubsub.v1.PushConfig.AttributesEntry\022<\n" + + "\noidc_token\030\003 \001(\0132&.google.pubsub.v1.Pus" + + "hConfig.OidcTokenH\000\032<\n\tOidcToken\022\035\n\025serv" + + "ice_account_email\030\001 \001(\t\022\020\n\010audience\030\002 \001(" + + "\t\0321\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005val" + + "ue\030\002 \001(\t:\0028\001B\027\n\025authentication_method\"m\n" + + "\017ReceivedMessage\022\016\n\006ack_id\030\001 \001(\t\0220\n\007mess" + + "age\030\002 \001(\0132\037.google.pubsub.v1.PubsubMessa" + + "ge\022\030\n\020delivery_attempt\030\003 \001(\005\"Z\n\026GetSubsc" + + "riptionRequest\022@\n\014subscription\030\001 \001(\tB*\340A" + + "\002\372A$\n\"pubsub.googleapis.com/Subscription" + + "\"\214\001\n\031UpdateSubscriptionRequest\0229\n\014subscr" + + "iption\030\001 \001(\0132\036.google.pubsub.v1.Subscrip" + + "tionB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google." + + "protobuf.FieldMaskB\003\340A\002\"\207\001\n\030ListSubscrip" + + "tionsRequest\022D\n\007project\030\001 \001(\tB3\340A\002\372A-\n+c" + + "loudresourcemanager.googleapis.com/Proje" + + "ct\022\021\n\tpage_size\030\002 \001(\005\022\022\n\npage_token\030\003 \001(" + + "\t\"k\n\031ListSubscriptionsResponse\0225\n\rsubscr" + + "iptions\030\001 \003(\0132\036.google.pubsub.v1.Subscri" + + "ption\022\027\n\017next_page_token\030\002 \001(\t\"]\n\031Delete" + + "SubscriptionRequest\022@\n\014subscription\030\001 \001(" + + "\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subscri" + + "ption\"\223\001\n\027ModifyPushConfigRequest\022@\n\014sub" + "scription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleap" - + "is.com/Subscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A" - + "\002\"\251\002\n\024StreamingPullRequest\022@\n\014subscripti" - + "on\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/" - + "Subscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027modify_" - + "deadline_seconds\030\003 \003(\005\022\037\n\027modify_deadlin" - + "e_ack_ids\030\004 \003(\t\022(\n\033stream_ack_deadline_s" - + "econds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 \001(\t\022 \n\030" - + "max_outstanding_messages\030\007 \001(\003\022\035\n\025max_ou" - + "tstanding_bytes\030\010 \001(\003\"\362\001\n\025StreamingPullR" - + "esponse\022<\n\021received_messages\030\001 \003(\0132!.goo" - + "gle.pubsub.v1.ReceivedMessage\022_\n\027subscri" - + "ption_properties\030\004 \001(\0132>.google.pubsub.v" - + "1.StreamingPullResponse.SubscriptionProp" - + "erties\032:\n\026SubscriptionProperties\022 \n\030mess" - + "age_ordering_enabled\030\002 \001(\010\"\203\002\n\025CreateSna" - + "pshotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A \n\036pubs" - + "ub.googleapis.com/Snapshot\022@\n\014subscripti" - + "on\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/" - + "Subscription\022C\n\006labels\030\003 \003(\01323.google.pu" - + "bsub.v1.CreateSnapshotRequest.LabelsEntr" - + "y\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002" - + " \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest\0221\n\010sn" - + "apshot\030\001 \001(\0132\032.google.pubsub.v1.Snapshot" - + "B\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.google.prot" - + "obuf.FieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014\n\004name" - + "\030\001 \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub.googl" - + "eapis.com/Topic\022/\n\013expire_time\030\003 \001(\0132\032.g" - + "oogle.protobuf.Timestamp\0226\n\006labels\030\004 \003(\013" - + "2&.google.pubsub.v1.Snapshot.LabelsEntry" - + "\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " - + "\001(\t:\0028\001:L\352AI\n\036pubsub.googleapis.com/Snap" - + "shot\022\'projects/{project}/snapshots/{snap" - + "shot}\"N\n\022GetSnapshotRequest\0228\n\010snapshot\030" + + "is.com/Subscription\0226\n\013push_config\030\002 \001(\013" + + "2\034.google.pubsub.v1.PushConfigB\003\340A\002\"\215\001\n\013" + + "PullRequest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A" + + "$\n\"pubsub.googleapis.com/Subscription\022!\n" + + "\022return_immediately\030\002 \001(\010B\005\030\001\340A\001\022\031\n\014max_" + + "messages\030\003 \001(\005B\003\340A\002\"L\n\014PullResponse\022<\n\021r" + + "eceived_messages\030\001 \003(\0132!.google.pubsub.v" + + "1.ReceivedMessage\"\225\001\n\030ModifyAckDeadlineR" + + "equest\022@\n\014subscription\030\001 \001(\tB*\340A\002\372A$\n\"pu" + + "bsub.googleapis.com/Subscription\022\024\n\007ack_" + + "ids\030\004 \003(\tB\003\340A\002\022!\n\024ack_deadline_seconds\030\003" + + " \001(\005B\003\340A\002\"l\n\022AcknowledgeRequest\022@\n\014subsc" + + "ription\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis" + + ".com/Subscription\022\024\n\007ack_ids\030\002 \003(\tB\003\340A\002\"" + + "\251\002\n\024StreamingPullRequest\022@\n\014subscription" + + "\030\001 \001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Su" + + "bscription\022\017\n\007ack_ids\030\002 \003(\t\022\037\n\027modify_de" + + "adline_seconds\030\003 \003(\005\022\037\n\027modify_deadline_" + + "ack_ids\030\004 \003(\t\022(\n\033stream_ack_deadline_sec" + + "onds\030\005 \001(\005B\003\340A\002\022\021\n\tclient_id\030\006 \001(\t\022 \n\030ma" + + "x_outstanding_messages\030\007 \001(\003\022\035\n\025max_outs" + + "tanding_bytes\030\010 \001(\003\"\262\005\n\025StreamingPullRes" + + "ponse\022<\n\021received_messages\030\001 \003(\0132!.googl" + + "e.pubsub.v1.ReceivedMessage\022a\n\030acknowled" + + "ge_confirmation\030\005 \001(\0132?.google.pubsub.v1" + + ".StreamingPullResponse.AcknowledgeConfir" + + "mation\022o\n modify_ack_deadline_confirmati" + + "on\030\003 \001(\0132E.google.pubsub.v1.StreamingPul" + + "lResponse.ModifyAckDeadlineConfirmation\022" + + "_\n\027subscription_properties\030\004 \001(\0132>.googl" + + "e.pubsub.v1.StreamingPullResponse.Subscr" + + "iptionProperties\032j\n\027AcknowledgeConfirmat" + + "ion\022\023\n\007ack_ids\030\001 \003(\tB\002\010\001\022\033\n\017invalid_ack_" + + "ids\030\002 \003(\tB\002\010\001\022\035\n\021unordered_ack_ids\030\003 \003(\t" + + "B\002\010\001\032Q\n\035ModifyAckDeadlineConfirmation\022\023\n" + + "\007ack_ids\030\001 \003(\tB\002\010\001\022\033\n\017invalid_ack_ids\030\002 " + + "\003(\tB\002\010\001\032a\n\026SubscriptionProperties\022%\n\035exa" + + "ctly_once_delivery_enabled\030\001 \001(\010\022 \n\030mess" + + "age_ordering_enabled\030\002 \001(\010J\004\010\002\020\003\"\203\002\n\025Cre" + + "ateSnapshotRequest\0224\n\004name\030\001 \001(\tB&\340A\002\372A " + + "\n\036pubsub.googleapis.com/Snapshot\022@\n\014subs" + + "cription\030\002 \001(\tB*\340A\002\372A$\n\"pubsub.googleapi" + + "s.com/Subscription\022C\n\006labels\030\003 \003(\01323.goo" + + "gle.pubsub.v1.CreateSnapshotRequest.Labe" + + "lsEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005v" + + "alue\030\002 \001(\t:\0028\001\"\200\001\n\025UpdateSnapshotRequest" + + "\0221\n\010snapshot\030\001 \001(\0132\032.google.pubsub.v1.Sn" + + "apshotB\003\340A\002\0224\n\013update_mask\030\002 \001(\0132\032.googl" + + "e.protobuf.FieldMaskB\003\340A\002\"\257\002\n\010Snapshot\022\014" + + "\n\004name\030\001 \001(\t\022/\n\005topic\030\002 \001(\tB \372A\035\n\033pubsub" + + ".googleapis.com/Topic\022/\n\013expire_time\030\003 \001" + + "(\0132\032.google.protobuf.Timestamp\0226\n\006labels" + + "\030\004 \003(\0132&.google.pubsub.v1.Snapshot.Label" + + "sEntry\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005va" + + "lue\030\002 \001(\t:\0028\001:L\352AI\n\036pubsub.googleapis.co" + + "m/Snapshot\022\'projects/{project}/snapshots" + + "/{snapshot}\"N\n\022GetSnapshotRequest\0228\n\010sna" + + "pshot\030\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.c" + + "om/Snapshot\"\203\001\n\024ListSnapshotsRequest\022D\n\007" + + "project\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemana" + + "ger.googleapis.com/Project\022\021\n\tpage_size\030" + + "\002 \001(\005\022\022\n\npage_token\030\003 \001(\t\"_\n\025ListSnapsho" + + "tsResponse\022-\n\tsnapshots\030\001 \003(\0132\032.google.p" + + "ubsub.v1.Snapshot\022\027\n\017next_page_token\030\002 \001" + + "(\t\"Q\n\025DeleteSnapshotRequest\0228\n\010snapshot\030" + "\001 \001(\tB&\340A\002\372A \n\036pubsub.googleapis.com/Sna" - + "pshot\"\203\001\n\024ListSnapshotsRequest\022D\n\007projec" - + "t\030\001 \001(\tB3\340A\002\372A-\n+cloudresourcemanager.go" - + "ogleapis.com/Project\022\021\n\tpage_size\030\002 \001(\005\022" - + "\022\n\npage_token\030\003 \001(\t\"_\n\025ListSnapshotsResp" - + "onse\022-\n\tsnapshots\030\001 \003(\0132\032.google.pubsub." - + "v1.Snapshot\022\027\n\017next_page_token\030\002 \001(\t\"Q\n\025" - + "DeleteSnapshotRequest\0228\n\010snapshot\030\001 \001(\tB" - + "&\340A\002\372A \n\036pubsub.googleapis.com/Snapshot\"" - + "\276\001\n\013SeekRequest\022@\n\014subscription\030\001 \001(\tB*\340" - + "A\002\372A$\n\"pubsub.googleapis.com/Subscriptio" - + "n\022*\n\004time\030\002 \001(\0132\032.google.protobuf.Timest" - + "ampH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036pubsub.goo" - + "gleapis.com/SnapshotH\000B\010\n\006target\"\016\n\014Seek" - + "Response2\243\013\n\tPublisher\022q\n\013CreateTopic\022\027." - + "google.pubsub.v1.Topic\032\027.google.pubsub.v" - + "1.Topic\"0\202\323\344\223\002#\032\036/v1/{name=projects/*/to" - + "pics/*}:\001*\332A\004name\022}\n\013UpdateTopic\022$.googl" - + "e.pubsub.v1.UpdateTopicRequest\032\027.google." - + "pubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topic.name" - + "=projects/*/topics/*}:\001*\022\223\001\n\007Publish\022 .g" - + "oogle.pubsub.v1.PublishRequest\032!.google." - + "pubsub.v1.PublishResponse\"C\202\323\344\223\002,\"\'/v1/{" - + "topic=projects/*/topics/*}:publish:\001*\332A\016" - + "topic,messages\022w\n\010GetTopic\022!.google.pubs" - + "ub.v1.GetTopicRequest\032\027.google.pubsub.v1" - + ".Topic\"/\202\323\344\223\002!\022\037/v1/{topic=projects/*/to" - + "pics/*}\332A\005topic\022\212\001\n\nListTopics\022#.google." - + "pubsub.v1.ListTopicsRequest\032$.google.pub" - + "sub.v1.ListTopicsResponse\"1\202\323\344\223\002!\022\037/v1/{" - + "project=projects/*}/topics\332A\007project\022\272\001\n" - + "\026ListTopicSubscriptions\022/.google.pubsub." - + "v1.ListTopicSubscriptionsRequest\0320.googl" - + "e.pubsub.v1.ListTopicSubscriptionsRespon" - + "se\"=\202\323\344\223\002/\022-/v1/{topic=projects/*/topics" - + "/*}/subscriptions\332A\005topic\022\252\001\n\022ListTopicS" - + "napshots\022+.google.pubsub.v1.ListTopicSna" - + "pshotsRequest\032,.google.pubsub.v1.ListTop" - + "icSnapshotsResponse\"9\202\323\344\223\002+\022)/v1/{topic=" - + "projects/*/topics/*}/snapshots\332A\005topic\022|" - + "\n\013DeleteTopic\022$.google.pubsub.v1.DeleteT" - + "opicRequest\032\026.google.protobuf.Empty\"/\202\323\344" - + "\223\002!*\037/v1/{topic=projects/*/topics/*}\332A\005t" - + "opic\022\255\001\n\022DetachSubscription\022+.google.pub" - + "sub.v1.DetachSubscriptionRequest\032,.googl" - + "e.pubsub.v1.DetachSubscriptionResponse\"<" - + "\202\323\344\223\0026\"4/v1/{subscription=projects/*/sub" - + "scriptions/*}:detach\032p\312A\025pubsub.googleap" - + "is.com\322AUhttps://www.googleapis.com/auth" - + "/cloud-platform,https://www.googleapis.c" - + "om/auth/pubsub2\240\025\n\nSubscriber\022\264\001\n\022Create" - + "Subscription\022\036.google.pubsub.v1.Subscrip" - + "tion\032\036.google.pubsub.v1.Subscription\"^\202\323" - + "\344\223\002*\032%/v1/{name=projects/*/subscriptions" - + "/*}:\001*\332A+name,topic,push_config,ack_dead" - + "line_seconds\022\241\001\n\017GetSubscription\022(.googl" - + "e.pubsub.v1.GetSubscriptionRequest\032\036.goo" - + "gle.pubsub.v1.Subscription\"D\202\323\344\223\002/\022-/v1/" - + "{subscription=projects/*/subscriptions/*" - + "}\332A\014subscription\022\240\001\n\022UpdateSubscription\022" - + "+.google.pubsub.v1.UpdateSubscriptionReq" - + "uest\032\036.google.pubsub.v1.Subscription\"=\202\323" - + "\344\223\002722/v1/{subscription.name=projects/*/" - + "subscriptions/*}:\001*\022\246\001\n\021ListSubscription" - + "s\022*.google.pubsub.v1.ListSubscriptionsRe" - + "quest\032+.google.pubsub.v1.ListSubscriptio" - + "nsResponse\"8\202\323\344\223\002(\022&/v1/{project=project" - + "s/*}/subscriptions\332A\007project\022\237\001\n\022DeleteS" - + "ubscription\022+.google.pubsub.v1.DeleteSub" - + "scriptionRequest\032\026.google.protobuf.Empty" - + "\"D\202\323\344\223\002/*-/v1/{subscription=projects/*/s" - + "ubscriptions/*}\332A\014subscription\022\317\001\n\021Modif" - + "yAckDeadline\022*.google.pubsub.v1.ModifyAc" - + "kDeadlineRequest\032\026.google.protobuf.Empty" - + "\"v\202\323\344\223\002D\"?/v1/{subscription=projects/*/s" - + "ubscriptions/*}:modifyAckDeadline:\001*\332A)s" - + "ubscription,ack_ids,ack_deadline_seconds" - + "\022\250\001\n\013Acknowledge\022$.google.pubsub.v1.Ackn" - + "owledgeRequest\032\026.google.protobuf.Empty\"[" - + "\202\323\344\223\002>\"9/v1/{subscription=projects/*/sub" - + "scriptions/*}:acknowledge:\001*\332A\024subscript" - + "ion,ack_ids\022\320\001\n\004Pull\022\035.google.pubsub.v1." - + "PullRequest\032\036.google.pubsub.v1.PullRespo" - + "nse\"\210\001\202\323\344\223\0027\"2/v1/{subscription=projects" - + "/*/subscriptions/*}:pull:\001*\332A,subscripti" - + "on,return_immediately,max_messages\332A\031sub" - + "scription,max_messages\022f\n\rStreamingPull\022" - + "&.google.pubsub.v1.StreamingPullRequest\032" - + "\'.google.pubsub.v1.StreamingPullResponse" - + "\"\000(\0010\001\022\273\001\n\020ModifyPushConfig\022).google.pub" - + "sub.v1.ModifyPushConfigRequest\032\026.google." - + "protobuf.Empty\"d\202\323\344\223\002C\">/v1/{subscriptio" - + "n=projects/*/subscriptions/*}:modifyPush" - + "Config:\001*\332A\030subscription,push_config\022\211\001\n" - + "\013GetSnapshot\022$.google.pubsub.v1.GetSnaps" - + "hotRequest\032\032.google.pubsub.v1.Snapshot\"8" - + "\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/snapsho" - + "ts/*}\332A\010snapshot\022\226\001\n\rListSnapshots\022&.goo" - + "gle.pubsub.v1.ListSnapshotsRequest\032\'.goo" - + "gle.pubsub.v1.ListSnapshotsResponse\"4\202\323\344" - + "\223\002$\022\"/v1/{project=projects/*}/snapshots\332" - + "A\007project\022\227\001\n\016CreateSnapshot\022\'.google.pu" - + "bsub.v1.CreateSnapshotRequest\032\032.google.p" - + "ubsub.v1.Snapshot\"@\202\323\344\223\002&\032!/v1/{name=pro" - + "jects/*/snapshots/*}:\001*\332A\021name,subscript" - + "ion\022\214\001\n\016UpdateSnapshot\022\'.google.pubsub.v" - + "1.UpdateSnapshotRequest\032\032.google.pubsub." - + "v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapshot.name=" - + "projects/*/snapshots/*}:\001*\022\213\001\n\016DeleteSna" - + "pshot\022\'.google.pubsub.v1.DeleteSnapshotR" - + "equest\032\026.google.protobuf.Empty\"8\202\323\344\223\002\'*%" - + "/v1/{snapshot=projects/*/snapshots/*}\332A\010" - + "snapshot\022\204\001\n\004Seek\022\035.google.pubsub.v1.See" - + "kRequest\032\036.google.pubsub.v1.SeekResponse" - + "\"=\202\323\344\223\0027\"2/v1/{subscription=projects/*/s" - + "ubscriptions/*}:seek:\001*\032p\312A\025pubsub.googl" - + "eapis.com\322AUhttps://www.googleapis.com/a" - + "uth/cloud-platform,https://www.googleapi" - + "s.com/auth/pubsubB\256\001\n\024com.google.pubsub." - + "v1B\013PubsubProtoP\001Z6google.golang.org/gen" - + "proto/googleapis/pubsub/v1;pubsub\370\001\001\252\002\026G" - + "oogle.Cloud.PubSub.V1\312\002\026Google\\Cloud\\Pub" - + "Sub\\V1\352\002\031Google::Cloud::PubSub::V1b\006prot" - + "o3" + + "pshot\"\276\001\n\013SeekRequest\022@\n\014subscription\030\001 " + + "\001(\tB*\340A\002\372A$\n\"pubsub.googleapis.com/Subsc" + + "ription\022*\n\004time\030\002 \001(\0132\032.google.protobuf." + + "TimestampH\000\0227\n\010snapshot\030\003 \001(\tB#\372A \n\036pubs" + + "ub.googleapis.com/SnapshotH\000B\010\n\006target\"\016" + + "\n\014SeekResponse2\243\013\n\tPublisher\022q\n\013CreateTo" + + "pic\022\027.google.pubsub.v1.Topic\032\027.google.pu" + + "bsub.v1.Topic\"0\202\323\344\223\002#\032\036/v1/{name=project" + + "s/*/topics/*}:\001*\332A\004name\022}\n\013UpdateTopic\022$" + + ".google.pubsub.v1.UpdateTopicRequest\032\027.g" + + "oogle.pubsub.v1.Topic\"/\202\323\344\223\002)2$/v1/{topi" + + "c.name=projects/*/topics/*}:\001*\022\223\001\n\007Publi" + + "sh\022 .google.pubsub.v1.PublishRequest\032!.g" + + "oogle.pubsub.v1.PublishResponse\"C\202\323\344\223\002,\"" + + "\'/v1/{topic=projects/*/topics/*}:publish" + + ":\001*\332A\016topic,messages\022w\n\010GetTopic\022!.googl" + + "e.pubsub.v1.GetTopicRequest\032\027.google.pub" + + "sub.v1.Topic\"/\202\323\344\223\002!\022\037/v1/{topic=project" + + "s/*/topics/*}\332A\005topic\022\212\001\n\nListTopics\022#.g" + + "oogle.pubsub.v1.ListTopicsRequest\032$.goog" + + "le.pubsub.v1.ListTopicsResponse\"1\202\323\344\223\002!\022" + + "\037/v1/{project=projects/*}/topics\332A\007proje" + + "ct\022\272\001\n\026ListTopicSubscriptions\022/.google.p" + + "ubsub.v1.ListTopicSubscriptionsRequest\0320" + + ".google.pubsub.v1.ListTopicSubscriptions" + + "Response\"=\202\323\344\223\002/\022-/v1/{topic=projects/*/" + + "topics/*}/subscriptions\332A\005topic\022\252\001\n\022List" + + "TopicSnapshots\022+.google.pubsub.v1.ListTo" + + "picSnapshotsRequest\032,.google.pubsub.v1.L" + + "istTopicSnapshotsResponse\"9\202\323\344\223\002+\022)/v1/{" + + "topic=projects/*/topics/*}/snapshots\332A\005t" + + "opic\022|\n\013DeleteTopic\022$.google.pubsub.v1.D" + + "eleteTopicRequest\032\026.google.protobuf.Empt" + + "y\"/\202\323\344\223\002!*\037/v1/{topic=projects/*/topics/" + + "*}\332A\005topic\022\255\001\n\022DetachSubscription\022+.goog" + + "le.pubsub.v1.DetachSubscriptionRequest\032," + + ".google.pubsub.v1.DetachSubscriptionResp" + + "onse\"<\202\323\344\223\0026\"4/v1/{subscription=projects" + + "/*/subscriptions/*}:detach\032p\312A\025pubsub.go" + + "ogleapis.com\322AUhttps://www.googleapis.co" + + "m/auth/cloud-platform,https://www.google" + + "apis.com/auth/pubsub2\240\025\n\nSubscriber\022\264\001\n\022" + + "CreateSubscription\022\036.google.pubsub.v1.Su" + + "bscription\032\036.google.pubsub.v1.Subscripti" + + "on\"^\202\323\344\223\002*\032%/v1/{name=projects/*/subscri" + + "ptions/*}:\001*\332A+name,topic,push_config,ac" + + "k_deadline_seconds\022\241\001\n\017GetSubscription\022(" + + ".google.pubsub.v1.GetSubscriptionRequest" + + "\032\036.google.pubsub.v1.Subscription\"D\202\323\344\223\002/" + + "\022-/v1/{subscription=projects/*/subscript" + + "ions/*}\332A\014subscription\022\240\001\n\022UpdateSubscri" + + "ption\022+.google.pubsub.v1.UpdateSubscript" + + "ionRequest\032\036.google.pubsub.v1.Subscripti" + + "on\"=\202\323\344\223\002722/v1/{subscription.name=proje" + + "cts/*/subscriptions/*}:\001*\022\246\001\n\021ListSubscr" + + "iptions\022*.google.pubsub.v1.ListSubscript" + + "ionsRequest\032+.google.pubsub.v1.ListSubsc" + + "riptionsResponse\"8\202\323\344\223\002(\022&/v1/{project=p" + + "rojects/*}/subscriptions\332A\007project\022\237\001\n\022D" + + "eleteSubscription\022+.google.pubsub.v1.Del" + + "eteSubscriptionRequest\032\026.google.protobuf" + + ".Empty\"D\202\323\344\223\002/*-/v1/{subscription=projec" + + "ts/*/subscriptions/*}\332A\014subscription\022\317\001\n" + + "\021ModifyAckDeadline\022*.google.pubsub.v1.Mo" + + "difyAckDeadlineRequest\032\026.google.protobuf" + + ".Empty\"v\202\323\344\223\002D\"?/v1/{subscription=projec" + + "ts/*/subscriptions/*}:modifyAckDeadline:" + + "\001*\332A)subscription,ack_ids,ack_deadline_s" + + "econds\022\250\001\n\013Acknowledge\022$.google.pubsub.v" + + "1.AcknowledgeRequest\032\026.google.protobuf.E" + + "mpty\"[\202\323\344\223\002>\"9/v1/{subscription=projects" + + "/*/subscriptions/*}:acknowledge:\001*\332A\024sub" + + "scription,ack_ids\022\320\001\n\004Pull\022\035.google.pubs" + + "ub.v1.PullRequest\032\036.google.pubsub.v1.Pul" + + "lResponse\"\210\001\202\323\344\223\0027\"2/v1/{subscription=pr" + + "ojects/*/subscriptions/*}:pull:\001*\332A,subs" + + "cription,return_immediately,max_messages" + + "\332A\031subscription,max_messages\022f\n\rStreamin" + + "gPull\022&.google.pubsub.v1.StreamingPullRe" + + "quest\032\'.google.pubsub.v1.StreamingPullRe" + + "sponse\"\000(\0010\001\022\273\001\n\020ModifyPushConfig\022).goog" + + "le.pubsub.v1.ModifyPushConfigRequest\032\026.g" + + "oogle.protobuf.Empty\"d\202\323\344\223\002C\">/v1/{subsc" + + "ription=projects/*/subscriptions/*}:modi" + + "fyPushConfig:\001*\332A\030subscription,push_conf" + + "ig\022\211\001\n\013GetSnapshot\022$.google.pubsub.v1.Ge" + + "tSnapshotRequest\032\032.google.pubsub.v1.Snap" + + "shot\"8\202\323\344\223\002\'\022%/v1/{snapshot=projects/*/s" + + "napshots/*}\332A\010snapshot\022\226\001\n\rListSnapshots" + + "\022&.google.pubsub.v1.ListSnapshotsRequest" + + "\032\'.google.pubsub.v1.ListSnapshotsRespons" + + "e\"4\202\323\344\223\002$\022\"/v1/{project=projects/*}/snap" + + "shots\332A\007project\022\227\001\n\016CreateSnapshot\022\'.goo" + + "gle.pubsub.v1.CreateSnapshotRequest\032\032.go" + + "ogle.pubsub.v1.Snapshot\"@\202\323\344\223\002&\032!/v1/{na" + + "me=projects/*/snapshots/*}:\001*\332A\021name,sub" + + "scription\022\214\001\n\016UpdateSnapshot\022\'.google.pu" + + "bsub.v1.UpdateSnapshotRequest\032\032.google.p" + + "ubsub.v1.Snapshot\"5\202\323\344\223\002/2*/v1/{snapshot" + + ".name=projects/*/snapshots/*}:\001*\022\213\001\n\016Del" + + "eteSnapshot\022\'.google.pubsub.v1.DeleteSna" + + "pshotRequest\032\026.google.protobuf.Empty\"8\202\323" + + "\344\223\002\'*%/v1/{snapshot=projects/*/snapshots" + + "/*}\332A\010snapshot\022\204\001\n\004Seek\022\035.google.pubsub." + + "v1.SeekRequest\032\036.google.pubsub.v1.SeekRe" + + "sponse\"=\202\323\344\223\0027\"2/v1/{subscription=projec" + + "ts/*/subscriptions/*}:seek:\001*\032p\312A\025pubsub" + + ".googleapis.com\322AUhttps://www.googleapis" + + ".com/auth/cloud-platform,https://www.goo" + + "gleapis.com/auth/pubsubB\256\001\n\024com.google.p" + + "ubsub.v1B\013PubsubProtoP\001Z6google.golang.o" + + "rg/genproto/googleapis/pubsub/v1;pubsub\370" + + "\001\001\252\002\026Google.Cloud.PubSub.V1\312\002\026Google\\Clo" + + "ud\\PubSub\\V1\352\002\031Google::Cloud::PubSub::V1" + + "b\006proto3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -716,6 +736,7 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { "DeadLetterPolicy", "RetryPolicy", "Detached", + "EnableExactlyOnceDelivery", "TopicMessageRetentionDuration", }); internal_static_google_pubsub_v1_Subscription_LabelsEntry_descriptor = @@ -883,15 +904,34 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_descriptor, new java.lang.String[] { - "ReceivedMessages", "SubscriptionProperties", + "ReceivedMessages", + "AcknowledgeConfirmation", + "ModifyAckDeadlineConfirmation", + "SubscriptionProperties", + }); + internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor = + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor, + new java.lang.String[] { + "AckIds", "InvalidAckIds", "UnorderedAckIds", + }); + internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor = + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(1); + internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable = + new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( + internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor, + new java.lang.String[] { + "AckIds", "InvalidAckIds", }); internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor = - internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(0); + internal_static_google_pubsub_v1_StreamingPullResponse_descriptor.getNestedTypes().get(2); internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor, new java.lang.String[] { - "MessageOrderingEnabled", + "ExactlyOnceDeliveryEnabled", "MessageOrderingEnabled", }); internal_static_google_pubsub_v1_CreateSnapshotRequest_descriptor = getDescriptor().getMessageTypes().get(35); diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java index 2183582d4..82ca2a8a9 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponse.java @@ -83,6 +83,25 @@ private StreamingPullResponse( com.google.pubsub.v1.ReceivedMessage.parser(), extensionRegistry)); break; } + case 26: + { + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder + subBuilder = null; + if (modifyAckDeadlineConfirmation_ != null) { + subBuilder = modifyAckDeadlineConfirmation_.toBuilder(); + } + modifyAckDeadlineConfirmation_ = + input.readMessage( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(modifyAckDeadlineConfirmation_); + modifyAckDeadlineConfirmation_ = subBuilder.buildPartial(); + } + + break; + } case 34: { com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder subBuilder = @@ -99,6 +118,24 @@ private StreamingPullResponse( subscriptionProperties_ = subBuilder.buildPartial(); } + break; + } + case 42: + { + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder + subBuilder = null; + if (acknowledgeConfirmation_ != null) { + subBuilder = acknowledgeConfirmation_.toBuilder(); + } + acknowledgeConfirmation_ = + input.readMessage( + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.parser(), + extensionRegistry); + if (subBuilder != null) { + subBuilder.mergeFrom(acknowledgeConfirmation_); + acknowledgeConfirmation_ = subBuilder.buildPartial(); + } + break; } default: @@ -138,49 +175,198 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { com.google.pubsub.v1.StreamingPullResponse.Builder.class); } - public interface SubscriptionPropertiesOrBuilder + public interface AcknowledgeConfirmationOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) com.google.protobuf.MessageOrBuilder { /** * * *
-     * True iff message ordering is enabled for this subscription.
+     * Successfully processed acknowledgement IDs.
      * 
* - * bool message_ordering_enabled = 2; + * repeated string ack_ids = 1 [ctype = CORD]; * - * @return The messageOrderingEnabled. + * @return A list containing the ackIds. */ - boolean getMessageOrderingEnabled(); + java.util.List getAckIdsList(); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return The count of ackIds. + */ + int getAckIdsCount(); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + java.lang.String getAckIds(int index); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + com.google.protobuf.ByteString getAckIdsBytes(int index); + + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + java.util.List getInvalidAckIdsList(); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + int getInvalidAckIdsCount(); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + java.lang.String getInvalidAckIds(int index); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + com.google.protobuf.ByteString getInvalidAckIdsBytes(int index); + + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return A list containing the unorderedAckIds. + */ + java.util.List getUnorderedAckIdsList(); + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return The count of unorderedAckIds. + */ + int getUnorderedAckIdsCount(); + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The unorderedAckIds at the given index. + */ + java.lang.String getUnorderedAckIds(int index); + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the unorderedAckIds at the given index. + */ + com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index); } /** * * *
-   * Subscription properties sent as part of the response.
+   * Acknowledgement IDs sent in one or more previous requests to acknowledge a
+   * previously received message.
    * 
* - * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} */ - public static final class SubscriptionProperties extends com.google.protobuf.GeneratedMessageV3 + public static final class AcknowledgeConfirmation extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) - SubscriptionPropertiesOrBuilder { + // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) + AcknowledgeConfirmationOrBuilder { private static final long serialVersionUID = 0L; - // Use SubscriptionProperties.newBuilder() to construct. - private SubscriptionProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use AcknowledgeConfirmation.newBuilder() to construct. + private AcknowledgeConfirmation(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private SubscriptionProperties() {} + private AcknowledgeConfirmation() { + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + unorderedAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new SubscriptionProperties(); + return new AcknowledgeConfirmation(); } @java.lang.Override @@ -188,7 +374,7 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { return this.unknownFields; } - private SubscriptionProperties( + private AcknowledgeConfirmation( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { @@ -196,6 +382,7 @@ private SubscriptionProperties( if (extensionRegistry == null) { throw new java.lang.NullPointerException(); } + int mutable_bitField0_ = 0; com.google.protobuf.UnknownFieldSet.Builder unknownFields = com.google.protobuf.UnknownFieldSet.newBuilder(); try { @@ -206,9 +393,34 @@ private SubscriptionProperties( case 0: done = true; break; - case 16: + case 10: { - messageOrderingEnabled_ = input.readBool(); + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ackIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ackIds_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + invalidAckIds_.add(s); + break; + } + case 26: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000004) != 0)) { + unorderedAckIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000004; + } + unorderedAckIds_.add(s); break; } default: @@ -225,6 +437,15 @@ private SubscriptionProperties( } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ackIds_ = ackIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = invalidAckIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000004) != 0)) { + unorderedAckIds_ = unorderedAckIds_.getUnmodifiableView(); + } this.unknownFields = unknownFields.build(); makeExtensionsImmutable(); } @@ -232,35 +453,204 @@ private SubscriptionProperties( public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable + .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.class, - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder.class); + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.class, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder.class); } - public static final int MESSAGE_ORDERING_ENABLED_FIELD_NUMBER = 2; - private boolean messageOrderingEnabled_; + public static final int ACK_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList ackIds_; /** * * *
-     * True iff message ordering is enabled for this subscription.
+     * Successfully processed acknowledgement IDs.
      * 
* - * bool message_ordering_enabled = 2; + * repeated string ack_ids = 1 [ctype = CORD]; * - * @return The messageOrderingEnabled. + * @return A list containing the ackIds. */ - @java.lang.Override - public boolean getMessageOrderingEnabled() { - return messageOrderingEnabled_; + public com.google.protobuf.ProtocolStringList getAckIdsList() { + return ackIds_; + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return The count of ackIds. + */ + public int getAckIdsCount() { + return ackIds_.size(); + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + public java.lang.String getAckIds(int index) { + return ackIds_.get(index); + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + public com.google.protobuf.ByteString getAckIdsBytes(int index) { + return ackIds_.getByteString(index); + } + + public static final int INVALID_ACK_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList invalidAckIds_; + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { + return invalidAckIds_; + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + public int getInvalidAckIdsCount() { + return invalidAckIds_.size(); + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + public java.lang.String getInvalidAckIds(int index) { + return invalidAckIds_.get(index); + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { + return invalidAckIds_.getByteString(index); + } + + public static final int UNORDERED_ACK_IDS_FIELD_NUMBER = 3; + private com.google.protobuf.LazyStringList unorderedAckIds_; + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return A list containing the unorderedAckIds. + */ + public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { + return unorderedAckIds_; + } + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return The count of unorderedAckIds. + */ + public int getUnorderedAckIdsCount() { + return unorderedAckIds_.size(); + } + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The unorderedAckIds at the given index. + */ + public java.lang.String getUnorderedAckIds(int index) { + return unorderedAckIds_.get(index); + } + /** + * + * + *
+     * List of acknowledgement IDs that were out of order.
+     * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the unorderedAckIds at the given index. + */ + public com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index) { + return unorderedAckIds_.getByteString(index); } private byte memoizedIsInitialized = -1; @@ -277,8 +667,14 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (messageOrderingEnabled_ != false) { - output.writeBool(2, messageOrderingEnabled_); + for (int i = 0; i < ackIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackIds_.getRaw(i)); + } + for (int i = 0; i < invalidAckIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, invalidAckIds_.getRaw(i)); + } + for (int i = 0; i < unorderedAckIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 3, unorderedAckIds_.getRaw(i)); } unknownFields.writeTo(output); } @@ -289,8 +685,29 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (messageOrderingEnabled_ != false) { - size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, messageOrderingEnabled_); + { + int dataSize = 0; + for (int i = 0; i < ackIds_.size(); i++) { + dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getAckIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < invalidAckIds_.size(); i++) { + dataSize += computeStringSizeNoTag(invalidAckIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getInvalidAckIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < unorderedAckIds_.size(); i++) { + dataSize += computeStringSizeNoTag(unorderedAckIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getUnorderedAckIdsList().size(); } size += unknownFields.getSerializedSize(); memoizedSize = size; @@ -302,13 +719,15 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties)) { + if (!(obj instanceof com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation)) { return super.equals(obj); } - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties other = - (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) obj; + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation other = + (com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) obj; - if (getMessageOrderingEnabled() != other.getMessageOrderingEnabled()) return false; + if (!getAckIdsList().equals(other.getAckIdsList())) return false; + if (!getInvalidAckIdsList().equals(other.getInvalidAckIdsList())) return false; + if (!getUnorderedAckIdsList().equals(other.getUnorderedAckIdsList())) return false; if (!unknownFields.equals(other.unknownFields)) return false; return true; } @@ -320,66 +739,76 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + MESSAGE_ORDERING_ENABLED_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMessageOrderingEnabled()); + if (getAckIdsCount() > 0) { + hash = (37 * hash) + ACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getAckIdsList().hashCode(); + } + if (getInvalidAckIdsCount() > 0) { + hash = (37 * hash) + INVALID_ACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getInvalidAckIdsList().hashCode(); + } + if (getUnorderedAckIdsCount() > 0) { + hash = (37 * hash) + UNORDERED_ACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getUnorderedAckIdsList().hashCode(); + } hash = (29 * hash) + unknownFields.hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseDelimitedFrom( java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -387,12 +816,12 @@ public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties PARSER, input, extensionRegistry); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -410,7 +839,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties prototype) { + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -429,33 +858,34 @@ protected Builder newBuilderForType( * * *
-     * Subscription properties sent as part of the response.
+     * Acknowledgement IDs sent in one or more previous requests to acknowledge a
+     * previously received message.
      * 
* - * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) - com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder { + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable + .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.class, - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder.class); + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.class, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder.class); } // Construct using - // com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.newBuilder() + // com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.newBuilder() private Builder() { maybeForceBuilderInitialization(); } @@ -472,27 +902,31 @@ private void maybeForceBuilderInitialization() { @java.lang.Override public Builder clear() { super.clear(); - messageOrderingEnabled_ = false; - + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + unorderedAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + .internal_static_google_pubsub_v1_StreamingPullResponse_AcknowledgeConfirmation_descriptor; } @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation getDefaultInstanceForType() { - return com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + return com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation .getDefaultInstance(); } @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties build() { - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties result = buildPartial(); + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation build() { + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -500,10 +934,25 @@ public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties build() } @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties buildPartial() { - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties result = - new com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(this); - result.messageOrderingEnabled_ = messageOrderingEnabled_; + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation buildPartial() { + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation result = + new com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + ackIds_ = ackIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ackIds_ = ackIds_; + if (((bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = invalidAckIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.invalidAckIds_ = invalidAckIds_; + if (((bitField0_ & 0x00000004) != 0)) { + unorderedAckIds_ = unorderedAckIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000004); + } + result.unorderedAckIds_ = unorderedAckIds_; onBuilt(); return result; } @@ -545,9 +994,9 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) { + if (other instanceof com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) { return mergeFrom( - (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) other); + (com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) other); } else { super.mergeFrom(other); return this; @@ -555,12 +1004,39 @@ public Builder mergeFrom(com.google.protobuf.Message other) { } public Builder mergeFrom( - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties other) { + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation other) { if (other - == com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + == com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation .getDefaultInstance()) return this; - if (other.getMessageOrderingEnabled() != false) { - setMessageOrderingEnabled(other.getMessageOrderingEnabled()); + if (!other.ackIds_.isEmpty()) { + if (ackIds_.isEmpty()) { + ackIds_ = other.ackIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAckIdsIsMutable(); + ackIds_.addAll(other.ackIds_); + } + onChanged(); + } + if (!other.invalidAckIds_.isEmpty()) { + if (invalidAckIds_.isEmpty()) { + invalidAckIds_ = other.invalidAckIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.addAll(other.invalidAckIds_); + } + onChanged(); + } + if (!other.unorderedAckIds_.isEmpty()) { + if (unorderedAckIds_.isEmpty()) { + unorderedAckIds_ = other.unorderedAckIds_; + bitField0_ = (bitField0_ & ~0x00000004); + } else { + ensureUnorderedAckIdsIsMutable(); + unorderedAckIds_.addAll(other.unorderedAckIds_); + } + onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); @@ -577,12 +1053,12 @@ public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { - com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parsedMessage = null; + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = - (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + (com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { @@ -593,37 +1069,94 @@ public Builder mergeFrom( return this; } - private boolean messageOrderingEnabled_; + private int bitField0_; + + private com.google.protobuf.LazyStringList ackIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAckIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ackIds_ = new com.google.protobuf.LazyStringArrayList(ackIds_); + bitField0_ |= 0x00000001; + } + } /** * * *
-       * True iff message ordering is enabled for this subscription.
+       * Successfully processed acknowledgement IDs.
        * 
* - * bool message_ordering_enabled = 2; + * repeated string ack_ids = 1 [ctype = CORD]; * - * @return The messageOrderingEnabled. + * @return A list containing the ackIds. */ - @java.lang.Override - public boolean getMessageOrderingEnabled() { - return messageOrderingEnabled_; + public com.google.protobuf.ProtocolStringList getAckIdsList() { + return ackIds_.getUnmodifiableView(); } /** * * *
-       * True iff message ordering is enabled for this subscription.
+       * Successfully processed acknowledgement IDs.
        * 
* - * bool message_ordering_enabled = 2; + * repeated string ack_ids = 1 [ctype = CORD]; * - * @param value The messageOrderingEnabled to set. + * @return The count of ackIds. + */ + public int getAckIdsCount() { + return ackIds_.size(); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + public java.lang.String getAckIds(int index) { + return ackIds_.get(index); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + public com.google.protobuf.ByteString getAckIdsBytes(int index) { + return ackIds_.getByteString(index); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index to set the value at. + * @param value The ackIds to set. * @return This builder for chaining. */ - public Builder setMessageOrderingEnabled(boolean value) { - - messageOrderingEnabled_ = value; + public Builder setAckIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAckIdsIsMutable(); + ackIds_.set(index, value); onChanged(); return this; } @@ -631,142 +1164,2488 @@ public Builder setMessageOrderingEnabled(boolean value) { * * *
-       * True iff message ordering is enabled for this subscription.
+       * Successfully processed acknowledgement IDs.
        * 
* - * bool message_ordering_enabled = 2; + * repeated string ack_ids = 1 [ctype = CORD]; * + * @param value The ackIds to add. * @return This builder for chaining. */ - public Builder clearMessageOrderingEnabled() { - - messageOrderingEnabled_ = false; + public Builder addAckIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAckIdsIsMutable(); + ackIds_.add(value); onChanged(); return this; } - - @java.lang.Override - public final Builder setUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.setUnknownFields(unknownFields); + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param values The ackIds to add. + * @return This builder for chaining. + */ + public Builder addAllAckIds(java.lang.Iterable values) { + ensureAckIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ackIds_); + onChanged(); + return this; } - - @java.lang.Override - public final Builder mergeUnknownFields( - final com.google.protobuf.UnknownFieldSet unknownFields) { - return super.mergeUnknownFields(unknownFields); + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return This builder for chaining. + */ + public Builder clearAckIds() { + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param value The bytes of the ackIds to add. + * @return This builder for chaining. + */ + public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAckIdsIsMutable(); + ackIds_.add(value); + onChanged(); + return this; } - // @@protoc_insertion_point(builder_scope:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) - } - - // @@protoc_insertion_point(class_scope:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) - private static final com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(); - } - - public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public SubscriptionProperties parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return new SubscriptionProperties(input, extensionRegistry); - } - }; - - public static com.google.protobuf.Parser parser() { - return PARSER; - } - - @java.lang.Override - public com.google.protobuf.Parser getParserForType() { - return PARSER; - } - - @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } + private com.google.protobuf.LazyStringList invalidAckIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; - public static final int RECEIVED_MESSAGES_FIELD_NUMBER = 1; - private java.util.List receivedMessages_; - /** - * - * - *
-   * Received Pub/Sub messages. This will not be empty.
-   * 
- * - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - */ - @java.lang.Override - public java.util.List getReceivedMessagesList() { - return receivedMessages_; - } - /** - * - * - *
-   * Received Pub/Sub messages. This will not be empty.
-   * 
- * - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; - */ - @java.lang.Override - public java.util.List - getReceivedMessagesOrBuilderList() { - return receivedMessages_; - } - /** - * - * - *
-   * Received Pub/Sub messages. This will not be empty.
-   * 
- * + private void ensureInvalidAckIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = new com.google.protobuf.LazyStringArrayList(invalidAckIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { + return invalidAckIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + public int getInvalidAckIdsCount() { + return invalidAckIds_.size(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + public java.lang.String getInvalidAckIds(int index) { + return invalidAckIds_.get(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { + return invalidAckIds_.getByteString(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index to set the value at. + * @param value The invalidAckIds to set. + * @return This builder for chaining. + */ + public Builder setInvalidAckIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param value The invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addInvalidAckIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param values The invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addAllInvalidAckIds(java.lang.Iterable values) { + ensureInvalidAckIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, invalidAckIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return This builder for chaining. + */ + public Builder clearInvalidAckIds() { + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param value The bytes of the invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addInvalidAckIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList unorderedAckIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureUnorderedAckIdsIsMutable() { + if (!((bitField0_ & 0x00000004) != 0)) { + unorderedAckIds_ = new com.google.protobuf.LazyStringArrayList(unorderedAckIds_); + bitField0_ |= 0x00000004; + } + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return A list containing the unorderedAckIds. + */ + public com.google.protobuf.ProtocolStringList getUnorderedAckIdsList() { + return unorderedAckIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return The count of unorderedAckIds. + */ + public int getUnorderedAckIdsCount() { + return unorderedAckIds_.size(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The unorderedAckIds at the given index. + */ + public java.lang.String getUnorderedAckIds(int index) { + return unorderedAckIds_.get(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the unorderedAckIds at the given index. + */ + public com.google.protobuf.ByteString getUnorderedAckIdsBytes(int index) { + return unorderedAckIds_.getByteString(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param index The index to set the value at. + * @param value The unorderedAckIds to set. + * @return This builder for chaining. + */ + public Builder setUnorderedAckIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnorderedAckIdsIsMutable(); + unorderedAckIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param value The unorderedAckIds to add. + * @return This builder for chaining. + */ + public Builder addUnorderedAckIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureUnorderedAckIdsIsMutable(); + unorderedAckIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param values The unorderedAckIds to add. + * @return This builder for chaining. + */ + public Builder addAllUnorderedAckIds(java.lang.Iterable values) { + ensureUnorderedAckIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, unorderedAckIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @return This builder for chaining. + */ + public Builder clearUnorderedAckIds() { + unorderedAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000004); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were out of order.
+       * 
+ * + * repeated string unordered_ack_ids = 3 [ctype = CORD]; + * + * @param value The bytes of the unorderedAckIds to add. + * @return This builder for chaining. + */ + public Builder addUnorderedAckIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureUnorderedAckIdsIsMutable(); + unorderedAckIds_.add(value); + 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.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation) + private static final com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation(); + } + + public static com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public AcknowledgeConfirmation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new AcknowledgeConfirmation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface ModifyAckDeadlineConfirmationOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return A list containing the ackIds. + */ + java.util.List getAckIdsList(); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return The count of ackIds. + */ + int getAckIdsCount(); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + java.lang.String getAckIds(int index); + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + com.google.protobuf.ByteString getAckIdsBytes(int index); + + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + java.util.List getInvalidAckIdsList(); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + int getInvalidAckIdsCount(); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + java.lang.String getInvalidAckIds(int index); + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + com.google.protobuf.ByteString getInvalidAckIdsBytes(int index); + } + /** + * + * + *
+   * Acknowledgement IDs sent in one or more previous requests to modify the
+   * deadline for a specific message.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} + */ + public static final class ModifyAckDeadlineConfirmation + extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + ModifyAckDeadlineConfirmationOrBuilder { + private static final long serialVersionUID = 0L; + // Use ModifyAckDeadlineConfirmation.newBuilder() to construct. + private ModifyAckDeadlineConfirmation( + com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private ModifyAckDeadlineConfirmation() { + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + } + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new ModifyAckDeadlineConfirmation(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private ModifyAckDeadlineConfirmation( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + int mutable_bitField0_ = 0; + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 10: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000001) != 0)) { + ackIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000001; + } + ackIds_.add(s); + break; + } + case 18: + { + java.lang.String s = input.readStringRequireUtf8(); + if (!((mutable_bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = new com.google.protobuf.LazyStringArrayList(); + mutable_bitField0_ |= 0x00000002; + } + invalidAckIds_.add(s); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + if (((mutable_bitField0_ & 0x00000001) != 0)) { + ackIds_ = ackIds_.getUnmodifiableView(); + } + if (((mutable_bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = invalidAckIds_.getUnmodifiableView(); + } + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.class, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder + .class); + } + + public static final int ACK_IDS_FIELD_NUMBER = 1; + private com.google.protobuf.LazyStringList ackIds_; + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return A list containing the ackIds. + */ + public com.google.protobuf.ProtocolStringList getAckIdsList() { + return ackIds_; + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return The count of ackIds. + */ + public int getAckIdsCount() { + return ackIds_.size(); + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + public java.lang.String getAckIds(int index) { + return ackIds_.get(index); + } + /** + * + * + *
+     * Successfully processed acknowledgement IDs.
+     * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + public com.google.protobuf.ByteString getAckIdsBytes(int index) { + return ackIds_.getByteString(index); + } + + public static final int INVALID_ACK_IDS_FIELD_NUMBER = 2; + private com.google.protobuf.LazyStringList invalidAckIds_; + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { + return invalidAckIds_; + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + public int getInvalidAckIdsCount() { + return invalidAckIds_.size(); + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + public java.lang.String getInvalidAckIds(int index) { + return invalidAckIds_.get(index); + } + /** + * + * + *
+     * List of acknowledgement IDs that were malformed or whose acknowledgement
+     * deadline has expired.
+     * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { + return invalidAckIds_.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 { + for (int i = 0; i < ackIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, ackIds_.getRaw(i)); + } + for (int i = 0; i < invalidAckIds_.size(); i++) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 2, invalidAckIds_.getRaw(i)); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + { + int dataSize = 0; + for (int i = 0; i < ackIds_.size(); i++) { + dataSize += computeStringSizeNoTag(ackIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getAckIdsList().size(); + } + { + int dataSize = 0; + for (int i = 0; i < invalidAckIds_.size(); i++) { + dataSize += computeStringSizeNoTag(invalidAckIds_.getRaw(i)); + } + size += dataSize; + size += 1 * getInvalidAckIdsList().size(); + } + size += unknownFields.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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation)) { + return super.equals(obj); + } + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation other = + (com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) obj; + + if (!getAckIdsList().equals(other.getAckIdsList())) return false; + if (!getInvalidAckIdsList().equals(other.getInvalidAckIdsList())) return false; + if (!unknownFields.equals(other.unknownFields)) return false; + return true; + } + + @java.lang.Override + public int hashCode() { + if (memoizedHashCode != 0) { + return memoizedHashCode; + } + int hash = 41; + hash = (19 * hash) + getDescriptor().hashCode(); + if (getAckIdsCount() > 0) { + hash = (37 * hash) + ACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getAckIdsList().hashCode(); + } + if (getInvalidAckIdsCount() > 0) { + hash = (37 * hash) + INVALID_ACK_IDS_FIELD_NUMBER; + hash = (53 * hash) + getInvalidAckIdsList().hashCode(); + } + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(java.nio.ByteBuffer data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + 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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + 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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + 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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + parseFrom(com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + 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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation 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; + } + /** + * + * + *
+     * Acknowledgement IDs sent in one or more previous requests to modify the
+     * deadline for a specific message.
+     * 
+ * + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.class, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder + .class); + } + + // Construct using + // com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_ModifyAckDeadlineConfirmation_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getDefaultInstanceForType() { + return com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation build() { + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation result = + buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + buildPartial() { + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation result = + new com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation(this); + int from_bitField0_ = bitField0_; + if (((bitField0_ & 0x00000001) != 0)) { + ackIds_ = ackIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.ackIds_ = ackIds_; + if (((bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = invalidAckIds_.getUnmodifiableView(); + bitField0_ = (bitField0_ & ~0x00000002); + } + result.invalidAckIds_ = invalidAckIds_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other + instanceof com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) { + return mergeFrom( + (com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation other) { + if (other + == com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .getDefaultInstance()) return this; + if (!other.ackIds_.isEmpty()) { + if (ackIds_.isEmpty()) { + ackIds_ = other.ackIds_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureAckIdsIsMutable(); + ackIds_.addAll(other.ackIds_); + } + onChanged(); + } + if (!other.invalidAckIds_.isEmpty()) { + if (invalidAckIds_.isEmpty()) { + invalidAckIds_ = other.invalidAckIds_; + bitField0_ = (bitField0_ & ~0x00000002); + } else { + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.addAll(other.invalidAckIds_); + } + onChanged(); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation parsedMessage = + null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private int bitField0_; + + private com.google.protobuf.LazyStringList ackIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureAckIdsIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + ackIds_ = new com.google.protobuf.LazyStringArrayList(ackIds_); + bitField0_ |= 0x00000001; + } + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return A list containing the ackIds. + */ + public com.google.protobuf.ProtocolStringList getAckIdsList() { + return ackIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return The count of ackIds. + */ + public int getAckIdsCount() { + return ackIds_.size(); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The ackIds at the given index. + */ + public java.lang.String getAckIds(int index) { + return ackIds_.get(index); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the ackIds at the given index. + */ + public com.google.protobuf.ByteString getAckIdsBytes(int index) { + return ackIds_.getByteString(index); + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param index The index to set the value at. + * @param value The ackIds to set. + * @return This builder for chaining. + */ + public Builder setAckIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAckIdsIsMutable(); + ackIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param value The ackIds to add. + * @return This builder for chaining. + */ + public Builder addAckIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureAckIdsIsMutable(); + ackIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param values The ackIds to add. + * @return This builder for chaining. + */ + public Builder addAllAckIds(java.lang.Iterable values) { + ensureAckIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, ackIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @return This builder for chaining. + */ + public Builder clearAckIds() { + ackIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); + return this; + } + /** + * + * + *
+       * Successfully processed acknowledgement IDs.
+       * 
+ * + * repeated string ack_ids = 1 [ctype = CORD]; + * + * @param value The bytes of the ackIds to add. + * @return This builder for chaining. + */ + public Builder addAckIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureAckIdsIsMutable(); + ackIds_.add(value); + onChanged(); + return this; + } + + private com.google.protobuf.LazyStringList invalidAckIds_ = + com.google.protobuf.LazyStringArrayList.EMPTY; + + private void ensureInvalidAckIdsIsMutable() { + if (!((bitField0_ & 0x00000002) != 0)) { + invalidAckIds_ = new com.google.protobuf.LazyStringArrayList(invalidAckIds_); + bitField0_ |= 0x00000002; + } + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return A list containing the invalidAckIds. + */ + public com.google.protobuf.ProtocolStringList getInvalidAckIdsList() { + return invalidAckIds_.getUnmodifiableView(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return The count of invalidAckIds. + */ + public int getInvalidAckIdsCount() { + return invalidAckIds_.size(); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the element to return. + * @return The invalidAckIds at the given index. + */ + public java.lang.String getInvalidAckIds(int index) { + return invalidAckIds_.get(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index of the value to return. + * @return The bytes of the invalidAckIds at the given index. + */ + public com.google.protobuf.ByteString getInvalidAckIdsBytes(int index) { + return invalidAckIds_.getByteString(index); + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param index The index to set the value at. + * @param value The invalidAckIds to set. + * @return This builder for chaining. + */ + public Builder setInvalidAckIds(int index, java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.set(index, value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param value The invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addInvalidAckIds(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.add(value); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param values The invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addAllInvalidAckIds(java.lang.Iterable values) { + ensureInvalidAckIdsIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, invalidAckIds_); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @return This builder for chaining. + */ + public Builder clearInvalidAckIds() { + invalidAckIds_ = com.google.protobuf.LazyStringArrayList.EMPTY; + bitField0_ = (bitField0_ & ~0x00000002); + onChanged(); + return this; + } + /** + * + * + *
+       * List of acknowledgement IDs that were malformed or whose acknowledgement
+       * deadline has expired.
+       * 
+ * + * repeated string invalid_ack_ids = 2 [ctype = CORD]; + * + * @param value The bytes of the invalidAckIds to add. + * @return This builder for chaining. + */ + public Builder addInvalidAckIdsBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); + } + checkByteStringIsUtf8(value); + ensureInvalidAckIdsIsMutable(); + invalidAckIds_.add(value); + 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.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation) + private static final com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = + new com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation(); + } + + public static com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public ModifyAckDeadlineConfirmation parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new ModifyAckDeadlineConfirmation(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public interface SubscriptionPropertiesOrBuilder + extends + // @@protoc_insertion_point(interface_extends:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + com.google.protobuf.MessageOrBuilder { + + /** + * + * + *
+     * True iff exactly once delivery is enabled for this subscription.
+     * 
+ * + * bool exactly_once_delivery_enabled = 1; + * + * @return The exactlyOnceDeliveryEnabled. + */ + boolean getExactlyOnceDeliveryEnabled(); + + /** + * + * + *
+     * True iff message ordering is enabled for this subscription.
+     * 
+ * + * bool message_ordering_enabled = 2; + * + * @return The messageOrderingEnabled. + */ + boolean getMessageOrderingEnabled(); + } + /** + * + * + *
+   * Subscription properties sent as part of the response.
+   * 
+ * + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} + */ + public static final class SubscriptionProperties extends com.google.protobuf.GeneratedMessageV3 + implements + // @@protoc_insertion_point(message_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + SubscriptionPropertiesOrBuilder { + private static final long serialVersionUID = 0L; + // Use SubscriptionProperties.newBuilder() to construct. + private SubscriptionProperties(com.google.protobuf.GeneratedMessageV3.Builder builder) { + super(builder); + } + + private SubscriptionProperties() {} + + @java.lang.Override + @SuppressWarnings({"unused"}) + protected java.lang.Object newInstance(UnusedPrivateParameter unused) { + return new SubscriptionProperties(); + } + + @java.lang.Override + public final com.google.protobuf.UnknownFieldSet getUnknownFields() { + return this.unknownFields; + } + + private SubscriptionProperties( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + this(); + if (extensionRegistry == null) { + throw new java.lang.NullPointerException(); + } + com.google.protobuf.UnknownFieldSet.Builder unknownFields = + com.google.protobuf.UnknownFieldSet.newBuilder(); + try { + boolean done = false; + while (!done) { + int tag = input.readTag(); + switch (tag) { + case 0: + done = true; + break; + case 8: + { + exactlyOnceDeliveryEnabled_ = input.readBool(); + break; + } + case 16: + { + messageOrderingEnabled_ = input.readBool(); + break; + } + default: + { + if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { + done = true; + } + break; + } + } + } + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + throw e.setUnfinishedMessage(this); + } catch (java.io.IOException e) { + throw new com.google.protobuf.InvalidProtocolBufferException(e).setUnfinishedMessage(this); + } finally { + this.unknownFields = unknownFields.build(); + makeExtensionsImmutable(); + } + } + + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.class, + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder.class); + } + + public static final int EXACTLY_ONCE_DELIVERY_ENABLED_FIELD_NUMBER = 1; + private boolean exactlyOnceDeliveryEnabled_; + /** + * + * + *
+     * True iff exactly once delivery is enabled for this subscription.
+     * 
+ * + * bool exactly_once_delivery_enabled = 1; + * + * @return The exactlyOnceDeliveryEnabled. + */ + @java.lang.Override + public boolean getExactlyOnceDeliveryEnabled() { + return exactlyOnceDeliveryEnabled_; + } + + public static final int MESSAGE_ORDERING_ENABLED_FIELD_NUMBER = 2; + private boolean messageOrderingEnabled_; + /** + * + * + *
+     * True iff message ordering is enabled for this subscription.
+     * 
+ * + * bool message_ordering_enabled = 2; + * + * @return The messageOrderingEnabled. + */ + @java.lang.Override + public boolean getMessageOrderingEnabled() { + return messageOrderingEnabled_; + } + + 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 (exactlyOnceDeliveryEnabled_ != false) { + output.writeBool(1, exactlyOnceDeliveryEnabled_); + } + if (messageOrderingEnabled_ != false) { + output.writeBool(2, messageOrderingEnabled_); + } + unknownFields.writeTo(output); + } + + @java.lang.Override + public int getSerializedSize() { + int size = memoizedSize; + if (size != -1) return size; + + size = 0; + if (exactlyOnceDeliveryEnabled_ != false) { + size += + com.google.protobuf.CodedOutputStream.computeBoolSize(1, exactlyOnceDeliveryEnabled_); + } + if (messageOrderingEnabled_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(2, messageOrderingEnabled_); + } + size += unknownFields.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.pubsub.v1.StreamingPullResponse.SubscriptionProperties)) { + return super.equals(obj); + } + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties other = + (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) obj; + + if (getExactlyOnceDeliveryEnabled() != other.getExactlyOnceDeliveryEnabled()) return false; + if (getMessageOrderingEnabled() != other.getMessageOrderingEnabled()) return false; + if (!unknownFields.equals(other.unknownFields)) 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) + EXACTLY_ONCE_DELIVERY_ENABLED_FIELD_NUMBER; + hash = + (53 * hash) + com.google.protobuf.Internal.hashBoolean(getExactlyOnceDeliveryEnabled()); + hash = (37 * hash) + MESSAGE_ORDERING_ENABLED_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getMessageOrderingEnabled()); + hash = (29 * hash) + unknownFields.hashCode(); + memoizedHashCode = hash; + return hash; + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + com.google.protobuf.ByteString data) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return PARSER.parseFrom(data, extensionRegistry); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties + parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties parseFrom( + com.google.protobuf.CodedInputStream input) throws java.io.IOException { + return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties 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; + } + /** + * + * + *
+     * Subscription properties sent as part of the response.
+     * 
+ * + * Protobuf type {@code google.pubsub.v1.StreamingPullResponse.SubscriptionProperties} + */ + public static final class Builder + extends com.google.protobuf.GeneratedMessageV3.Builder + implements + // @@protoc_insertion_point(builder_implements:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + com.google.pubsub.v1.StreamingPullResponse.SubscriptionPropertiesOrBuilder { + public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + } + + @java.lang.Override + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.class, + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.Builder.class); + } + + // Construct using + // com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {} + } + + @java.lang.Override + public Builder clear() { + super.clear(); + exactlyOnceDeliveryEnabled_ = false; + + messageOrderingEnabled_ = false; + + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_SubscriptionProperties_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + getDefaultInstanceForType() { + return com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + .getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties build() { + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties buildPartial() { + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties result = + new com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(this); + result.exactlyOnceDeliveryEnabled_ = exactlyOnceDeliveryEnabled_; + result.messageOrderingEnabled_ = messageOrderingEnabled_; + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, + int index, + java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) { + return mergeFrom( + (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom( + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties other) { + if (other + == com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + .getDefaultInstance()) return this; + if (other.getExactlyOnceDeliveryEnabled() != false) { + setExactlyOnceDeliveryEnabled(other.getExactlyOnceDeliveryEnabled()); + } + if (other.getMessageOrderingEnabled() != false) { + setMessageOrderingEnabled(other.getMessageOrderingEnabled()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = + (com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; + } + + private boolean exactlyOnceDeliveryEnabled_; + /** + * + * + *
+       * True iff exactly once delivery is enabled for this subscription.
+       * 
+ * + * bool exactly_once_delivery_enabled = 1; + * + * @return The exactlyOnceDeliveryEnabled. + */ + @java.lang.Override + public boolean getExactlyOnceDeliveryEnabled() { + return exactlyOnceDeliveryEnabled_; + } + /** + * + * + *
+       * True iff exactly once delivery is enabled for this subscription.
+       * 
+ * + * bool exactly_once_delivery_enabled = 1; + * + * @param value The exactlyOnceDeliveryEnabled to set. + * @return This builder for chaining. + */ + public Builder setExactlyOnceDeliveryEnabled(boolean value) { + + exactlyOnceDeliveryEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * True iff exactly once delivery is enabled for this subscription.
+       * 
+ * + * bool exactly_once_delivery_enabled = 1; + * + * @return This builder for chaining. + */ + public Builder clearExactlyOnceDeliveryEnabled() { + + exactlyOnceDeliveryEnabled_ = false; + onChanged(); + return this; + } + + private boolean messageOrderingEnabled_; + /** + * + * + *
+       * True iff message ordering is enabled for this subscription.
+       * 
+ * + * bool message_ordering_enabled = 2; + * + * @return The messageOrderingEnabled. + */ + @java.lang.Override + public boolean getMessageOrderingEnabled() { + return messageOrderingEnabled_; + } + /** + * + * + *
+       * True iff message ordering is enabled for this subscription.
+       * 
+ * + * bool message_ordering_enabled = 2; + * + * @param value The messageOrderingEnabled to set. + * @return This builder for chaining. + */ + public Builder setMessageOrderingEnabled(boolean value) { + + messageOrderingEnabled_ = value; + onChanged(); + return this; + } + /** + * + * + *
+       * True iff message ordering is enabled for this subscription.
+       * 
+ * + * bool message_ordering_enabled = 2; + * + * @return This builder for chaining. + */ + public Builder clearMessageOrderingEnabled() { + + messageOrderingEnabled_ = 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.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + } + + // @@protoc_insertion_point(class_scope:google.pubsub.v1.StreamingPullResponse.SubscriptionProperties) + private static final com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + DEFAULT_INSTANCE; + + static { + DEFAULT_INSTANCE = new com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties(); + } + + public static com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + getDefaultInstance() { + return DEFAULT_INSTANCE; + } + + private static final com.google.protobuf.Parser PARSER = + new com.google.protobuf.AbstractParser() { + @java.lang.Override + public SubscriptionProperties parsePartialFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws com.google.protobuf.InvalidProtocolBufferException { + return new SubscriptionProperties(input, extensionRegistry); + } + }; + + public static com.google.protobuf.Parser parser() { + return PARSER; + } + + @java.lang.Override + public com.google.protobuf.Parser getParserForType() { + return PARSER; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties + getDefaultInstanceForType() { + return DEFAULT_INSTANCE; + } + } + + public static final int RECEIVED_MESSAGES_FIELD_NUMBER = 1; + private java.util.List receivedMessages_; + /** + * + * + *
+   * Received Pub/Sub messages. This will not be empty.
+   * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + @java.lang.Override + public java.util.List getReceivedMessagesList() { + return receivedMessages_; + } + /** + * + * + *
+   * Received Pub/Sub messages. This will not be empty.
+   * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + @java.lang.Override + public java.util.List + getReceivedMessagesOrBuilderList() { + return receivedMessages_; + } + /** + * + * + *
+   * Received Pub/Sub messages. This will not be empty.
+   * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + @java.lang.Override + public int getReceivedMessagesCount() { + return receivedMessages_.size(); + } + /** + * + * + *
+   * Received Pub/Sub messages. This will not be empty.
+   * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + @java.lang.Override + public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { + return receivedMessages_.get(index); + } + /** + * + * + *
+   * Received Pub/Sub messages. This will not be empty.
+   * 
+ * * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; */ @java.lang.Override - public int getReceivedMessagesCount() { - return receivedMessages_.size(); + public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { + return receivedMessages_.get(index); } + + public static final int ACKNOWLEDGE_CONFIRMATION_FIELD_NUMBER = 5; + private com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + acknowledgeConfirmation_; /** * * *
-   * Received Pub/Sub messages. This will not be empty.
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
    * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return Whether the acknowledgeConfirmation field is set. */ @java.lang.Override - public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { - return receivedMessages_.get(index); + public boolean hasAcknowledgeConfirmation() { + return acknowledgeConfirmation_ != null; } /** * * *
-   * Received Pub/Sub messages. This will not be empty.
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
    * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return The acknowledgeConfirmation. */ @java.lang.Override - public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { - return receivedMessages_.get(index); + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + getAcknowledgeConfirmation() { + return acknowledgeConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.getDefaultInstance() + : acknowledgeConfirmation_; + } + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + */ + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder + getAcknowledgeConfirmationOrBuilder() { + return getAcknowledgeConfirmation(); + } + + public static final int MODIFY_ACK_DEADLINE_CONFIRMATION_FIELD_NUMBER = 3; + private com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + modifyAckDeadlineConfirmation_; + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return Whether the modifyAckDeadlineConfirmation field is set. + */ + @java.lang.Override + public boolean hasModifyAckDeadlineConfirmation() { + return modifyAckDeadlineConfirmation_ != null; + } + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return The modifyAckDeadlineConfirmation. + */ + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getModifyAckDeadlineConfirmation() { + return modifyAckDeadlineConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .getDefaultInstance() + : modifyAckDeadlineConfirmation_; + } + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + */ + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder + getModifyAckDeadlineConfirmationOrBuilder() { + return getModifyAckDeadlineConfirmation(); } public static final int SUBSCRIPTION_PROPERTIES_FIELD_NUMBER = 4; @@ -842,9 +3721,15 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io for (int i = 0; i < receivedMessages_.size(); i++) { output.writeMessage(1, receivedMessages_.get(i)); } + if (modifyAckDeadlineConfirmation_ != null) { + output.writeMessage(3, getModifyAckDeadlineConfirmation()); + } if (subscriptionProperties_ != null) { output.writeMessage(4, getSubscriptionProperties()); } + if (acknowledgeConfirmation_ != null) { + output.writeMessage(5, getAcknowledgeConfirmation()); + } unknownFields.writeTo(output); } @@ -857,10 +3742,19 @@ public int getSerializedSize() { for (int i = 0; i < receivedMessages_.size(); i++) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(1, receivedMessages_.get(i)); } + if (modifyAckDeadlineConfirmation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize( + 3, getModifyAckDeadlineConfirmation()); + } if (subscriptionProperties_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, getSubscriptionProperties()); } + if (acknowledgeConfirmation_ != null) { + size += + com.google.protobuf.CodedOutputStream.computeMessageSize(5, getAcknowledgeConfirmation()); + } size += unknownFields.getSerializedSize(); memoizedSize = size; return size; @@ -878,6 +3772,16 @@ public boolean equals(final java.lang.Object obj) { (com.google.pubsub.v1.StreamingPullResponse) obj; if (!getReceivedMessagesList().equals(other.getReceivedMessagesList())) return false; + if (hasAcknowledgeConfirmation() != other.hasAcknowledgeConfirmation()) return false; + if (hasAcknowledgeConfirmation()) { + if (!getAcknowledgeConfirmation().equals(other.getAcknowledgeConfirmation())) return false; + } + if (hasModifyAckDeadlineConfirmation() != other.hasModifyAckDeadlineConfirmation()) + return false; + if (hasModifyAckDeadlineConfirmation()) { + if (!getModifyAckDeadlineConfirmation().equals(other.getModifyAckDeadlineConfirmation())) + return false; + } if (hasSubscriptionProperties() != other.hasSubscriptionProperties()) return false; if (hasSubscriptionProperties()) { if (!getSubscriptionProperties().equals(other.getSubscriptionProperties())) return false; @@ -897,6 +3801,14 @@ public int hashCode() { hash = (37 * hash) + RECEIVED_MESSAGES_FIELD_NUMBER; hash = (53 * hash) + getReceivedMessagesList().hashCode(); } + if (hasAcknowledgeConfirmation()) { + hash = (37 * hash) + ACKNOWLEDGE_CONFIRMATION_FIELD_NUMBER; + hash = (53 * hash) + getAcknowledgeConfirmation().hashCode(); + } + if (hasModifyAckDeadlineConfirmation()) { + hash = (37 * hash) + MODIFY_ACK_DEADLINE_CONFIRMATION_FIELD_NUMBER; + hash = (53 * hash) + getModifyAckDeadlineConfirmation().hashCode(); + } if (hasSubscriptionProperties()) { hash = (37 * hash) + SUBSCRIPTION_PROPERTIES_FIELD_NUMBER; hash = (53 * hash) + getSubscriptionProperties().hashCode(); @@ -1021,550 +3933,1025 @@ public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { } @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.pubsub.v1.StreamingPullResponse.class, - com.google.pubsub.v1.StreamingPullResponse.Builder.class); + protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable + internalGetFieldAccessorTable() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_fieldAccessorTable + .ensureFieldAccessorsInitialized( + com.google.pubsub.v1.StreamingPullResponse.class, + com.google.pubsub.v1.StreamingPullResponse.Builder.class); + } + + // Construct using com.google.pubsub.v1.StreamingPullResponse.newBuilder() + private Builder() { + maybeForceBuilderInitialization(); + } + + private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { + super(parent); + maybeForceBuilderInitialization(); + } + + private void maybeForceBuilderInitialization() { + if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { + getReceivedMessagesFieldBuilder(); + } + } + + @java.lang.Override + public Builder clear() { + super.clear(); + if (receivedMessagesBuilder_ == null) { + receivedMessages_ = java.util.Collections.emptyList(); + bitField0_ = (bitField0_ & ~0x00000001); + } else { + receivedMessagesBuilder_.clear(); + } + if (acknowledgeConfirmationBuilder_ == null) { + acknowledgeConfirmation_ = null; + } else { + acknowledgeConfirmation_ = null; + acknowledgeConfirmationBuilder_ = null; + } + if (modifyAckDeadlineConfirmationBuilder_ == null) { + modifyAckDeadlineConfirmation_ = null; + } else { + modifyAckDeadlineConfirmation_ = null; + modifyAckDeadlineConfirmationBuilder_ = null; + } + if (subscriptionPropertiesBuilder_ == null) { + subscriptionProperties_ = null; + } else { + subscriptionProperties_ = null; + subscriptionPropertiesBuilder_ = null; + } + return this; + } + + @java.lang.Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { + return com.google.pubsub.v1.PubsubProto + .internal_static_google_pubsub_v1_StreamingPullResponse_descriptor; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse getDefaultInstanceForType() { + return com.google.pubsub.v1.StreamingPullResponse.getDefaultInstance(); + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse build() { + com.google.pubsub.v1.StreamingPullResponse result = buildPartial(); + if (!result.isInitialized()) { + throw newUninitializedMessageException(result); + } + return result; + } + + @java.lang.Override + public com.google.pubsub.v1.StreamingPullResponse buildPartial() { + com.google.pubsub.v1.StreamingPullResponse result = + new com.google.pubsub.v1.StreamingPullResponse(this); + int from_bitField0_ = bitField0_; + if (receivedMessagesBuilder_ == null) { + if (((bitField0_ & 0x00000001) != 0)) { + receivedMessages_ = java.util.Collections.unmodifiableList(receivedMessages_); + bitField0_ = (bitField0_ & ~0x00000001); + } + result.receivedMessages_ = receivedMessages_; + } else { + result.receivedMessages_ = receivedMessagesBuilder_.build(); + } + if (acknowledgeConfirmationBuilder_ == null) { + result.acknowledgeConfirmation_ = acknowledgeConfirmation_; + } else { + result.acknowledgeConfirmation_ = acknowledgeConfirmationBuilder_.build(); + } + if (modifyAckDeadlineConfirmationBuilder_ == null) { + result.modifyAckDeadlineConfirmation_ = modifyAckDeadlineConfirmation_; + } else { + result.modifyAckDeadlineConfirmation_ = modifyAckDeadlineConfirmationBuilder_.build(); + } + if (subscriptionPropertiesBuilder_ == null) { + result.subscriptionProperties_ = subscriptionProperties_; + } else { + result.subscriptionProperties_ = subscriptionPropertiesBuilder_.build(); + } + onBuilt(); + return result; + } + + @java.lang.Override + public Builder clone() { + return super.clone(); + } + + @java.lang.Override + public Builder setField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.setField(field, value); + } + + @java.lang.Override + public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { + return super.clearField(field); + } + + @java.lang.Override + public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { + return super.clearOneof(oneof); + } + + @java.lang.Override + public Builder setRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { + return super.setRepeatedField(field, index, value); + } + + @java.lang.Override + public Builder addRepeatedField( + com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { + return super.addRepeatedField(field, value); + } + + @java.lang.Override + public Builder mergeFrom(com.google.protobuf.Message other) { + if (other instanceof com.google.pubsub.v1.StreamingPullResponse) { + return mergeFrom((com.google.pubsub.v1.StreamingPullResponse) other); + } else { + super.mergeFrom(other); + return this; + } + } + + public Builder mergeFrom(com.google.pubsub.v1.StreamingPullResponse other) { + if (other == com.google.pubsub.v1.StreamingPullResponse.getDefaultInstance()) return this; + if (receivedMessagesBuilder_ == null) { + if (!other.receivedMessages_.isEmpty()) { + if (receivedMessages_.isEmpty()) { + receivedMessages_ = other.receivedMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + } else { + ensureReceivedMessagesIsMutable(); + receivedMessages_.addAll(other.receivedMessages_); + } + onChanged(); + } + } else { + if (!other.receivedMessages_.isEmpty()) { + if (receivedMessagesBuilder_.isEmpty()) { + receivedMessagesBuilder_.dispose(); + receivedMessagesBuilder_ = null; + receivedMessages_ = other.receivedMessages_; + bitField0_ = (bitField0_ & ~0x00000001); + receivedMessagesBuilder_ = + com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders + ? getReceivedMessagesFieldBuilder() + : null; + } else { + receivedMessagesBuilder_.addAllMessages(other.receivedMessages_); + } + } + } + if (other.hasAcknowledgeConfirmation()) { + mergeAcknowledgeConfirmation(other.getAcknowledgeConfirmation()); + } + if (other.hasModifyAckDeadlineConfirmation()) { + mergeModifyAckDeadlineConfirmation(other.getModifyAckDeadlineConfirmation()); + } + if (other.hasSubscriptionProperties()) { + mergeSubscriptionProperties(other.getSubscriptionProperties()); + } + this.mergeUnknownFields(other.unknownFields); + onChanged(); + return this; + } + + @java.lang.Override + public final boolean isInitialized() { + return true; + } + + @java.lang.Override + public Builder mergeFrom( + com.google.protobuf.CodedInputStream input, + com.google.protobuf.ExtensionRegistryLite extensionRegistry) + throws java.io.IOException { + com.google.pubsub.v1.StreamingPullResponse parsedMessage = null; + try { + parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); + } catch (com.google.protobuf.InvalidProtocolBufferException e) { + parsedMessage = (com.google.pubsub.v1.StreamingPullResponse) e.getUnfinishedMessage(); + throw e.unwrapIOException(); + } finally { + if (parsedMessage != null) { + mergeFrom(parsedMessage); + } + } + return this; } - // Construct using com.google.pubsub.v1.StreamingPullResponse.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private int bitField0_; - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } + private java.util.List receivedMessages_ = + java.util.Collections.emptyList(); - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) { - getReceivedMessagesFieldBuilder(); + private void ensureReceivedMessagesIsMutable() { + if (!((bitField0_ & 0x00000001) != 0)) { + receivedMessages_ = + new java.util.ArrayList(receivedMessages_); + bitField0_ |= 0x00000001; } } - @java.lang.Override - public Builder clear() { - super.clear(); + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.ReceivedMessage, + com.google.pubsub.v1.ReceivedMessage.Builder, + com.google.pubsub.v1.ReceivedMessageOrBuilder> + receivedMessagesBuilder_; + + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public java.util.List getReceivedMessagesList() { + if (receivedMessagesBuilder_ == null) { + return java.util.Collections.unmodifiableList(receivedMessages_); + } else { + return receivedMessagesBuilder_.getMessageList(); + } + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public int getReceivedMessagesCount() { + if (receivedMessagesBuilder_ == null) { + return receivedMessages_.size(); + } else { + return receivedMessagesBuilder_.getCount(); + } + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { + if (receivedMessagesBuilder_ == null) { + return receivedMessages_.get(index); + } else { + return receivedMessagesBuilder_.getMessage(index); + } + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder setReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessage value) { + if (receivedMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReceivedMessagesIsMutable(); + receivedMessages_.set(index, value); + onChanged(); + } else { + receivedMessagesBuilder_.setMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder setReceivedMessages( + int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { + if (receivedMessagesBuilder_ == null) { + ensureReceivedMessagesIsMutable(); + receivedMessages_.set(index, builderForValue.build()); + onChanged(); + } else { + receivedMessagesBuilder_.setMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { + if (receivedMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReceivedMessagesIsMutable(); + receivedMessages_.add(value); + onChanged(); + } else { + receivedMessagesBuilder_.addMessage(value); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder addReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessage value) { + if (receivedMessagesBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + ensureReceivedMessagesIsMutable(); + receivedMessages_.add(index, value); + onChanged(); + } else { + receivedMessagesBuilder_.addMessage(index, value); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder addReceivedMessages( + com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { + if (receivedMessagesBuilder_ == null) { + ensureReceivedMessagesIsMutable(); + receivedMessages_.add(builderForValue.build()); + onChanged(); + } else { + receivedMessagesBuilder_.addMessage(builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder addReceivedMessages( + int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { + if (receivedMessagesBuilder_ == null) { + ensureReceivedMessagesIsMutable(); + receivedMessages_.add(index, builderForValue.build()); + onChanged(); + } else { + receivedMessagesBuilder_.addMessage(index, builderForValue.build()); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder addAllReceivedMessages( + java.lang.Iterable values) { + if (receivedMessagesBuilder_ == null) { + ensureReceivedMessagesIsMutable(); + com.google.protobuf.AbstractMessageLite.Builder.addAll(values, receivedMessages_); + onChanged(); + } else { + receivedMessagesBuilder_.addAllMessages(values); + } + return this; + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder clearReceivedMessages() { if (receivedMessagesBuilder_ == null) { receivedMessages_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000001); + onChanged(); } else { receivedMessagesBuilder_.clear(); } - if (subscriptionPropertiesBuilder_ == null) { - subscriptionProperties_ = null; - } else { - subscriptionProperties_ = null; - subscriptionPropertiesBuilder_ = null; - } return this; } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.pubsub.v1.PubsubProto - .internal_static_google_pubsub_v1_StreamingPullResponse_descriptor; - } - - @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse getDefaultInstanceForType() { - return com.google.pubsub.v1.StreamingPullResponse.getDefaultInstance(); - } - - @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse build() { - com.google.pubsub.v1.StreamingPullResponse result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.pubsub.v1.StreamingPullResponse buildPartial() { - com.google.pubsub.v1.StreamingPullResponse result = - new com.google.pubsub.v1.StreamingPullResponse(this); - int from_bitField0_ = bitField0_; + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public Builder removeReceivedMessages(int index) { if (receivedMessagesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - receivedMessages_ = java.util.Collections.unmodifiableList(receivedMessages_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.receivedMessages_ = receivedMessages_; - } else { - result.receivedMessages_ = receivedMessagesBuilder_.build(); - } - if (subscriptionPropertiesBuilder_ == null) { - result.subscriptionProperties_ = subscriptionProperties_; + ensureReceivedMessagesIsMutable(); + receivedMessages_.remove(index); + onChanged(); } else { - result.subscriptionProperties_ = subscriptionPropertiesBuilder_.build(); + receivedMessagesBuilder_.remove(index); } - onBuilt(); - return result; - } - - @java.lang.Override - public Builder clone() { - return super.clone(); - } - - @java.lang.Override - public Builder setField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.setField(field, value); - } - - @java.lang.Override - public Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field) { - return super.clearField(field); - } - - @java.lang.Override - public Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof) { - return super.clearOneof(oneof); - } - - @java.lang.Override - public Builder setRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value) { - return super.setRepeatedField(field, index, value); + return this; } - - @java.lang.Override - public Builder addRepeatedField( - com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value) { - return super.addRepeatedField(field, value); + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder(int index) { + return getReceivedMessagesFieldBuilder().getBuilder(index); } - - @java.lang.Override - public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.pubsub.v1.StreamingPullResponse) { - return mergeFrom((com.google.pubsub.v1.StreamingPullResponse) other); + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { + if (receivedMessagesBuilder_ == null) { + return receivedMessages_.get(index); } else { - super.mergeFrom(other); - return this; + return receivedMessagesBuilder_.getMessageOrBuilder(index); } } - - public Builder mergeFrom(com.google.pubsub.v1.StreamingPullResponse other) { - if (other == com.google.pubsub.v1.StreamingPullResponse.getDefaultInstance()) return this; - if (receivedMessagesBuilder_ == null) { - if (!other.receivedMessages_.isEmpty()) { - if (receivedMessages_.isEmpty()) { - receivedMessages_ = other.receivedMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureReceivedMessagesIsMutable(); - receivedMessages_.addAll(other.receivedMessages_); - } - onChanged(); - } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public java.util.List + getReceivedMessagesOrBuilderList() { + if (receivedMessagesBuilder_ != null) { + return receivedMessagesBuilder_.getMessageOrBuilderList(); } else { - if (!other.receivedMessages_.isEmpty()) { - if (receivedMessagesBuilder_.isEmpty()) { - receivedMessagesBuilder_.dispose(); - receivedMessagesBuilder_ = null; - receivedMessages_ = other.receivedMessages_; - bitField0_ = (bitField0_ & ~0x00000001); - receivedMessagesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getReceivedMessagesFieldBuilder() - : null; - } else { - receivedMessagesBuilder_.addAllMessages(other.receivedMessages_); - } - } - } - if (other.hasSubscriptionProperties()) { - mergeSubscriptionProperties(other.getSubscriptionProperties()); + return java.util.Collections.unmodifiableList(receivedMessages_); } - this.mergeUnknownFields(other.unknownFields); - onChanged(); - return this; } - - @java.lang.Override - public final boolean isInitialized() { - return true; + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() { + return getReceivedMessagesFieldBuilder() + .addBuilder(com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); } - - @java.lang.Override - public Builder mergeFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws java.io.IOException { - com.google.pubsub.v1.StreamingPullResponse parsedMessage = null; - try { - parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - parsedMessage = (com.google.pubsub.v1.StreamingPullResponse) e.getUnfinishedMessage(); - throw e.unwrapIOException(); - } finally { - if (parsedMessage != null) { - mergeFrom(parsedMessage); - } - } - return this; + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(int index) { + return getReceivedMessagesFieldBuilder() + .addBuilder(index, com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); + } + /** + * + * + *
+     * Received Pub/Sub messages. This will not be empty.
+     * 
+ * + * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + */ + public java.util.List + getReceivedMessagesBuilderList() { + return getReceivedMessagesFieldBuilder().getBuilderList(); } - private int bitField0_; - - private java.util.List receivedMessages_ = - java.util.Collections.emptyList(); - - private void ensureReceivedMessagesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - receivedMessages_ = - new java.util.ArrayList(receivedMessages_); - bitField0_ |= 0x00000001; + private com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.ReceivedMessage, + com.google.pubsub.v1.ReceivedMessage.Builder, + com.google.pubsub.v1.ReceivedMessageOrBuilder> + getReceivedMessagesFieldBuilder() { + if (receivedMessagesBuilder_ == null) { + receivedMessagesBuilder_ = + new com.google.protobuf.RepeatedFieldBuilderV3< + com.google.pubsub.v1.ReceivedMessage, + com.google.pubsub.v1.ReceivedMessage.Builder, + com.google.pubsub.v1.ReceivedMessageOrBuilder>( + receivedMessages_, + ((bitField0_ & 0x00000001) != 0), + getParentForChildren(), + isClean()); + receivedMessages_ = null; } + return receivedMessagesBuilder_; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.pubsub.v1.ReceivedMessage, - com.google.pubsub.v1.ReceivedMessage.Builder, - com.google.pubsub.v1.ReceivedMessageOrBuilder> - receivedMessagesBuilder_; - + private com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + acknowledgeConfirmation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder> + acknowledgeConfirmationBuilder_; /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return Whether the acknowledgeConfirmation field is set. */ - public java.util.List getReceivedMessagesList() { - if (receivedMessagesBuilder_ == null) { - return java.util.Collections.unmodifiableList(receivedMessages_); - } else { - return receivedMessagesBuilder_.getMessageList(); - } + public boolean hasAcknowledgeConfirmation() { + return acknowledgeConfirmationBuilder_ != null || acknowledgeConfirmation_ != null; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return The acknowledgeConfirmation. */ - public int getReceivedMessagesCount() { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.size(); + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + getAcknowledgeConfirmation() { + if (acknowledgeConfirmationBuilder_ == null) { + return acknowledgeConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + .getDefaultInstance() + : acknowledgeConfirmation_; } else { - return receivedMessagesBuilder_.getCount(); + return acknowledgeConfirmationBuilder_.getMessage(); } } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public com.google.pubsub.v1.ReceivedMessage getReceivedMessages(int index) { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.get(index); + public Builder setAcknowledgeConfirmation( + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation value) { + if (acknowledgeConfirmationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + acknowledgeConfirmation_ = value; + onChanged(); } else { - return receivedMessagesBuilder_.getMessage(index); + acknowledgeConfirmationBuilder_.setMessage(value); } + + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder setReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.set(index, value); + public Builder setAcknowledgeConfirmation( + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder + builderForValue) { + if (acknowledgeConfirmationBuilder_ == null) { + acknowledgeConfirmation_ = builderForValue.build(); onChanged(); } else { - receivedMessagesBuilder_.setMessage(index, value); + acknowledgeConfirmationBuilder_.setMessage(builderForValue.build()); } + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder setReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.set(index, builderForValue.build()); + public Builder mergeAcknowledgeConfirmation( + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation value) { + if (acknowledgeConfirmationBuilder_ == null) { + if (acknowledgeConfirmation_ != null) { + acknowledgeConfirmation_ = + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.newBuilder( + acknowledgeConfirmation_) + .mergeFrom(value) + .buildPartial(); + } else { + acknowledgeConfirmation_ = value; + } onChanged(); } else { - receivedMessagesBuilder_.setMessage(index, builderForValue.build()); + acknowledgeConfirmationBuilder_.mergeFrom(value); } + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder addReceivedMessages(com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(value); + public Builder clearAcknowledgeConfirmation() { + if (acknowledgeConfirmationBuilder_ == null) { + acknowledgeConfirmation_ = null; onChanged(); } else { - receivedMessagesBuilder_.addMessage(value); + acknowledgeConfirmation_ = null; + acknowledgeConfirmationBuilder_ = null; } + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder addReceivedMessages(int index, com.google.pubsub.v1.ReceivedMessage value) { - if (receivedMessagesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(index, value); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(index, value); - } - return this; + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder + getAcknowledgeConfirmationBuilder() { + + onChanged(); + return getAcknowledgeConfirmationFieldBuilder().getBuilder(); } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder addReceivedMessages( - com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(builderForValue.build()); - onChanged(); + public com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder + getAcknowledgeConfirmationOrBuilder() { + if (acknowledgeConfirmationBuilder_ != null) { + return acknowledgeConfirmationBuilder_.getMessageOrBuilder(); } else { - receivedMessagesBuilder_.addMessage(builderForValue.build()); + return acknowledgeConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation + .getDefaultInstance() + : acknowledgeConfirmation_; } - return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * */ - public Builder addReceivedMessages( - int index, com.google.pubsub.v1.ReceivedMessage.Builder builderForValue) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.add(index, builderForValue.build()); - onChanged(); - } else { - receivedMessagesBuilder_.addMessage(index, builderForValue.build()); + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder> + getAcknowledgeConfirmationFieldBuilder() { + if (acknowledgeConfirmationBuilder_ == null) { + acknowledgeConfirmationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder>( + getAcknowledgeConfirmation(), getParentForChildren(), isClean()); + acknowledgeConfirmation_ = null; } - return this; + return acknowledgeConfirmationBuilder_; } + + private com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + modifyAckDeadlineConfirmation_; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder> + modifyAckDeadlineConfirmationBuilder_; /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return Whether the modifyAckDeadlineConfirmation field is set. */ - public Builder addAllReceivedMessages( - java.lang.Iterable values) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, receivedMessages_); - onChanged(); - } else { - receivedMessagesBuilder_.addAllMessages(values); - } - return this; + public boolean hasModifyAckDeadlineConfirmation() { + return modifyAckDeadlineConfirmationBuilder_ != null + || modifyAckDeadlineConfirmation_ != null; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return The modifyAckDeadlineConfirmation. */ - public Builder clearReceivedMessages() { - if (receivedMessagesBuilder_ == null) { - receivedMessages_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getModifyAckDeadlineConfirmation() { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + return modifyAckDeadlineConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .getDefaultInstance() + : modifyAckDeadlineConfirmation_; } else { - receivedMessagesBuilder_.clear(); + return modifyAckDeadlineConfirmationBuilder_.getMessage(); } - return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public Builder removeReceivedMessages(int index) { - if (receivedMessagesBuilder_ == null) { - ensureReceivedMessagesIsMutable(); - receivedMessages_.remove(index); + public Builder setModifyAckDeadlineConfirmation( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation value) { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + if (value == null) { + throw new NullPointerException(); + } + modifyAckDeadlineConfirmation_ = value; onChanged(); } else { - receivedMessagesBuilder_.remove(index); + modifyAckDeadlineConfirmationBuilder_.setMessage(value); } + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public com.google.pubsub.v1.ReceivedMessage.Builder getReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder().getBuilder(index); + public Builder setModifyAckDeadlineConfirmation( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder + builderForValue) { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + modifyAckDeadlineConfirmation_ = builderForValue.build(); + onChanged(); + } else { + modifyAckDeadlineConfirmationBuilder_.setMessage(builderForValue.build()); + } + + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index) { - if (receivedMessagesBuilder_ == null) { - return receivedMessages_.get(index); + public Builder mergeModifyAckDeadlineConfirmation( + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation value) { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + if (modifyAckDeadlineConfirmation_ != null) { + modifyAckDeadlineConfirmation_ = + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.newBuilder( + modifyAckDeadlineConfirmation_) + .mergeFrom(value) + .buildPartial(); + } else { + modifyAckDeadlineConfirmation_ = value; + } + onChanged(); } else { - return receivedMessagesBuilder_.getMessageOrBuilder(index); + modifyAckDeadlineConfirmationBuilder_.mergeFrom(value); } + + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public java.util.List - getReceivedMessagesOrBuilderList() { - if (receivedMessagesBuilder_ != null) { - return receivedMessagesBuilder_.getMessageOrBuilderList(); + public Builder clearModifyAckDeadlineConfirmation() { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + modifyAckDeadlineConfirmation_ = null; + onChanged(); } else { - return java.util.Collections.unmodifiableList(receivedMessages_); + modifyAckDeadlineConfirmation_ = null; + modifyAckDeadlineConfirmationBuilder_ = null; } + + return this; } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder() { - return getReceivedMessagesFieldBuilder() - .addBuilder(com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder + getModifyAckDeadlineConfirmationBuilder() { + + onChanged(); + return getModifyAckDeadlineConfirmationFieldBuilder().getBuilder(); } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public com.google.pubsub.v1.ReceivedMessage.Builder addReceivedMessagesBuilder(int index) { - return getReceivedMessagesFieldBuilder() - .addBuilder(index, com.google.pubsub.v1.ReceivedMessage.getDefaultInstance()); + public com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder + getModifyAckDeadlineConfirmationOrBuilder() { + if (modifyAckDeadlineConfirmationBuilder_ != null) { + return modifyAckDeadlineConfirmationBuilder_.getMessageOrBuilder(); + } else { + return modifyAckDeadlineConfirmation_ == null + ? com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + .getDefaultInstance() + : modifyAckDeadlineConfirmation_; + } } /** * * *
-     * Received Pub/Sub messages. This will not be empty.
+     * This field will only be set if `enable_exactly_once_delivery` is set to
+     * `true`.
      * 
* - * repeated .google.pubsub.v1.ReceivedMessage received_messages = 1; + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * */ - public java.util.List - getReceivedMessagesBuilderList() { - return getReceivedMessagesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.pubsub.v1.ReceivedMessage, - com.google.pubsub.v1.ReceivedMessage.Builder, - com.google.pubsub.v1.ReceivedMessageOrBuilder> - getReceivedMessagesFieldBuilder() { - if (receivedMessagesBuilder_ == null) { - receivedMessagesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.pubsub.v1.ReceivedMessage, - com.google.pubsub.v1.ReceivedMessage.Builder, - com.google.pubsub.v1.ReceivedMessageOrBuilder>( - receivedMessages_, - ((bitField0_ & 0x00000001) != 0), - getParentForChildren(), - isClean()); - receivedMessages_ = null; + private com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder> + getModifyAckDeadlineConfirmationFieldBuilder() { + if (modifyAckDeadlineConfirmationBuilder_ == null) { + modifyAckDeadlineConfirmationBuilder_ = + new com.google.protobuf.SingleFieldBuilderV3< + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation.Builder, + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder>( + getModifyAckDeadlineConfirmation(), getParentForChildren(), isClean()); + modifyAckDeadlineConfirmation_ = null; } - return receivedMessagesBuilder_; + return modifyAckDeadlineConfirmationBuilder_; } private com.google.pubsub.v1.StreamingPullResponse.SubscriptionProperties diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java index acaeb4240..b2bb7ba25 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/StreamingPullResponseOrBuilder.java @@ -75,6 +75,97 @@ public interface StreamingPullResponseOrBuilder */ com.google.pubsub.v1.ReceivedMessageOrBuilder getReceivedMessagesOrBuilder(int index); + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return Whether the acknowledgeConfirmation field is set. + */ + boolean hasAcknowledgeConfirmation(); + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + * + * @return The acknowledgeConfirmation. + */ + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation getAcknowledgeConfirmation(); + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmation acknowledge_confirmation = 5; + * + */ + com.google.pubsub.v1.StreamingPullResponse.AcknowledgeConfirmationOrBuilder + getAcknowledgeConfirmationOrBuilder(); + + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return Whether the modifyAckDeadlineConfirmation field is set. + */ + boolean hasModifyAckDeadlineConfirmation(); + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + * + * @return The modifyAckDeadlineConfirmation. + */ + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation + getModifyAckDeadlineConfirmation(); + /** + * + * + *
+   * This field will only be set if `enable_exactly_once_delivery` is set to
+   * `true`.
+   * 
+ * + * + * .google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + * + */ + com.google.pubsub.v1.StreamingPullResponse.ModifyAckDeadlineConfirmationOrBuilder + getModifyAckDeadlineConfirmationOrBuilder(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java index 6b45b5f6c..0543e587d 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/Subscription.java @@ -204,6 +204,11 @@ private Subscription( detached_ = input.readBool(); break; } + case 128: + { + enableExactlyOnceDelivery_ = input.readBool(); + break; + } case 138: { com.google.protobuf.Duration.Builder subBuilder = null; @@ -946,6 +951,32 @@ public boolean getDetached() { return detached_; } + public static final int ENABLE_EXACTLY_ONCE_DELIVERY_FIELD_NUMBER = 16; + private boolean enableExactlyOnceDelivery_; + /** + * + * + *
+   * If true, Pub/Sub provides the following guarantees for the delivery of
+   * a message with a given value of `message_id` on this subscription:
+   * * The message sent to a subscriber is guaranteed not to be resent
+   * before the message's acknowledgement deadline expires.
+   * * An acknowledged message will not be resent to a subscriber.
+   * Note that subscribers may still receive multiple copies of a message
+   * when `enable_exactly_once_delivery` is true if the message was published
+   * multiple times by a publisher client. These copies are  considered distinct
+   * by Pub/Sub and have distinct `message_id` values.
+   * 
+ * + * bool enable_exactly_once_delivery = 16; + * + * @return The enableExactlyOnceDelivery. + */ + @java.lang.Override + public boolean getEnableExactlyOnceDelivery() { + return enableExactlyOnceDelivery_; + } + public static final int TOPIC_MESSAGE_RETENTION_DURATION_FIELD_NUMBER = 17; private com.google.protobuf.Duration topicMessageRetentionDuration_; /** @@ -1067,6 +1098,9 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io if (detached_ != false) { output.writeBool(15, detached_); } + if (enableExactlyOnceDelivery_ != false) { + output.writeBool(16, enableExactlyOnceDelivery_); + } if (topicMessageRetentionDuration_ != null) { output.writeMessage(17, getTopicMessageRetentionDuration()); } @@ -1127,6 +1161,9 @@ public int getSerializedSize() { if (detached_ != false) { size += com.google.protobuf.CodedOutputStream.computeBoolSize(15, detached_); } + if (enableExactlyOnceDelivery_ != false) { + size += com.google.protobuf.CodedOutputStream.computeBoolSize(16, enableExactlyOnceDelivery_); + } if (topicMessageRetentionDuration_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize( @@ -1175,6 +1212,7 @@ public boolean equals(final java.lang.Object obj) { if (!getRetryPolicy().equals(other.getRetryPolicy())) return false; } if (getDetached() != other.getDetached()) return false; + if (getEnableExactlyOnceDelivery() != other.getEnableExactlyOnceDelivery()) return false; if (hasTopicMessageRetentionDuration() != other.hasTopicMessageRetentionDuration()) return false; if (hasTopicMessageRetentionDuration()) { @@ -1230,6 +1268,8 @@ public int hashCode() { } hash = (37 * hash) + DETACHED_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDetached()); + hash = (37 * hash) + ENABLE_EXACTLY_ONCE_DELIVERY_FIELD_NUMBER; + hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getEnableExactlyOnceDelivery()); if (hasTopicMessageRetentionDuration()) { hash = (37 * hash) + TOPIC_MESSAGE_RETENTION_DURATION_FIELD_NUMBER; hash = (53 * hash) + getTopicMessageRetentionDuration().hashCode(); @@ -1443,6 +1483,8 @@ public Builder clear() { } detached_ = false; + enableExactlyOnceDelivery_ = false; + if (topicMessageRetentionDurationBuilder_ == null) { topicMessageRetentionDuration_ = null; } else { @@ -1510,6 +1552,7 @@ public com.google.pubsub.v1.Subscription buildPartial() { result.retryPolicy_ = retryPolicyBuilder_.build(); } result.detached_ = detached_; + result.enableExactlyOnceDelivery_ = enableExactlyOnceDelivery_; if (topicMessageRetentionDurationBuilder_ == null) { result.topicMessageRetentionDuration_ = topicMessageRetentionDuration_; } else { @@ -1604,6 +1647,9 @@ public Builder mergeFrom(com.google.pubsub.v1.Subscription other) { if (other.getDetached() != false) { setDetached(other.getDetached()); } + if (other.getEnableExactlyOnceDelivery() != false) { + setEnableExactlyOnceDelivery(other.getEnableExactlyOnceDelivery()); + } if (other.hasTopicMessageRetentionDuration()) { mergeTopicMessageRetentionDuration(other.getTopicMessageRetentionDuration()); } @@ -3612,6 +3658,82 @@ public Builder clearDetached() { return this; } + private boolean enableExactlyOnceDelivery_; + /** + * + * + *
+     * If true, Pub/Sub provides the following guarantees for the delivery of
+     * a message with a given value of `message_id` on this subscription:
+     * * The message sent to a subscriber is guaranteed not to be resent
+     * before the message's acknowledgement deadline expires.
+     * * An acknowledged message will not be resent to a subscriber.
+     * Note that subscribers may still receive multiple copies of a message
+     * when `enable_exactly_once_delivery` is true if the message was published
+     * multiple times by a publisher client. These copies are  considered distinct
+     * by Pub/Sub and have distinct `message_id` values.
+     * 
+ * + * bool enable_exactly_once_delivery = 16; + * + * @return The enableExactlyOnceDelivery. + */ + @java.lang.Override + public boolean getEnableExactlyOnceDelivery() { + return enableExactlyOnceDelivery_; + } + /** + * + * + *
+     * If true, Pub/Sub provides the following guarantees for the delivery of
+     * a message with a given value of `message_id` on this subscription:
+     * * The message sent to a subscriber is guaranteed not to be resent
+     * before the message's acknowledgement deadline expires.
+     * * An acknowledged message will not be resent to a subscriber.
+     * Note that subscribers may still receive multiple copies of a message
+     * when `enable_exactly_once_delivery` is true if the message was published
+     * multiple times by a publisher client. These copies are  considered distinct
+     * by Pub/Sub and have distinct `message_id` values.
+     * 
+ * + * bool enable_exactly_once_delivery = 16; + * + * @param value The enableExactlyOnceDelivery to set. + * @return This builder for chaining. + */ + public Builder setEnableExactlyOnceDelivery(boolean value) { + + enableExactlyOnceDelivery_ = value; + onChanged(); + return this; + } + /** + * + * + *
+     * If true, Pub/Sub provides the following guarantees for the delivery of
+     * a message with a given value of `message_id` on this subscription:
+     * * The message sent to a subscriber is guaranteed not to be resent
+     * before the message's acknowledgement deadline expires.
+     * * An acknowledged message will not be resent to a subscriber.
+     * Note that subscribers may still receive multiple copies of a message
+     * when `enable_exactly_once_delivery` is true if the message was published
+     * multiple times by a publisher client. These copies are  considered distinct
+     * by Pub/Sub and have distinct `message_id` values.
+     * 
+ * + * bool enable_exactly_once_delivery = 16; + * + * @return This builder for chaining. + */ + public Builder clearEnableExactlyOnceDelivery() { + + enableExactlyOnceDelivery_ = false; + onChanged(); + return this; + } + private com.google.protobuf.Duration topicMessageRetentionDuration_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Duration, diff --git a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java index 329ab1284..64a0a771c 100644 --- a/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java +++ b/proto-google-cloud-pubsub-v1/src/main/java/com/google/pubsub/v1/SubscriptionOrBuilder.java @@ -507,6 +507,27 @@ public interface SubscriptionOrBuilder */ boolean getDetached(); + /** + * + * + *
+   * If true, Pub/Sub provides the following guarantees for the delivery of
+   * a message with a given value of `message_id` on this subscription:
+   * * The message sent to a subscriber is guaranteed not to be resent
+   * before the message's acknowledgement deadline expires.
+   * * An acknowledged message will not be resent to a subscriber.
+   * Note that subscribers may still receive multiple copies of a message
+   * when `enable_exactly_once_delivery` is true if the message was published
+   * multiple times by a publisher client. These copies are  considered distinct
+   * by Pub/Sub and have distinct `message_id` values.
+   * 
+ * + * bool enable_exactly_once_delivery = 16; + * + * @return The enableExactlyOnceDelivery. + */ + boolean getEnableExactlyOnceDelivery(); + /** * * diff --git a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto index b1d65626c..172801ba3 100644 --- a/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto +++ b/proto-google-cloud-pubsub-v1/src/main/proto/google/pubsub/v1/pubsub.proto @@ -752,6 +752,19 @@ message Subscription { // the endpoint will not be made. bool detached = 15; + // If true, Pub/Sub provides the following guarantees for the delivery of + // a message with a given value of `message_id` on this subscription: + // + // * The message sent to a subscriber is guaranteed not to be resent + // before the message's acknowledgement deadline expires. + // * An acknowledged message will not be resent to a subscriber. + // + // Note that subscribers may still receive multiple copies of a message + // when `enable_exactly_once_delivery` is true if the message was published + // multiple times by a publisher client. These copies are considered distinct + // by Pub/Sub and have distinct `message_id` values. + bool enable_exactly_once_delivery = 16; + // Output only. Indicates the minimum duration for which a message is retained // after it is published to the subscription's topic. If this field is set, // messages published to the subscription's topic in the last @@ -1163,8 +1176,35 @@ message StreamingPullRequest { // Response for the `StreamingPull` method. This response is used to stream // messages from the server to the client. message StreamingPullResponse { + // Acknowledgement IDs sent in one or more previous requests to acknowledge a + // previously received message. + message AcknowledgeConfirmation { + // Successfully processed acknowledgement IDs. + repeated string ack_ids = 1 [ctype = CORD]; + + // List of acknowledgement IDs that were malformed or whose acknowledgement + // deadline has expired. + repeated string invalid_ack_ids = 2 [ctype = CORD]; + + // List of acknowledgement IDs that were out of order. + repeated string unordered_ack_ids = 3 [ctype = CORD]; + } + + // Acknowledgement IDs sent in one or more previous requests to modify the + // deadline for a specific message. + message ModifyAckDeadlineConfirmation { + // Successfully processed acknowledgement IDs. + repeated string ack_ids = 1 [ctype = CORD]; + + // List of acknowledgement IDs that were malformed or whose acknowledgement + // deadline has expired. + repeated string invalid_ack_ids = 2 [ctype = CORD]; + } + // Subscription properties sent as part of the response. message SubscriptionProperties { + // True iff exactly once delivery is enabled for this subscription. + bool exactly_once_delivery_enabled = 1; // True iff message ordering is enabled for this subscription. bool message_ordering_enabled = 2; } @@ -1172,6 +1212,16 @@ message StreamingPullResponse { // Received Pub/Sub messages. This will not be empty. repeated ReceivedMessage received_messages = 1; + reserved 2; + + // This field will only be set if `enable_exactly_once_delivery` is set to + // `true`. + AcknowledgeConfirmation acknowledge_confirmation = 5; + + // This field will only be set if `enable_exactly_once_delivery` is set to + // `true`. + ModifyAckDeadlineConfirmation modify_ack_deadline_confirmation = 3; + // Properties associated with this subscription. SubscriptionProperties subscription_properties = 4; }