public Builder mergeFrom(com.google.pubsub.v1.ListTopicSnapshotsResponse other) { if (other == com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance()) return this; if (!other.snapshots_.isEmpty()) { if (snapshots_.isEmpty()) { snapshots_ = other.snapshots_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSnapshotsIsMutable(); snapshots_.addAll(other.snapshots_); } onChanged(); } if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicSnapshotsResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicSnapshotsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
@java.lang.Override public com.google.pubsub.v1.ListTopicSnapshotsResponse buildPartial() { com.google.pubsub.v1.ListTopicSnapshotsResponse result = new com.google.pubsub.v1.ListTopicSnapshotsResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { snapshots_ = snapshots_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.snapshots_ = snapshots_; result.nextPageToken_ = nextPageToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
/** * * * <pre> * If not empty, indicates that there may be more snapshots that match * the request; this value should be passed in a new * `ListTopicSnapshotsRequest` to get more snapshots. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder setNextPageTokenBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); nextPageToken_ = value; onChanged(); return this; }
/** * * * <pre> * The names of the snapshots that match the request. * </pre> * * <code>repeated string snapshots = 1;</code> */ public Builder addSnapshots(java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureSnapshotsIsMutable(); snapshots_.add(value); onChanged(); return this; } /**
/** * * * <pre> * The names of the snapshots that match the request. * </pre> * * <code>repeated string snapshots = 1;</code> */ public Builder setSnapshots(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } ensureSnapshotsIsMutable(); snapshots_.set(index, value); onChanged(); return this; } /**
/** * * * <pre> * If not empty, indicates that there may be more snapshots that match * the request; this value should be passed in a new * `ListTopicSnapshotsRequest` to get more snapshots. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder setNextPageToken(java.lang.String value) { if (value == null) { throw new NullPointerException(); } nextPageToken_ = value; onChanged(); return this; } /**
public Builder mergeFrom(com.google.pubsub.v1.ListTopicSnapshotsResponse other) { if (other == com.google.pubsub.v1.ListTopicSnapshotsResponse.getDefaultInstance()) return this; if (!other.snapshots_.isEmpty()) { if (snapshots_.isEmpty()) { snapshots_ = other.snapshots_; bitField0_ = (bitField0_ & ~0x00000001); } else { ensureSnapshotsIsMutable(); snapshots_.addAll(other.snapshots_); } onChanged(); } if (!other.getNextPageToken().isEmpty()) { nextPageToken_ = other.nextPageToken_; onChanged(); } this.mergeUnknownFields(other.unknownFields); onChanged(); return this; }
/** * * * <pre> * The names of the snapshots that match the request. * </pre> * * <code>repeated string snapshots = 1;</code> */ public Builder addSnapshotsBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); ensureSnapshotsIsMutable(); snapshots_.add(value); onChanged(); return this; }
/** * * * <pre> * If not empty, indicates that there may be more snapshots that match * the request; this value should be passed in a new * `ListTopicSnapshotsRequest` to get more snapshots. * </pre> * * <code>string next_page_token = 2;</code> */ public Builder clearNextPageToken() { nextPageToken_ = getDefaultInstance().getNextPageToken(); onChanged(); return this; } /**
/** * * * <pre> * The names of the snapshots that match the request. * </pre> * * <code>repeated string snapshots = 1;</code> */ public Builder clearSnapshots() { snapshots_ = com.google.protobuf.LazyStringArrayList.EMPTY; bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /**
@java.lang.Override public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { com.google.pubsub.v1.ListTopicSnapshotsResponse parsedMessage = null; try { parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { parsedMessage = (com.google.pubsub.v1.ListTopicSnapshotsResponse) e.getUnfinishedMessage(); throw e.unwrapIOException(); } finally { if (parsedMessage != null) { mergeFrom(parsedMessage); } } return this; }
/** * * * <pre> * The names of the snapshots that match the request. * </pre> * * <code>repeated string snapshots = 1;</code> */ public Builder addAllSnapshots(java.lang.Iterable<java.lang.String> values) { ensureSnapshotsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, snapshots_); onChanged(); return this; } /**
@java.lang.Override public com.google.pubsub.v1.ListTopicSnapshotsResponse buildPartial() { com.google.pubsub.v1.ListTopicSnapshotsResponse result = new com.google.pubsub.v1.ListTopicSnapshotsResponse(this); int from_bitField0_ = bitField0_; int to_bitField0_ = 0; if (((bitField0_ & 0x00000001) == 0x00000001)) { snapshots_ = snapshots_.getUnmodifiableView(); bitField0_ = (bitField0_ & ~0x00000001); } result.snapshots_ = snapshots_; result.nextPageToken_ = nextPageToken_; result.bitField0_ = to_bitField0_; onBuilt(); return result; }
private Builder() { maybeForceBuilderInitialization(); }
public static Builder newBuilder(com.google.pubsub.v1.ListTopicSnapshotsResponse prototype) { return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype); }
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); }
@java.lang.Override public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof com.google.pubsub.v1.ListTopicSnapshotsResponse) { return mergeFrom((com.google.pubsub.v1.ListTopicSnapshotsResponse) other); } else { super.mergeFrom(other); return this; } }
@java.lang.Override protected Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { Builder builder = new Builder(parent); return builder; } /**