diff --git a/proto-google-cloud-pubsublite-v1/clirr-ignored-differences.xml b/proto-google-cloud-pubsublite-v1/clirr-ignored-differences.xml index f04292863..5e2cf5d37 100644 --- a/proto-google-cloud-pubsublite-v1/clirr-ignored-differences.xml +++ b/proto-google-cloud-pubsublite-v1/clirr-ignored-differences.xml @@ -1,6 +1,20 @@ + + 6011 + com/google/cloud/pubsublite/proto/ExportConfig + STATUSES_FIELD_NUMBER + + + 7002 + com/google/cloud/pubsublite/proto/ExportConfig* + * + + + 8001 + com/google/cloud/pubsublite/proto/ExportConfig* + 7012 com/google/cloud/pubsublite/proto/*OrBuilder diff --git a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/CommonProto.java b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/CommonProto.java index 233676a76..45518dbb7 100644 --- a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/CommonProto.java +++ b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/CommonProto.java @@ -83,10 +83,6 @@ public static void registerAllExtensions(com.google.protobuf.ExtensionRegistry r internal_static_google_cloud_pubsublite_v1_ExportConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internal_static_google_cloud_pubsublite_v1_ExportConfig_fieldAccessorTable; - static final com.google.protobuf.Descriptors.Descriptor - internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor; - static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_fieldAccessorTable; static final com.google.protobuf.Descriptors.Descriptor internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; static final com.google.protobuf.GeneratedMessageV3.FieldAccessorTable @@ -108,83 +104,79 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { + "o\022\032google.cloud.pubsublite.v1\032\037google/ap" + "i/field_behavior.proto\032\031google/api/resou" + "rce.proto\032\036google/protobuf/duration.prot" - + "o\032\037google/protobuf/timestamp.proto\032\027goog" - + "le/rpc/status.proto\"!\n\017AttributeValues\022\016" - + "\n\006values\030\001 \003(\014\"\211\002\n\rPubSubMessage\022\013\n\003key\030" - + "\001 \001(\014\022\014\n\004data\030\002 \001(\014\022M\n\nattributes\030\003 \003(\0132" - + "9.google.cloud.pubsublite.v1.PubSubMessa" - + "ge.AttributesEntry\022.\n\nevent_time\030\004 \001(\0132\032" - + ".google.protobuf.Timestamp\032^\n\017Attributes" - + "Entry\022\013\n\003key\030\001 \001(\t\022:\n\005value\030\002 \001(\0132+.goog" - + "le.cloud.pubsublite.v1.AttributeValues:\002" - + "8\001\"\030\n\006Cursor\022\016\n\006offset\030\001 \001(\003\"\310\001\n\020Sequenc" - + "edMessage\0222\n\006cursor\030\001 \001(\0132\".google.cloud" - + ".pubsublite.v1.Cursor\0220\n\014publish_time\030\002 " - + "\001(\0132\032.google.protobuf.Timestamp\022:\n\007messa" - + "ge\030\003 \001(\0132).google.cloud.pubsublite.v1.Pu" - + "bSubMessage\022\022\n\nsize_bytes\030\004 \001(\003\"\250\001\n\013Rese" - + "rvation\022\014\n\004name\030\001 \001(\t\022\033\n\023throughput_capa" - + "city\030\002 \001(\003:n\352Ak\n%pubsublite.googleapis.c" - + "om/Reservation\022Bprojects/{project}/locat" - + "ions/{location}/reservations/{reservatio" - + "n}\"\367\005\n\005Topic\022\014\n\004name\030\001 \001(\t\022K\n\020partition_" - + "config\030\002 \001(\01321.google.cloud.pubsublite.v" - + "1.Topic.PartitionConfig\022K\n\020retention_con" - + "fig\030\003 \001(\01321.google.cloud.pubsublite.v1.T" - + "opic.RetentionConfig\022O\n\022reservation_conf" - + "ig\030\004 \001(\01323.google.cloud.pubsublite.v1.To" - + "pic.ReservationConfig\032\332\001\n\017PartitionConfi" - + "g\022\r\n\005count\030\001 \001(\003\022\023\n\005scale\030\002 \001(\005B\002\030\001H\000\022N\n" - + "\010capacity\030\003 \001(\0132:.google.cloud.pubsublit" - + "e.v1.Topic.PartitionConfig.CapacityH\000\032F\n" - + "\010Capacity\022\033\n\023publish_mib_per_sec\030\001 \001(\005\022\035" - + "\n\025subscribe_mib_per_sec\030\002 \001(\005B\013\n\tdimensi" - + "on\032Y\n\017RetentionConfig\022\033\n\023per_partition_b" - + "ytes\030\001 \001(\003\022)\n\006period\030\002 \001(\0132\031.google.prot" - + "obuf.Duration\032_\n\021ReservationConfig\022J\n\026th" - + "roughput_reservation\030\001 \001(\tB*\372A\'\n%pubsubl" - + "ite.googleapis.com/Reservation:\\\352AY\n\037pub" - + "sublite.googleapis.com/Topic\0226projects/{" - + "project}/locations/{location}/topics/{to" - + "pic}\"\305\004\n\014Subscription\022\014\n\004name\030\001 \001(\t\0223\n\005t" - + "opic\030\002 \001(\tB$\372A!\n\037pubsublite.googleapis.c" - + "om/Topic\022P\n\017delivery_config\030\003 \001(\01327.goog" - + "le.cloud.pubsublite.v1.Subscription.Deli" - + "veryConfig\022?\n\rexport_config\030\004 \001(\0132(.goog" - + "le.cloud.pubsublite.v1.ExportConfig\032\353\001\n\016" - + "DeliveryConfig\022i\n\024delivery_requirement\030\003" - + " \001(\0162K.google.cloud.pubsublite.v1.Subscr" - + "iption.DeliveryConfig.DeliveryRequiremen" - + "t\"n\n\023DeliveryRequirement\022$\n DELIVERY_REQ" - + "UIREMENT_UNSPECIFIED\020\000\022\027\n\023DELIVER_IMMEDI" - + "ATELY\020\001\022\030\n\024DELIVER_AFTER_STORED\020\002:q\352An\n&" - + "pubsublite.googleapis.com/Subscription\022D" - + "projects/{project}/locations/{location}/" - + "subscriptions/{subscription}\"\336\004\n\014ExportC" - + "onfig\022E\n\rdesired_state\030\001 \001(\0162..google.cl" - + "oud.pubsublite.v1.ExportConfig.State\022J\n\r" - + "current_state\030\006 \001(\0162..google.cloud.pubsu" - + "blite.v1.ExportConfig.StateB\003\340A\003\022Q\n\010stat" - + "uses\030\004 \003(\01328.google.cloud.pubsublite.v1." - + "ExportConfig.PartitionStatusB\005\030\001\340A\003\022B\n\021d" - + "ead_letter_topic\030\005 \001(\tB\'\340A\001\372A!\n\037pubsubli" - + "te.googleapis.com/Topic\022N\n\rpubsub_config" - + "\030\003 \001(\01325.google.cloud.pubsublite.v1.Expo" - + "rtConfig.PubSubConfigH\000\032H\n\017PartitionStat" - + "us\022\021\n\tpartition\030\001 \001(\003\022\"\n\006status\030\002 \001(\0132\022." - + "google.rpc.Status\032\035\n\014PubSubConfig\022\r\n\005top" - + "ic\030\001 \001(\t\"\\\n\005State\022\025\n\021STATE_UNSPECIFIED\020\000" - + "\022\n\n\006ACTIVE\020\001\022\n\n\006PAUSED\020\002\022\025\n\021PERMISSION_D" - + "ENIED\020\003\022\r\n\tNOT_FOUND\020\004B\r\n\013destination\"z\n" - + "\nTimeTarget\0222\n\014publish_time\030\001 \001(\0132\032.goog" - + "le.protobuf.TimestampH\000\0220\n\nevent_time\030\002 " - + "\001(\0132\032.google.protobuf.TimestampH\000B\006\n\004tim" - + "eB\325\001\n!com.google.cloud.pubsublite.protoB" - + "\013CommonProtoP\001ZDgoogle.golang.org/genpro" - + "to/googleapis/cloud/pubsublite/v1;pubsub" - + "lite\370\001\001\252\002\032Google.Cloud.PubSubLite.V1\312\002\032G" - + "oogle\\Cloud\\PubSubLite\\V1\352\002\035Google::Clou" - + "d::PubSubLite::V1b\006proto3" + + "o\032\037google/protobuf/timestamp.proto\"!\n\017At" + + "tributeValues\022\016\n\006values\030\001 \003(\014\"\211\002\n\rPubSub" + + "Message\022\013\n\003key\030\001 \001(\014\022\014\n\004data\030\002 \001(\014\022M\n\nat" + + "tributes\030\003 \003(\01329.google.cloud.pubsublite" + + ".v1.PubSubMessage.AttributesEntry\022.\n\neve" + + "nt_time\030\004 \001(\0132\032.google.protobuf.Timestam" + + "p\032^\n\017AttributesEntry\022\013\n\003key\030\001 \001(\t\022:\n\005val" + + "ue\030\002 \001(\0132+.google.cloud.pubsublite.v1.At" + + "tributeValues:\0028\001\"\030\n\006Cursor\022\016\n\006offset\030\001 " + + "\001(\003\"\310\001\n\020SequencedMessage\0222\n\006cursor\030\001 \001(\013" + + "2\".google.cloud.pubsublite.v1.Cursor\0220\n\014" + + "publish_time\030\002 \001(\0132\032.google.protobuf.Tim" + + "estamp\022:\n\007message\030\003 \001(\0132).google.cloud.p" + + "ubsublite.v1.PubSubMessage\022\022\n\nsize_bytes" + + "\030\004 \001(\003\"\250\001\n\013Reservation\022\014\n\004name\030\001 \001(\t\022\033\n\023" + + "throughput_capacity\030\002 \001(\003:n\352Ak\n%pubsubli" + + "te.googleapis.com/Reservation\022Bprojects/" + + "{project}/locations/{location}/reservati" + + "ons/{reservation}\"\367\005\n\005Topic\022\014\n\004name\030\001 \001(" + + "\t\022K\n\020partition_config\030\002 \001(\01321.google.clo" + + "ud.pubsublite.v1.Topic.PartitionConfig\022K" + + "\n\020retention_config\030\003 \001(\01321.google.cloud." + + "pubsublite.v1.Topic.RetentionConfig\022O\n\022r" + + "eservation_config\030\004 \001(\01323.google.cloud.p" + + "ubsublite.v1.Topic.ReservationConfig\032\332\001\n" + + "\017PartitionConfig\022\r\n\005count\030\001 \001(\003\022\023\n\005scale" + + "\030\002 \001(\005B\002\030\001H\000\022N\n\010capacity\030\003 \001(\0132:.google." + + "cloud.pubsublite.v1.Topic.PartitionConfi" + + "g.CapacityH\000\032F\n\010Capacity\022\033\n\023publish_mib_" + + "per_sec\030\001 \001(\005\022\035\n\025subscribe_mib_per_sec\030\002" + + " \001(\005B\013\n\tdimension\032Y\n\017RetentionConfig\022\033\n\023" + + "per_partition_bytes\030\001 \001(\003\022)\n\006period\030\002 \001(" + + "\0132\031.google.protobuf.Duration\032_\n\021Reservat" + + "ionConfig\022J\n\026throughput_reservation\030\001 \001(" + + "\tB*\372A\'\n%pubsublite.googleapis.com/Reserv" + + "ation:\\\352AY\n\037pubsublite.googleapis.com/To" + + "pic\0226projects/{project}/locations/{locat" + + "ion}/topics/{topic}\"\305\004\n\014Subscription\022\014\n\004" + + "name\030\001 \001(\t\0223\n\005topic\030\002 \001(\tB$\372A!\n\037pubsubli" + + "te.googleapis.com/Topic\022P\n\017delivery_conf" + + "ig\030\003 \001(\01327.google.cloud.pubsublite.v1.Su" + + "bscription.DeliveryConfig\022?\n\rexport_conf" + + "ig\030\004 \001(\0132(.google.cloud.pubsublite.v1.Ex" + + "portConfig\032\353\001\n\016DeliveryConfig\022i\n\024deliver" + + "y_requirement\030\003 \001(\0162K.google.cloud.pubsu" + + "blite.v1.Subscription.DeliveryConfig.Del" + + "iveryRequirement\"n\n\023DeliveryRequirement\022" + + "$\n DELIVERY_REQUIREMENT_UNSPECIFIED\020\000\022\027\n" + + "\023DELIVER_IMMEDIATELY\020\001\022\030\n\024DELIVER_AFTER_" + + "STORED\020\002:q\352An\n&pubsublite.googleapis.com" + + "/Subscription\022Dprojects/{project}/locati" + + "ons/{location}/subscriptions/{subscripti" + + "on}\"\301\003\n\014ExportConfig\022E\n\rdesired_state\030\001 " + + "\001(\0162..google.cloud.pubsublite.v1.ExportC" + + "onfig.State\022J\n\rcurrent_state\030\006 \001(\0162..goo" + + "gle.cloud.pubsublite.v1.ExportConfig.Sta" + + "teB\003\340A\003\022B\n\021dead_letter_topic\030\005 \001(\tB\'\340A\001\372" + + "A!\n\037pubsublite.googleapis.com/Topic\022N\n\rp" + + "ubsub_config\030\003 \001(\01325.google.cloud.pubsub" + + "lite.v1.ExportConfig.PubSubConfigH\000\032\035\n\014P" + + "ubSubConfig\022\r\n\005topic\030\001 \001(\t\"\\\n\005State\022\025\n\021S" + + "TATE_UNSPECIFIED\020\000\022\n\n\006ACTIVE\020\001\022\n\n\006PAUSED" + + "\020\002\022\025\n\021PERMISSION_DENIED\020\003\022\r\n\tNOT_FOUND\020\004" + + "B\r\n\013destination\"z\n\nTimeTarget\0222\n\014publish" + + "_time\030\001 \001(\0132\032.google.protobuf.TimestampH" + + "\000\0220\n\nevent_time\030\002 \001(\0132\032.google.protobuf." + + "TimestampH\000B\006\n\004timeB\325\001\n!com.google.cloud" + + ".pubsublite.protoB\013CommonProtoP\001ZDgoogle" + + ".golang.org/genproto/googleapis/cloud/pu" + + "bsublite/v1;pubsublite\370\001\001\252\002\032Google.Cloud" + + ".PubSubLite.V1\312\002\032Google\\Cloud\\PubSubLite" + + "\\V1\352\002\035Google::Cloud::PubSubLite::V1b\006pro" + + "to3" }; descriptor = com.google.protobuf.Descriptors.FileDescriptor.internalBuildGeneratedFileFrom( @@ -194,7 +186,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(), com.google.protobuf.DurationProto.getDescriptor(), com.google.protobuf.TimestampProto.getDescriptor(), - com.google.rpc.StatusProto.getDescriptor(), }); internal_static_google_cloud_pubsublite_v1_AttributeValues_descriptor = getDescriptor().getMessageTypes().get(0); @@ -308,23 +299,10 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_pubsublite_v1_ExportConfig_descriptor, new java.lang.String[] { - "DesiredState", - "CurrentState", - "Statuses", - "DeadLetterTopic", - "PubsubConfig", - "Destination", - }); - internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor = - internal_static_google_cloud_pubsublite_v1_ExportConfig_descriptor.getNestedTypes().get(0); - internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_fieldAccessorTable = - new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( - internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor, - new java.lang.String[] { - "Partition", "Status", + "DesiredState", "CurrentState", "DeadLetterTopic", "PubsubConfig", "Destination", }); internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor = - internal_static_google_cloud_pubsublite_v1_ExportConfig_descriptor.getNestedTypes().get(1); + internal_static_google_cloud_pubsublite_v1_ExportConfig_descriptor.getNestedTypes().get(0); internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_fieldAccessorTable = new com.google.protobuf.GeneratedMessageV3.FieldAccessorTable( internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor, @@ -350,7 +328,6 @@ public static com.google.protobuf.Descriptors.FileDescriptor getDescriptor() { com.google.api.ResourceProto.getDescriptor(); com.google.protobuf.DurationProto.getDescriptor(); com.google.protobuf.TimestampProto.getDescriptor(); - com.google.rpc.StatusProto.getDescriptor(); } // @@protoc_insertion_point(outer_class_scope) diff --git a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfig.java b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfig.java index 93150a084..f1ed9aa80 100644 --- a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfig.java +++ b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfig.java @@ -41,7 +41,6 @@ private ExportConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) private ExportConfig() { desiredState_ = 0; currentState_ = 0; - statuses_ = java.util.Collections.emptyList(); deadLetterTopic_ = ""; } @@ -272,102 +271,67 @@ private State(int value) { // @@protoc_insertion_point(enum_scope:google.cloud.pubsublite.v1.ExportConfig.State) } - public interface PartitionStatusOrBuilder + public interface PubSubConfigOrBuilder extends - // @@protoc_insertion_point(interface_extends:google.cloud.pubsublite.v1.ExportConfig.PartitionStatus) + // @@protoc_insertion_point(interface_extends:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) com.google.protobuf.MessageOrBuilder { /** * * *
-     * The partition number.
-     * 
- * - * int64 partition = 1; - * - * @return The partition. - */ - long getPartition(); - - /** - * - * - *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
+     * The name of the Pub/Sub topic.
+     * Structured like: projects/{project_number}/topics/{topic_id}.
+     * The topic may be changed.
      * 
* - * .google.rpc.Status status = 2; + * string topic = 1; * - * @return Whether the status field is set. + * @return The topic. */ - boolean hasStatus(); + java.lang.String getTopic(); /** * * *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
+     * The name of the Pub/Sub topic.
+     * Structured like: projects/{project_number}/topics/{topic_id}.
+     * The topic may be changed.
      * 
* - * .google.rpc.Status status = 2; - * - * @return The status. - */ - com.google.rpc.Status getStatus(); - /** - * - * - *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
-     * 
+ * string topic = 1; * - * .google.rpc.Status status = 2; + * @return The bytes for topic. */ - com.google.rpc.StatusOrBuilder getStatusOrBuilder(); + com.google.protobuf.ByteString getTopicBytes(); } /** * * *
-   * The export status of a partition.
+   * Configuration for exporting to a Pub/Sub topic.
    * 
* - * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PartitionStatus} + * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PubSubConfig} */ - public static final class PartitionStatus extends com.google.protobuf.GeneratedMessageV3 + public static final class PubSubConfig extends com.google.protobuf.GeneratedMessageV3 implements - // @@protoc_insertion_point(message_implements:google.cloud.pubsublite.v1.ExportConfig.PartitionStatus) - PartitionStatusOrBuilder { + // @@protoc_insertion_point(message_implements:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) + PubSubConfigOrBuilder { private static final long serialVersionUID = 0L; - // Use PartitionStatus.newBuilder() to construct. - private PartitionStatus(com.google.protobuf.GeneratedMessageV3.Builder builder) { + // Use PubSubConfig.newBuilder() to construct. + private PubSubConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } - private PartitionStatus() {} + private PubSubConfig() { + topic_ = ""; + } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PartitionStatus(); + return new PubSubConfig(); } @java.lang.Override @@ -377,99 +341,70 @@ public final com.google.protobuf.UnknownFieldSet getUnknownFields() { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor; + .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_fieldAccessorTable + .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.class, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder.class); - } - - public static final int PARTITION_FIELD_NUMBER = 1; - private long partition_; - /** - * - * - *
-     * The partition number.
-     * 
- * - * int64 partition = 1; - * - * @return The partition. - */ - @java.lang.Override - public long getPartition() { - return partition_; + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.class, + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.Builder.class); } - public static final int STATUS_FIELD_NUMBER = 2; - private com.google.rpc.Status status_; + public static final int TOPIC_FIELD_NUMBER = 1; + private volatile java.lang.Object topic_; /** * * *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
+     * The name of the Pub/Sub topic.
+     * Structured like: projects/{project_number}/topics/{topic_id}.
+     * The topic may be changed.
      * 
* - * .google.rpc.Status status = 2; + * string topic = 1; * - * @return Whether the status field is set. + * @return The topic. */ @java.lang.Override - public boolean hasStatus() { - return status_ != null; + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + return (java.lang.String) ref; + } else { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } } /** * * *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
+     * The name of the Pub/Sub topic.
+     * Structured like: projects/{project_number}/topics/{topic_id}.
+     * The topic may be changed.
      * 
* - * .google.rpc.Status status = 2; - * - * @return The status. - */ - @java.lang.Override - public com.google.rpc.Status getStatus() { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; - } - /** - * - * - *
-     * If the export for a partition is healthy and the desired state is
-     * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-     * the export is `PAUSED`, the status code will be `CANCELLED`.
-     * If the export has been suspended due to an error, the status will be
-     * populated with an error code and details. The service will automatically
-     * retry after a period of time, and will update the status code to `OK` if
-     * export subsequently succeeds.
-     * 
+ * string topic = 1; * - * .google.rpc.Status status = 2; + * @return The bytes for topic. */ @java.lang.Override - public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { - return getStatus(); + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof java.lang.String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } private byte memoizedIsInitialized = -1; @@ -486,11 +421,8 @@ public final boolean isInitialized() { @java.lang.Override public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (partition_ != 0L) { - output.writeInt64(1, partition_); - } - if (status_ != null) { - output.writeMessage(2, getStatus()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); } getUnknownFields().writeTo(output); } @@ -501,11 +433,8 @@ public int getSerializedSize() { if (size != -1) return size; size = 0; - if (partition_ != 0L) { - size += com.google.protobuf.CodedOutputStream.computeInt64Size(1, partition_); - } - if (status_ != null) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getStatus()); + if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { + size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); } size += getUnknownFields().getSerializedSize(); memoizedSize = size; @@ -517,17 +446,13 @@ public boolean equals(final java.lang.Object obj) { if (obj == this) { return true; } - if (!(obj instanceof com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus)) { + if (!(obj instanceof com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig)) { return super.equals(obj); } - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus other = - (com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus) obj; + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig other = + (com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) obj; - if (getPartition() != other.getPartition()) return false; - if (hasStatus() != other.hasStatus()) return false; - if (hasStatus()) { - if (!getStatus().equals(other.getStatus())) return false; - } + if (!getTopic().equals(other.getTopic())) return false; if (!getUnknownFields().equals(other.getUnknownFields())) return false; return true; } @@ -539,82 +464,78 @@ public int hashCode() { } int hash = 41; hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + PARTITION_FIELD_NUMBER; - hash = (53 * hash) + com.google.protobuf.Internal.hashLong(getPartition()); - if (hasStatus()) { - hash = (37 * hash) + STATUS_FIELD_NUMBER; - hash = (53 * hash) + getStatus().hashCode(); - } + hash = (37 * hash) + TOPIC_FIELD_NUMBER; + hash = (53 * hash) + getTopic().hashCode(); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( - byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom(byte[] data) + throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data, extensionRegistry); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseDelimitedFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseDelimitedFrom( java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseDelimitedFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( com.google.protobuf.CodedInputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); } - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus parseFrom( + public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -632,7 +553,7 @@ public static Builder newBuilder() { } public static Builder newBuilder( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus prototype) { + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); } @@ -651,32 +572,32 @@ protected Builder newBuilderForType( * * *
-     * The export status of a partition.
+     * Configuration for exporting to a Pub/Sub topic.
      * 
* - * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PartitionStatus} + * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PubSubConfig} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements - // @@protoc_insertion_point(builder_implements:google.cloud.pubsublite.v1.ExportConfig.PartitionStatus) - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder { + // @@protoc_insertion_point(builder_implements:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfigOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor; + .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_fieldAccessorTable + .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_fieldAccessorTable .ensureFieldAccessorsInitialized( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.class, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder.class); + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.class, + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.Builder.class); } - // Construct using com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.newBuilder() + // Construct using com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.newBuilder() private Builder() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @@ -686,32 +607,26 @@ private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { @java.lang.Override public Builder clear() { super.clear(); - partition_ = 0L; + topic_ = ""; - if (statusBuilder_ == null) { - status_ = null; - } else { - status_ = null; - statusBuilder_ = null; - } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PartitionStatus_descriptor; + .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; } @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus + public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig getDefaultInstanceForType() { - return com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.getDefaultInstance(); + return com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.getDefaultInstance(); } @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus build() { - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus result = buildPartial(); + public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig build() { + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } @@ -719,15 +634,10 @@ public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus build() { } @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus buildPartial() { - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus result = - new com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus(this); - result.partition_ = partition_; - if (statusBuilder_ == null) { - result.status_ = status_; - } else { - result.status_ = statusBuilder_.build(); - } + public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig buildPartial() { + com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig result = + new com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig(this); + result.topic_ = topic_; onBuilt(); return result; } @@ -769,24 +679,21 @@ public Builder addRepeatedField( @java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { - if (other instanceof com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus) { - return mergeFrom((com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus) other); + if (other instanceof com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) { + return mergeFrom((com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) other); } else { super.mergeFrom(other); return this; } } - public Builder mergeFrom( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus other) { + public Builder mergeFrom(com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig other) { if (other - == com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.getDefaultInstance()) + == com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.getDefaultInstance()) return this; - if (other.getPartition() != 0L) { - setPartition(other.getPartition()); - } - if (other.hasStatus()) { - mergeStatus(other.getStatus()); + if (!other.getTopic().isEmpty()) { + topic_ = other.topic_; + onChanged(); } this.mergeUnknownFields(other.getUnknownFields()); onChanged(); @@ -814,18 +721,12 @@ public Builder mergeFrom( case 0: done = true; break; - case 8: - { - partition_ = input.readInt64(); - - break; - } // case 8 - case 18: + case 10: { - input.readMessage(getStatusFieldBuilder().getBuilder(), extensionRegistry); + topic_ = input.readStringRequireUtf8(); break; - } // case 18 + } // case 10 default: { if (!super.parseUnknownField(input, extensionRegistry, tag)) { @@ -843,938 +744,119 @@ public Builder mergeFrom( return this; } - private long partition_; + private java.lang.Object topic_ = ""; /** * * *
-       * The partition number.
+       * The name of the Pub/Sub topic.
+       * Structured like: projects/{project_number}/topics/{topic_id}.
+       * The topic may be changed.
        * 
* - * int64 partition = 1; + * string topic = 1; * - * @return The partition. + * @return The topic. */ - @java.lang.Override - public long getPartition() { - return partition_; + public java.lang.String getTopic() { + java.lang.Object ref = topic_; + if (!(ref instanceof java.lang.String)) { + com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; + java.lang.String s = bs.toStringUtf8(); + topic_ = s; + return s; + } else { + return (java.lang.String) ref; + } } /** * * *
-       * The partition number.
+       * The name of the Pub/Sub topic.
+       * Structured like: projects/{project_number}/topics/{topic_id}.
+       * The topic may be changed.
        * 
* - * int64 partition = 1; + * string topic = 1; * - * @param value The partition to set. - * @return This builder for chaining. + * @return The bytes for topic. */ - public Builder setPartition(long value) { - - partition_ = value; - onChanged(); - return this; + public com.google.protobuf.ByteString getTopicBytes() { + java.lang.Object ref = topic_; + if (ref instanceof String) { + com.google.protobuf.ByteString b = + com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); + topic_ = b; + return b; + } else { + return (com.google.protobuf.ByteString) ref; + } } /** * * *
-       * The partition number.
+       * The name of the Pub/Sub topic.
+       * Structured like: projects/{project_number}/topics/{topic_id}.
+       * The topic may be changed.
        * 
* - * int64 partition = 1; + * string topic = 1; * + * @param value The topic to set. * @return This builder for chaining. */ - public Builder clearPartition() { + public Builder setTopic(java.lang.String value) { + if (value == null) { + throw new NullPointerException(); + } - partition_ = 0L; + topic_ = value; onChanged(); return this; } - - private com.google.rpc.Status status_; - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - statusBuilder_; - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - * - * @return Whether the status field is set. - */ - public boolean hasStatus() { - return statusBuilder_ != null || status_ != null; - } /** * * *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
+       * The name of the Pub/Sub topic.
+       * Structured like: projects/{project_number}/topics/{topic_id}.
+       * The topic may be changed.
        * 
* - * .google.rpc.Status status = 2; - * - * @return The status. - */ - public com.google.rpc.Status getStatus() { - if (statusBuilder_ == null) { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; - } else { - return statusBuilder_.getMessage(); - } - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
+ * string topic = 1; * - * .google.rpc.Status status = 2; + * @return This builder for chaining. */ - public Builder setStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - status_ = value; - onChanged(); - } else { - statusBuilder_.setMessage(value); - } + public Builder clearTopic() { + topic_ = getDefaultInstance().getTopic(); + onChanged(); return this; } /** * * *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
+       * The name of the Pub/Sub topic.
+       * Structured like: projects/{project_number}/topics/{topic_id}.
+       * The topic may be changed.
        * 
* - * .google.rpc.Status status = 2; + * string topic = 1; + * + * @param value The bytes for topic to set. + * @return This builder for chaining. */ - public Builder setStatus(com.google.rpc.Status.Builder builderForValue) { - if (statusBuilder_ == null) { - status_ = builderForValue.build(); - onChanged(); - } else { - statusBuilder_.setMessage(builderForValue.build()); + public Builder setTopicBytes(com.google.protobuf.ByteString value) { + if (value == null) { + throw new NullPointerException(); } + checkByteStringIsUtf8(value); - return this; - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - */ - public Builder mergeStatus(com.google.rpc.Status value) { - if (statusBuilder_ == null) { - if (status_ != null) { - status_ = com.google.rpc.Status.newBuilder(status_).mergeFrom(value).buildPartial(); - } else { - status_ = value; - } - onChanged(); - } else { - statusBuilder_.mergeFrom(value); - } - - return this; - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - */ - public Builder clearStatus() { - if (statusBuilder_ == null) { - status_ = null; - onChanged(); - } else { - status_ = null; - statusBuilder_ = null; - } - - return this; - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - */ - public com.google.rpc.Status.Builder getStatusBuilder() { - - onChanged(); - return getStatusFieldBuilder().getBuilder(); - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - */ - public com.google.rpc.StatusOrBuilder getStatusOrBuilder() { - if (statusBuilder_ != null) { - return statusBuilder_.getMessageOrBuilder(); - } else { - return status_ == null ? com.google.rpc.Status.getDefaultInstance() : status_; - } - } - /** - * - * - *
-       * If the export for a partition is healthy and the desired state is
-       * `ACTIVE`, the status code will be `OK` (zero). If the desired state of
-       * the export is `PAUSED`, the status code will be `CANCELLED`.
-       * If the export has been suspended due to an error, the status will be
-       * populated with an error code and details. The service will automatically
-       * retry after a period of time, and will update the status code to `OK` if
-       * export subsequently succeeds.
-       * 
- * - * .google.rpc.Status status = 2; - */ - private com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, com.google.rpc.Status.Builder, com.google.rpc.StatusOrBuilder> - getStatusFieldBuilder() { - if (statusBuilder_ == null) { - statusBuilder_ = - new com.google.protobuf.SingleFieldBuilderV3< - com.google.rpc.Status, - com.google.rpc.Status.Builder, - com.google.rpc.StatusOrBuilder>(getStatus(), getParentForChildren(), isClean()); - status_ = null; - } - return statusBuilder_; - } - - @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.cloud.pubsublite.v1.ExportConfig.PartitionStatus) - } - - // @@protoc_insertion_point(class_scope:google.cloud.pubsublite.v1.ExportConfig.PartitionStatus) - private static final com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus - DEFAULT_INSTANCE; - - static { - DEFAULT_INSTANCE = new com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus(); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus - getDefaultInstance() { - return DEFAULT_INSTANCE; - } - - private static final com.google.protobuf.Parser PARSER = - new com.google.protobuf.AbstractParser() { - @java.lang.Override - public PartitionStatus parsePartialFrom( - com.google.protobuf.CodedInputStream input, - com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - Builder builder = newBuilder(); - try { - builder.mergeFrom(input, extensionRegistry); - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.setUnfinishedMessage(builder.buildPartial()); - } catch (com.google.protobuf.UninitializedMessageException e) { - throw e.asInvalidProtocolBufferException() - .setUnfinishedMessage(builder.buildPartial()); - } catch (java.io.IOException e) { - throw new com.google.protobuf.InvalidProtocolBufferException(e) - .setUnfinishedMessage(builder.buildPartial()); - } - return builder.buildPartial(); - } - }; - - 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.cloud.pubsublite.proto.ExportConfig.PartitionStatus - getDefaultInstanceForType() { - return DEFAULT_INSTANCE; - } - } - - public interface PubSubConfigOrBuilder - extends - // @@protoc_insertion_point(interface_extends:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) - com.google.protobuf.MessageOrBuilder { - - /** - * - * - *
-     * The name of the Pub/Sub topic.
-     * Structured like: projects/{project_number}/topics/{topic_id}.
-     * The topic may be changed.
-     * 
- * - * string topic = 1; - * - * @return The topic. - */ - java.lang.String getTopic(); - /** - * - * - *
-     * The name of the Pub/Sub topic.
-     * Structured like: projects/{project_number}/topics/{topic_id}.
-     * The topic may be changed.
-     * 
- * - * string topic = 1; - * - * @return The bytes for topic. - */ - com.google.protobuf.ByteString getTopicBytes(); - } - /** - * - * - *
-   * Configuration for exporting to a Pub/Sub topic.
-   * 
- * - * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PubSubConfig} - */ - public static final class PubSubConfig extends com.google.protobuf.GeneratedMessageV3 - implements - // @@protoc_insertion_point(message_implements:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) - PubSubConfigOrBuilder { - private static final long serialVersionUID = 0L; - // Use PubSubConfig.newBuilder() to construct. - private PubSubConfig(com.google.protobuf.GeneratedMessageV3.Builder builder) { - super(builder); - } - - private PubSubConfig() { - topic_ = ""; - } - - @java.lang.Override - @SuppressWarnings({"unused"}) - protected java.lang.Object newInstance(UnusedPrivateParameter unused) { - return new PubSubConfig(); - } - - @java.lang.Override - public final com.google.protobuf.UnknownFieldSet getUnknownFields() { - return this.unknownFields; - } - - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.class, - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.Builder.class); - } - - public static final int TOPIC_FIELD_NUMBER = 1; - private volatile java.lang.Object topic_; - /** - * - * - *
-     * The name of the Pub/Sub topic.
-     * Structured like: projects/{project_number}/topics/{topic_id}.
-     * The topic may be changed.
-     * 
- * - * string topic = 1; - * - * @return The topic. - */ - @java.lang.Override - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - return (java.lang.String) ref; - } else { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } - } - /** - * - * - *
-     * The name of the Pub/Sub topic.
-     * Structured like: projects/{project_number}/topics/{topic_id}.
-     * The topic may be changed.
-     * 
- * - * string topic = 1; - * - * @return The bytes for topic. - */ - @java.lang.Override - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof java.lang.String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - - private byte memoizedIsInitialized = -1; - - @java.lang.Override - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized == 1) return true; - if (isInitialized == 0) return false; - - memoizedIsInitialized = 1; - return true; - } - - @java.lang.Override - public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - com.google.protobuf.GeneratedMessageV3.writeString(output, 1, topic_); - } - getUnknownFields().writeTo(output); - } - - @java.lang.Override - public int getSerializedSize() { - int size = memoizedSize; - if (size != -1) return size; - - size = 0; - if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(topic_)) { - size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, topic_); - } - size += getUnknownFields().getSerializedSize(); - memoizedSize = size; - return size; - } - - @java.lang.Override - public boolean equals(final java.lang.Object obj) { - if (obj == this) { - return true; - } - if (!(obj instanceof com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig)) { - return super.equals(obj); - } - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig other = - (com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) obj; - - if (!getTopic().equals(other.getTopic())) return false; - if (!getUnknownFields().equals(other.getUnknownFields())) return false; - return true; - } - - @java.lang.Override - public int hashCode() { - if (memoizedHashCode != 0) { - return memoizedHashCode; - } - int hash = 41; - hash = (19 * hash) + getDescriptor().hashCode(); - hash = (37 * hash) + TOPIC_FIELD_NUMBER; - hash = (53 * hash) + getTopic().hashCode(); - hash = (29 * hash) + getUnknownFields().hashCode(); - memoizedHashCode = hash; - return hash; - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - com.google.protobuf.ByteString data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom(byte[] data) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry) - throws com.google.protobuf.InvalidProtocolBufferException { - return PARSER.parseFrom(data, extensionRegistry); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseDelimitedFrom( - java.io.InputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PubSubConfig parseFrom( - com.google.protobuf.CodedInputStream input) throws java.io.IOException { - return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input); - } - - public static com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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.cloud.pubsublite.proto.ExportConfig.PubSubConfig 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; - } - /** - * - * - *
-     * Configuration for exporting to a Pub/Sub topic.
-     * 
- * - * Protobuf type {@code google.cloud.pubsublite.v1.ExportConfig.PubSubConfig} - */ - public static final class Builder - extends com.google.protobuf.GeneratedMessageV3.Builder - implements - // @@protoc_insertion_point(builder_implements:google.cloud.pubsublite.v1.ExportConfig.PubSubConfig) - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfigOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { - return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; - } - - @java.lang.Override - protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable - internalGetFieldAccessorTable() { - return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_fieldAccessorTable - .ensureFieldAccessorsInitialized( - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.class, - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.Builder.class); - } - - // Construct using com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.newBuilder() - private Builder() {} - - private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { - super(parent); - } - - @java.lang.Override - public Builder clear() { - super.clear(); - topic_ = ""; - - return this; - } - - @java.lang.Override - public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { - return com.google.cloud.pubsublite.proto.CommonProto - .internal_static_google_cloud_pubsublite_v1_ExportConfig_PubSubConfig_descriptor; - } - - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig - getDefaultInstanceForType() { - return com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.getDefaultInstance(); - } - - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig build() { - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig result = buildPartial(); - if (!result.isInitialized()) { - throw newUninitializedMessageException(result); - } - return result; - } - - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig buildPartial() { - com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig result = - new com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig(this); - result.topic_ = topic_; - 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.cloud.pubsublite.proto.ExportConfig.PubSubConfig) { - return mergeFrom((com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) other); - } else { - super.mergeFrom(other); - return this; - } - } - - public Builder mergeFrom(com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig other) { - if (other - == com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig.getDefaultInstance()) - return this; - if (!other.getTopic().isEmpty()) { - topic_ = other.topic_; - onChanged(); - } - this.mergeUnknownFields(other.getUnknownFields()); - 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 { - if (extensionRegistry == null) { - throw new java.lang.NullPointerException(); - } - try { - boolean done = false; - while (!done) { - int tag = input.readTag(); - switch (tag) { - case 0: - done = true; - break; - case 10: - { - topic_ = input.readStringRequireUtf8(); - - break; - } // case 10 - default: - { - if (!super.parseUnknownField(input, extensionRegistry, tag)) { - done = true; // was an endgroup tag - } - break; - } // default: - } // switch (tag) - } // while (!done) - } catch (com.google.protobuf.InvalidProtocolBufferException e) { - throw e.unwrapIOException(); - } finally { - onChanged(); - } // finally - return this; - } - - private java.lang.Object topic_ = ""; - /** - * - * - *
-       * The name of the Pub/Sub topic.
-       * Structured like: projects/{project_number}/topics/{topic_id}.
-       * The topic may be changed.
-       * 
- * - * string topic = 1; - * - * @return The topic. - */ - public java.lang.String getTopic() { - java.lang.Object ref = topic_; - if (!(ref instanceof java.lang.String)) { - com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; - java.lang.String s = bs.toStringUtf8(); - topic_ = s; - return s; - } else { - return (java.lang.String) ref; - } - } - /** - * - * - *
-       * The name of the Pub/Sub topic.
-       * Structured like: projects/{project_number}/topics/{topic_id}.
-       * The topic may be changed.
-       * 
- * - * string topic = 1; - * - * @return The bytes for topic. - */ - public com.google.protobuf.ByteString getTopicBytes() { - java.lang.Object ref = topic_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); - topic_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } - /** - * - * - *
-       * The name of the Pub/Sub topic.
-       * Structured like: projects/{project_number}/topics/{topic_id}.
-       * The topic may be changed.
-       * 
- * - * string topic = 1; - * - * @param value The topic to set. - * @return This builder for chaining. - */ - public Builder setTopic(java.lang.String value) { - if (value == null) { - throw new NullPointerException(); - } - - topic_ = value; - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the Pub/Sub topic.
-       * Structured like: projects/{project_number}/topics/{topic_id}.
-       * The topic may be changed.
-       * 
- * - * string topic = 1; - * - * @return This builder for chaining. - */ - public Builder clearTopic() { - - topic_ = getDefaultInstance().getTopic(); - onChanged(); - return this; - } - /** - * - * - *
-       * The name of the Pub/Sub topic.
-       * Structured like: projects/{project_number}/topics/{topic_id}.
-       * The topic may be changed.
-       * 
- * - * string topic = 1; - * - * @param value The bytes for topic to set. - * @return This builder for chaining. - */ - public Builder setTopicBytes(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - checkByteStringIsUtf8(value); - - topic_ = value; - onChanged(); + topic_ = value; + onChanged(); return this; } @@ -1922,145 +1004,53 @@ public com.google.cloud.pubsublite.proto.ExportConfig.State getDesiredState() { @SuppressWarnings("deprecation") com.google.cloud.pubsublite.proto.ExportConfig.State result = com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(desiredState_); - return result == null - ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED - : result; - } - - public static final int CURRENT_STATE_FIELD_NUMBER = 6; - private int currentState_; - /** - * - * - *
-   * Output only. The current state of the export, which may be different to the desired
-   * state due to errors.
-   * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for currentState. - */ - @java.lang.Override - public int getCurrentStateValue() { - return currentState_; - } - /** - * - * - *
-   * Output only. The current state of the export, which may be different to the desired
-   * state due to errors.
-   * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The currentState. - */ - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.State getCurrentState() { - @SuppressWarnings("deprecation") - com.google.cloud.pubsublite.proto.ExportConfig.State result = - com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(currentState_); - return result == null - ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED - : result; - } - - public static final int STATUSES_FIELD_NUMBER = 4; - private java.util.List statuses_; - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.List - getStatusesList() { - return statuses_; - } - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public java.util.List< - ? extends com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder> - getStatusesOrBuilderList() { - return statuses_; - } - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Override - @java.lang.Deprecated - public int getStatusesCount() { - return statuses_.size(); + return result == null + ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED + : result; } + + public static final int CURRENT_STATE_FIELD_NUMBER = 6; + private int currentState_; /** * * *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
+   * Output only. The current state of the export, which may be different to the desired
+   * state due to errors.
    * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The enum numeric value on the wire for currentState. */ @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus getStatuses(int index) { - return statuses_.get(index); + public int getCurrentStateValue() { + return currentState_; } /** * * *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
+   * Output only. The current state of the export, which may be different to the desired
+   * state due to errors.
    * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The currentState. */ @java.lang.Override - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder - getStatusesOrBuilder(int index) { - return statuses_.get(index); + public com.google.cloud.pubsublite.proto.ExportConfig.State getCurrentState() { + @SuppressWarnings("deprecation") + com.google.cloud.pubsublite.proto.ExportConfig.State result = + com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(currentState_); + return result == null + ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED + : result; } public static final int DEAD_LETTER_TOPIC_FIELD_NUMBER = 5; @@ -2207,9 +1197,6 @@ public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io output.writeMessage( 3, (com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) destination_); } - for (int i = 0; i < statuses_.size(); i++) { - output.writeMessage(4, statuses_.get(i)); - } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 5, deadLetterTopic_); } @@ -2235,9 +1222,6 @@ public int getSerializedSize() { com.google.protobuf.CodedOutputStream.computeMessageSize( 3, (com.google.cloud.pubsublite.proto.ExportConfig.PubSubConfig) destination_); } - for (int i = 0; i < statuses_.size(); i++) { - size += com.google.protobuf.CodedOutputStream.computeMessageSize(4, statuses_.get(i)); - } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deadLetterTopic_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, deadLetterTopic_); } @@ -2263,7 +1247,6 @@ public boolean equals(final java.lang.Object obj) { if (desiredState_ != other.desiredState_) return false; if (currentState_ != other.currentState_) return false; - if (!getStatusesList().equals(other.getStatusesList())) return false; if (!getDeadLetterTopic().equals(other.getDeadLetterTopic())) return false; if (!getDestinationCase().equals(other.getDestinationCase())) return false; switch (destinationCase_) { @@ -2288,10 +1271,6 @@ public int hashCode() { hash = (53 * hash) + desiredState_; hash = (37 * hash) + CURRENT_STATE_FIELD_NUMBER; hash = (53 * hash) + currentState_; - if (getStatusesCount() > 0) { - hash = (37 * hash) + STATUSES_FIELD_NUMBER; - hash = (53 * hash) + getStatusesList().hashCode(); - } hash = (37 * hash) + DEAD_LETTER_TOPIC_FIELD_NUMBER; hash = (53 * hash) + getDeadLetterTopic().hashCode(); switch (destinationCase_) { @@ -2445,13 +1424,6 @@ public Builder clear() { currentState_ = 0; - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - } else { - statuses_ = null; - statusesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000001); deadLetterTopic_ = ""; if (pubsubConfigBuilder_ != null) { @@ -2486,18 +1458,8 @@ public com.google.cloud.pubsublite.proto.ExportConfig build() { public com.google.cloud.pubsublite.proto.ExportConfig buildPartial() { com.google.cloud.pubsublite.proto.ExportConfig result = new com.google.cloud.pubsublite.proto.ExportConfig(this); - int from_bitField0_ = bitField0_; result.desiredState_ = desiredState_; result.currentState_ = currentState_; - if (statusesBuilder_ == null) { - if (((bitField0_ & 0x00000001) != 0)) { - statuses_ = java.util.Collections.unmodifiableList(statuses_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.statuses_ = statuses_; - } else { - result.statuses_ = statusesBuilder_.build(); - } result.deadLetterTopic_ = deadLetterTopic_; if (destinationCase_ == 3) { if (pubsubConfigBuilder_ == null) { @@ -2562,33 +1524,6 @@ public Builder mergeFrom(com.google.cloud.pubsublite.proto.ExportConfig other) { if (other.currentState_ != 0) { setCurrentStateValue(other.getCurrentStateValue()); } - if (statusesBuilder_ == null) { - if (!other.statuses_.isEmpty()) { - if (statuses_.isEmpty()) { - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureStatusesIsMutable(); - statuses_.addAll(other.statuses_); - } - onChanged(); - } - } else { - if (!other.statuses_.isEmpty()) { - if (statusesBuilder_.isEmpty()) { - statusesBuilder_.dispose(); - statusesBuilder_ = null; - statuses_ = other.statuses_; - bitField0_ = (bitField0_ & ~0x00000001); - statusesBuilder_ = - com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders - ? getStatusesFieldBuilder() - : null; - } else { - statusesBuilder_.addAllMessages(other.statuses_); - } - } - } if (!other.getDeadLetterTopic().isEmpty()) { deadLetterTopic_ = other.deadLetterTopic_; onChanged(); @@ -2642,20 +1577,6 @@ public Builder mergeFrom( destinationCase_ = 3; break; } // case 26 - case 34: - { - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus m = - input.readMessage( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.parser(), - extensionRegistry); - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(m); - } else { - statusesBuilder_.addMessage(m); - } - break; - } // case 34 case 42: { deadLetterTopic_ = input.readStringRequireUtf8(); @@ -2695,655 +1616,214 @@ public DestinationCase getDestinationCase() { public Builder clearDestination() { destinationCase_ = 0; destination_ = null; - onChanged(); - return this; - } - - private int bitField0_; - - private int desiredState_ = 0; - /** - * - * - *
-     * The desired state of this export. Setting this to values other than
-     * `ACTIVE` and `PAUSED` will result in an error.
-     * 
- * - * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; - * - * @return The enum numeric value on the wire for desiredState. - */ - @java.lang.Override - public int getDesiredStateValue() { - return desiredState_; - } - /** - * - * - *
-     * The desired state of this export. Setting this to values other than
-     * `ACTIVE` and `PAUSED` will result in an error.
-     * 
- * - * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; - * - * @param value The enum numeric value on the wire for desiredState to set. - * @return This builder for chaining. - */ - public Builder setDesiredStateValue(int value) { - - desiredState_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * The desired state of this export. Setting this to values other than
-     * `ACTIVE` and `PAUSED` will result in an error.
-     * 
- * - * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; - * - * @return The desiredState. - */ - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.State getDesiredState() { - @SuppressWarnings("deprecation") - com.google.cloud.pubsublite.proto.ExportConfig.State result = - com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(desiredState_); - return result == null - ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * The desired state of this export. Setting this to values other than
-     * `ACTIVE` and `PAUSED` will result in an error.
-     * 
- * - * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; - * - * @param value The desiredState to set. - * @return This builder for chaining. - */ - public Builder setDesiredState(com.google.cloud.pubsublite.proto.ExportConfig.State value) { - if (value == null) { - throw new NullPointerException(); - } - - desiredState_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * The desired state of this export. Setting this to values other than
-     * `ACTIVE` and `PAUSED` will result in an error.
-     * 
- * - * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; - * - * @return This builder for chaining. - */ - public Builder clearDesiredState() { - - desiredState_ = 0; - onChanged(); - return this; - } - - private int currentState_ = 0; - /** - * - * - *
-     * Output only. The current state of the export, which may be different to the desired
-     * state due to errors.
-     * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The enum numeric value on the wire for currentState. - */ - @java.lang.Override - public int getCurrentStateValue() { - return currentState_; - } - /** - * - * - *
-     * Output only. The current state of the export, which may be different to the desired
-     * state due to errors.
-     * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The enum numeric value on the wire for currentState to set. - * @return This builder for chaining. - */ - public Builder setCurrentStateValue(int value) { - - currentState_ = value; - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export, which may be different to the desired
-     * state due to errors.
-     * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return The currentState. - */ - @java.lang.Override - public com.google.cloud.pubsublite.proto.ExportConfig.State getCurrentState() { - @SuppressWarnings("deprecation") - com.google.cloud.pubsublite.proto.ExportConfig.State result = - com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(currentState_); - return result == null - ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED - : result; - } - /** - * - * - *
-     * Output only. The current state of the export, which may be different to the desired
-     * state due to errors.
-     * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @param value The currentState to set. - * @return This builder for chaining. - */ - public Builder setCurrentState(com.google.cloud.pubsublite.proto.ExportConfig.State value) { - if (value == null) { - throw new NullPointerException(); - } - - currentState_ = value.getNumber(); - onChanged(); - return this; - } - /** - * - * - *
-     * Output only. The current state of the export, which may be different to the desired
-     * state due to errors.
-     * 
- * - * - * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; - * - * - * @return This builder for chaining. - */ - public Builder clearCurrentState() { - - currentState_ = 0; - onChanged(); - return this; - } - - private java.util.List - statuses_ = java.util.Collections.emptyList(); - - private void ensureStatusesIsMutable() { - if (!((bitField0_ & 0x00000001) != 0)) { - statuses_ = - new java.util.ArrayList( - statuses_); - bitField0_ |= 0x00000001; - } + onChanged(); + return this; } - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder> - statusesBuilder_; - + private int desiredState_ = 0; /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * The desired state of this export. Setting this to values other than
+     * `ACTIVE` and `PAUSED` will result in an error.
      * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - public java.util.List - getStatusesList() { - if (statusesBuilder_ == null) { - return java.util.Collections.unmodifiableList(statuses_); - } else { - return statusesBuilder_.getMessageList(); - } - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
+ * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The enum numeric value on the wire for desiredState. */ - @java.lang.Deprecated - public int getStatusesCount() { - if (statusesBuilder_ == null) { - return statuses_.size(); - } else { - return statusesBuilder_.getCount(); - } + @java.lang.Override + public int getDesiredStateValue() { + return desiredState_; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * The desired state of this export. Setting this to values other than
+     * `ACTIVE` and `PAUSED` will result in an error.
      * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus getStatuses(int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); - } else { - return statusesBuilder_.getMessage(index); - } - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
+ * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @param value The enum numeric value on the wire for desiredState to set. + * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder setStatuses( - int index, com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.set(index, value); - onChanged(); - } else { - statusesBuilder_.setMessage(index, value); - } + public Builder setDesiredStateValue(int value) { + + desiredState_ = value; + onChanged(); return this; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * The desired state of this export. Setting this to values other than
+     * `ACTIVE` and `PAUSED` will result in an error.
      * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - public Builder setStatuses( - int index, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.set(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.setMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
+ * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The desiredState. */ - @java.lang.Deprecated - public Builder addStatuses( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(value); - onChanged(); - } else { - statusesBuilder_.addMessage(value); - } - return this; + @java.lang.Override + public com.google.cloud.pubsublite.proto.ExportConfig.State getDesiredState() { + @SuppressWarnings("deprecation") + com.google.cloud.pubsublite.proto.ExportConfig.State result = + com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(desiredState_); + return result == null + ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED + : result; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * The desired state of this export. Setting this to values other than
+     * `ACTIVE` and `PAUSED` will result in an error.
      * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - public Builder addStatuses( - int index, com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus value) { - if (statusesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStatusesIsMutable(); - statuses_.add(index, value); - onChanged(); - } else { - statusesBuilder_.addMessage(index, value); - } - return this; - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
+ * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @param value The desiredState to set. + * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder addStatuses( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(builderForValue.build()); + public Builder setDesiredState(com.google.cloud.pubsublite.proto.ExportConfig.State value) { + if (value == null) { + throw new NullPointerException(); } + + desiredState_ = value.getNumber(); + onChanged(); return this; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * The desired state of this export. Setting this to values other than
+     * `ACTIVE` and `PAUSED` will result in an error.
      * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - public Builder addStatuses( - int index, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder builderForValue) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.add(index, builderForValue.build()); - onChanged(); - } else { - statusesBuilder_.addMessage(index, builderForValue.build()); - } - return this; - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
+ * .google.cloud.pubsublite.v1.ExportConfig.State desired_state = 1; * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder addAllStatuses( - java.lang.Iterable - values) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - com.google.protobuf.AbstractMessageLite.Builder.addAll(values, statuses_); - onChanged(); - } else { - statusesBuilder_.addAllMessages(values); - } + public Builder clearDesiredState() { + + desiredState_ = 0; + onChanged(); return this; } + + private int currentState_ = 0; /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * Output only. The current state of the export, which may be different to the desired
+     * state due to errors.
      * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @return The enum numeric value on the wire for currentState. */ - @java.lang.Deprecated - public Builder clearStatuses() { - if (statusesBuilder_ == null) { - statuses_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - statusesBuilder_.clear(); - } - return this; + @java.lang.Override + public int getCurrentStateValue() { + return currentState_; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * Output only. The current state of the export, which may be different to the desired
+     * state due to errors.
      * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * + * + * @param value The enum numeric value on the wire for currentState to set. + * @return This builder for chaining. */ - @java.lang.Deprecated - public Builder removeStatuses(int index) { - if (statusesBuilder_ == null) { - ensureStatusesIsMutable(); - statuses_.remove(index); - onChanged(); - } else { - statusesBuilder_.remove(index); - } + public Builder setCurrentStateValue(int value) { + + currentState_ = value; + onChanged(); return this; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * Output only. The current state of the export, which may be different to the desired
+     * state due to errors.
      * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder - getStatusesBuilder(int index) { - return getStatusesFieldBuilder().getBuilder(index); - } - /** - * * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return The currentState. */ - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder - getStatusesOrBuilder(int index) { - if (statusesBuilder_ == null) { - return statuses_.get(index); - } else { - return statusesBuilder_.getMessageOrBuilder(index); - } + @java.lang.Override + public com.google.cloud.pubsublite.proto.ExportConfig.State getCurrentState() { + @SuppressWarnings("deprecation") + com.google.cloud.pubsublite.proto.ExportConfig.State result = + com.google.cloud.pubsublite.proto.ExportConfig.State.valueOf(currentState_); + return result == null + ? com.google.cloud.pubsublite.proto.ExportConfig.State.UNRECOGNIZED + : result; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * Output only. The current state of the export, which may be different to the desired
+     * state due to errors.
      * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - @java.lang.Deprecated - public java.util.List< - ? extends com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder> - getStatusesOrBuilderList() { - if (statusesBuilder_ != null) { - return statusesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(statuses_); - } - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @param value The currentState to set. + * @return This builder for chaining. */ - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder - addStatusesBuilder() { - return getStatusesFieldBuilder() - .addBuilder( - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.getDefaultInstance()); + public Builder setCurrentState(com.google.cloud.pubsublite.proto.ExportConfig.State value) { + if (value == null) { + throw new NullPointerException(); + } + + currentState_ = value.getNumber(); + onChanged(); + return this; } /** * * *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
+     * Output only. The current state of the export, which may be different to the desired
+     * state due to errors.
      * 
* * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; + * .google.cloud.pubsublite.v1.ExportConfig.State current_state = 6 [(.google.api.field_behavior) = OUTPUT_ONLY]; * - */ - @java.lang.Deprecated - public com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder - addStatusesBuilder(int index) { - return getStatusesFieldBuilder() - .addBuilder( - index, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.getDefaultInstance()); - } - /** - * - * - *
-     * Output only. Deprecated: replaced by `current_state`.
-     * The export statuses of each partition.
-     * 
* - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * + * @return This builder for chaining. */ - @java.lang.Deprecated - public java.util.List - getStatusesBuilderList() { - return getStatusesFieldBuilder().getBuilderList(); - } - - private com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder> - getStatusesFieldBuilder() { - if (statusesBuilder_ == null) { - statusesBuilder_ = - new com.google.protobuf.RepeatedFieldBuilderV3< - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus.Builder, - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder>( - statuses_, ((bitField0_ & 0x00000001) != 0), getParentForChildren(), isClean()); - statuses_ = null; - } - return statusesBuilder_; + public Builder clearCurrentState() { + + currentState_ = 0; + onChanged(); + return this; } private java.lang.Object deadLetterTopic_ = ""; diff --git a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfigOrBuilder.java b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfigOrBuilder.java index 828b7860d..38fa934a1 100644 --- a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfigOrBuilder.java +++ b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/ExportConfigOrBuilder.java @@ -81,79 +81,6 @@ public interface ExportConfigOrBuilder */ com.google.cloud.pubsublite.proto.ExportConfig.State getCurrentState(); - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - java.util.List getStatusesList(); - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatus getStatuses(int index); - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - int getStatusesCount(); - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - java.util.List - getStatusesOrBuilderList(); - /** - * - * - *
-   * Output only. Deprecated: replaced by `current_state`.
-   * The export statuses of each partition.
-   * 
- * - * - * repeated .google.cloud.pubsublite.v1.ExportConfig.PartitionStatus statuses = 4 [deprecated = true, (.google.api.field_behavior) = OUTPUT_ONLY]; - * - */ - @java.lang.Deprecated - com.google.cloud.pubsublite.proto.ExportConfig.PartitionStatusOrBuilder getStatusesOrBuilder( - int index); - /** * * diff --git a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/Topic.java b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/Topic.java index 17ff16e5f..3d553ab47 100644 --- a/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/Topic.java +++ b/proto-google-cloud-pubsublite-v1/src/main/java/com/google/cloud/pubsublite/proto/Topic.java @@ -105,7 +105,7 @@ public interface PartitionConfigOrBuilder * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return Whether the scale field is set. */ @java.lang.Deprecated @@ -126,7 +126,7 @@ public interface PartitionConfigOrBuilder * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return The scale. */ @java.lang.Deprecated @@ -962,7 +962,7 @@ public long getCount() { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return Whether the scale field is set. */ @java.lang.Override @@ -986,7 +986,7 @@ public boolean hasScale() { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return The scale. */ @java.lang.Override @@ -1562,7 +1562,7 @@ public Builder clearCount() { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return Whether the scale field is set. */ @java.lang.Deprecated @@ -1585,7 +1585,7 @@ public boolean hasScale() { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return The scale. */ @java.lang.Deprecated @@ -1611,7 +1611,7 @@ public int getScale() { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @param value The scale to set. * @return This builder for chaining. */ @@ -1638,7 +1638,7 @@ public Builder setScale(int value) { * int32 scale = 2 [deprecated = true]; * * @deprecated google.cloud.pubsublite.v1.Topic.PartitionConfig.scale is deprecated. See - * google/cloud/pubsublite/v1/common.proto;l=139 + * google/cloud/pubsublite/v1/common.proto;l=138 * @return This builder for chaining. */ @java.lang.Deprecated diff --git a/proto-google-cloud-pubsublite-v1/src/main/proto/google/cloud/pubsublite/v1/common.proto b/proto-google-cloud-pubsublite-v1/src/main/proto/google/cloud/pubsublite/v1/common.proto index d57583d9a..56d8e2fa3 100644 --- a/proto-google-cloud-pubsublite-v1/src/main/proto/google/cloud/pubsublite/v1/common.proto +++ b/proto-google-cloud-pubsublite-v1/src/main/proto/google/cloud/pubsublite/v1/common.proto @@ -20,7 +20,6 @@ import "google/api/field_behavior.proto"; import "google/api/resource.proto"; import "google/protobuf/duration.proto"; import "google/protobuf/timestamp.proto"; -import "google/rpc/status.proto"; option cc_enable_arenas = true; option csharp_namespace = "Google.Cloud.PubSubLite.V1"; @@ -254,22 +253,6 @@ message ExportConfig { NOT_FOUND = 4; } - // The export status of a partition. - message PartitionStatus { - // The partition number. - int64 partition = 1; - - // If the export for a partition is healthy and the desired state is - // `ACTIVE`, the status code will be `OK` (zero). If the desired state of - // the export is `PAUSED`, the status code will be `CANCELLED`. - // - // If the export has been suspended due to an error, the status will be - // populated with an error code and details. The service will automatically - // retry after a period of time, and will update the status code to `OK` if - // export subsequently succeeds. - google.rpc.Status status = 2; - } - // Configuration for exporting to a Pub/Sub topic. message PubSubConfig { // The name of the Pub/Sub topic. @@ -286,14 +269,6 @@ message ExportConfig { // state due to errors. State current_state = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; - // Output only. Deprecated: replaced by `current_state`. - // - // The export statuses of each partition. - repeated PartitionStatus statuses = 4 [ - deprecated = true, - (google.api.field_behavior) = OUTPUT_ONLY - ]; - // Optional. The name of an optional Pub/Sub Lite topic to publish messages that can not // be exported to the destination. For example, the message can not be // published to the Pub/Sub service because it does not satisfy the