Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
*
* int64 page_size = 2 [(.yandex.cloud.value) = "<=1000"];
* @return The pageSize.
*/
long getPageSize();
/**
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @return The bytes for pageToken.
*/
com.google.protobuf.ByteString
getPageTokenBytes();
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @return The bytes for filter.
*/
com.google.protobuf.ByteString
getFilterBytes();
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.ListClustersRequest}
*/
public static final class ListClustersRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.ListClustersRequest)
ListClustersRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListClustersRequest.newBuilder() to construct.
private ListClustersRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListClustersRequest() {
folderId_ = "";
pageToken_ = "";
filter_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListClustersRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListClustersRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 16: {
pageSize_ = input.readInt64();
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
pageToken_ = s;
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
filter_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.Builder.class);
}
public static final int FOLDER_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object folderId_;
/**
*
* ID of the folder to list PostgreSQL clusters in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*
* ID of the folder to list PostgreSQL clusters in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*
*
* string folder_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for folderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PAGE_SIZE_FIELD_NUMBER = 2;
private long pageSize_;
/**
*
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
*
* int64 page_size = 2 [(.yandex.cloud.value) = "<=1000"];
* @return The pageSize.
*/
@java.lang.Override
public long getPageSize() {
return pageSize_;
}
public static final int PAGE_TOKEN_FIELD_NUMBER = 3;
private volatile java.lang.Object pageToken_;
/**
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @return The bytes for pageToken.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPageTokenBytes() {
java.lang.Object ref = pageToken_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
pageToken_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILTER_FIELD_NUMBER = 4;
private volatile java.lang.Object filter_;
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @return The bytes for filter.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFilterBytes() {
java.lang.Object ref = filter_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filter_ = 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(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, folderId_);
}
if (pageSize_ != 0L) {
output.writeInt64(2, pageSize_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, pageToken_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, filter_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, folderId_);
}
if (pageSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, pageSize_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, pageToken_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filter_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, filter_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest) obj;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (getPageSize()
!= other.getPageSize()) return false;
if (!getPageToken()
.equals(other.getPageToken())) return false;
if (!getFilter()
.equals(other.getFilter())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
hash = (37 * hash) + PAGE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getPageSize());
hash = (37 * hash) + PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getPageToken().hashCode();
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.ListClustersRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.ListClustersRequest)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
folderId_ = "";
pageSize_ = 0L;
pageToken_ = "";
filter_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest(this);
result.folderId_ = folderId_;
result.pageSize_ = pageSize_;
result.pageToken_ = pageToken_;
result.filter_ = filter_;
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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest.getDefaultInstance()) return this;
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (other.getPageSize() != 0L) {
setPageSize(other.getPageSize());
}
if (!other.getPageToken().isEmpty()) {
pageToken_ = other.pageToken_;
onChanged();
}
if (!other.getFilter().isEmpty()) {
filter_ = other.filter_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object folderId_ = "";
/**
*
* ID of the folder to list PostgreSQL clusters in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*
* ID of the folder to list PostgreSQL clusters in.
* To get the folder ID, use a [yandex.cloud.resourcemanager.v1.FolderService.List] request.
*
*
* string folder_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @param value The bytes for folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
folderId_ = value;
onChanged();
return this;
}
private long pageSize_ ;
/**
*
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
*
* int64 page_size = 2 [(.yandex.cloud.value) = "<=1000"];
* @return The pageSize.
*/
@java.lang.Override
public long getPageSize() {
return pageSize_;
}
/**
*
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
*
* int64 page_size = 2 [(.yandex.cloud.value) = "<=1000"];
* @param value The pageSize to set.
* @return This builder for chaining.
*/
public Builder setPageSize(long value) {
pageSize_ = value;
onChanged();
return this;
}
/**
*
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClustersResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @return The bytes for pageToken.
*/
public com.google.protobuf.ByteString
getPageTokenBytes() {
java.lang.Object ref = pageToken_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
pageToken_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @param value The pageToken to set.
* @return This builder for chaining.
*/
public Builder setPageToken(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
pageToken_ = value;
onChanged();
return this;
}
/**
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @return This builder for chaining.
*/
public Builder clearPageToken() {
pageToken_ = getDefaultInstance().getPageToken();
onChanged();
return this;
}
/**
*
* Page token. To get the next page of results, set [page_token] to the [ListClustersResponse.next_page_token]
* returned by the previous list request.
*
*
* string page_token = 3 [(.yandex.cloud.length) = "<=100"];
* @param value The bytes for pageToken to set.
* @return This builder for chaining.
*/
public Builder setPageTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
pageToken_ = value;
onChanged();
return this;
}
private java.lang.Object filter_ = "";
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @return The bytes for filter.
*/
public com.google.protobuf.ByteString
getFilterBytes() {
java.lang.Object ref = filter_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filter_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @param value The filter to set.
* @return This builder for chaining.
*/
public Builder setFilter(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
filter_ = value;
onChanged();
return this;
}
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @return This builder for chaining.
*/
public Builder clearFilter() {
filter_ = getDefaultInstance().getFilter();
onChanged();
return this;
}
/**
*
* A filter expression that filters resources listed in the response.
* The expression must specify:
* 1. The field name. Currently you can only use filtering with the [Cluster.name] field.
* 2. An `=` operator.
* 3. The value in double quotes (`"`). Must be 1-63 characters long and match the regular expression `[a-zA-Z0-9_-]+`.
*
*
* string filter = 4 [(.yandex.cloud.length) = "<=1000"];
* @param value The bytes for filter to set.
* @return This builder for chaining.
*/
public Builder setFilterBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
filter_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.mdb.postgresql.v1.ListClustersRequest)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.mdb.postgresql.v1.ListClustersRequest)
private static final yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest();
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListClustersRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListClustersRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ListClustersResponseOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.postgresql.v1.ListClustersResponse)
com.google.protobuf.MessageOrBuilder {
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @return The bytes for nextPageToken.
*/
com.google.protobuf.ByteString
getNextPageTokenBytes();
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.ListClustersResponse}
*/
public static final class ListClustersResponse extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.ListClustersResponse)
ListClustersResponseOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListClustersResponse.newBuilder() to construct.
private ListClustersResponse(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListClustersResponse() {
clusters_ = java.util.Collections.emptyList();
nextPageToken_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListClustersResponse();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListClustersResponse(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
clusters_.add(
input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.parser(), extensionRegistry));
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
nextPageToken_ = s;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
clusters_ = java.util.Collections.unmodifiableList(clusters_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.Builder.class);
}
public static final int CLUSTERS_FIELD_NUMBER = 1;
private java.util.List clusters_;
/**
*
*
* repeated .yandex.cloud.mdb.postgresql.v1.Cluster clusters = 1;
*/
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.ClusterOrBuilder getClustersOrBuilder(
int index) {
return clusters_.get(index);
}
public static final int NEXT_PAGE_TOKEN_FIELD_NUMBER = 2;
private volatile java.lang.Object nextPageToken_;
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @return The bytes for nextPageToken.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNextPageTokenBytes() {
java.lang.Object ref = nextPageToken_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
nextPageToken_ = 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 {
for (int i = 0; i < clusters_.size(); i++) {
output.writeMessage(1, clusters_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, nextPageToken_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < clusters_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, clusters_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(nextPageToken_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, nextPageToken_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse) obj;
if (!getClustersList()
.equals(other.getClustersList())) return false;
if (!getNextPageToken()
.equals(other.getNextPageToken())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (getClustersCount() > 0) {
hash = (37 * hash) + CLUSTERS_FIELD_NUMBER;
hash = (53 * hash) + getClustersList().hashCode();
}
hash = (37 * hash) + NEXT_PAGE_TOKEN_FIELD_NUMBER;
hash = (53 * hash) + getNextPageToken().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.ListClustersResponse}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.ListClustersResponse)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponseOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersResponse_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersResponse_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getClustersFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
if (clustersBuilder_ == null) {
clusters_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
clustersBuilder_.clear();
}
nextPageToken_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClustersResponse_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse(this);
int from_bitField0_ = bitField0_;
if (clustersBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
clusters_ = java.util.Collections.unmodifiableList(clusters_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.clusters_ = clusters_;
} else {
result.clusters_ = clustersBuilder_.build();
}
result.nextPageToken_ = nextPageToken_;
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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse.getDefaultInstance()) return this;
if (clustersBuilder_ == null) {
if (!other.clusters_.isEmpty()) {
if (clusters_.isEmpty()) {
clusters_ = other.clusters_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureClustersIsMutable();
clusters_.addAll(other.clusters_);
}
onChanged();
}
} else {
if (!other.clusters_.isEmpty()) {
if (clustersBuilder_.isEmpty()) {
clustersBuilder_.dispose();
clustersBuilder_ = null;
clusters_ = other.clusters_;
bitField0_ = (bitField0_ & ~0x00000001);
clustersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getClustersFieldBuilder() : null;
} else {
clustersBuilder_.addAllMessages(other.clusters_);
}
}
}
if (!other.getNextPageToken().isEmpty()) {
nextPageToken_ = other.nextPageToken_;
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List clusters_ =
java.util.Collections.emptyList();
private void ensureClustersIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
clusters_ = new java.util.ArrayList(clusters_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster, yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Builder, yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.ClusterOrBuilder> clustersBuilder_;
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @return The bytes for nextPageToken.
*/
public com.google.protobuf.ByteString
getNextPageTokenBytes() {
java.lang.Object ref = nextPageToken_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
nextPageToken_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @param value The nextPageToken to set.
* @return This builder for chaining.
*/
public Builder setNextPageToken(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
nextPageToken_ = value;
onChanged();
return this;
}
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @return This builder for chaining.
*/
public Builder clearNextPageToken() {
nextPageToken_ = getDefaultInstance().getNextPageToken();
onChanged();
return this;
}
/**
*
* This token allows you to get the next page of results for list requests. If the number of results
* is larger than [ListClustersRequest.page_size], use the [next_page_token] as the value
* for the [ListClustersRequest.page_token] parameter in the next list request. Each subsequent
* list request will have its own [next_page_token] to continue paging through the results.
*
*
* string next_page_token = 2;
* @param value The bytes for nextPageToken to set.
* @return This builder for chaining.
*/
public Builder setNextPageTokenBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
nextPageToken_ = value;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.mdb.postgresql.v1.ListClustersResponse)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.mdb.postgresql.v1.ListClustersResponse)
private static final yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse();
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ListClustersResponse parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ListClustersResponse(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClustersResponse getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CreateClusterRequestOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.postgresql.v1.CreateClusterRequest)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
int getEnvironmentValue();
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* repeated string security_group_ids = 11;
* @return A list containing the securityGroupIds.
*/
java.util.List
getSecurityGroupIdsList();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @return The count of securityGroupIds.
*/
int getSecurityGroupIdsCount();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
java.lang.String getSecurityGroupIds(int index);
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index);
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* repeated string host_group_ids = 13;
* @return A list containing the hostGroupIds.
*/
java.util.List
getHostGroupIdsList();
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @return The count of hostGroupIds.
*/
int getHostGroupIdsCount();
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
java.lang.String getHostGroupIds(int index);
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
com.google.protobuf.ByteString
getHostGroupIdsBytes(int index);
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.CreateClusterRequest}
*/
public static final class CreateClusterRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.CreateClusterRequest)
CreateClusterRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateClusterRequest.newBuilder() to construct.
private CreateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CreateClusterRequest() {
folderId_ = "";
name_ = "";
description_ = "";
environment_ = 0;
databaseSpecs_ = java.util.Collections.emptyList();
userSpecs_ = java.util.Collections.emptyList();
hostSpecs_ = java.util.Collections.emptyList();
networkId_ = "";
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
hostGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CreateClusterRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CreateClusterRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 40: {
int rawValue = input.readEnum();
environment_ = rawValue;
break;
}
case 50: {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.Builder subBuilder = null;
if (configSpec_ != null) {
subBuilder = configSpec_.toBuilder();
}
configSpec_ = input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(configSpec_);
configSpec_ = subBuilder.buildPartial();
}
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
databaseSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
databaseSpecs_.add(
input.readMessage(yandex.cloud.api.mdb.postgresql.v1.DatabaseOuterClass.DatabaseSpec.parser(), extensionRegistry));
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
userSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
userSpecs_.add(
input.readMessage(yandex.cloud.api.mdb.postgresql.v1.UserOuterClass.UserSpec.parser(), extensionRegistry));
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
hostSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
hostSpecs_.add(
input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.HostSpec.parser(), extensionRegistry));
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
networkId_ = s;
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
securityGroupIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000010;
}
securityGroupIds_.add(s);
break;
}
case 96: {
deletionProtection_ = input.readBool();
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000020) != 0)) {
hostGroupIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000020;
}
hostGroupIds_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
databaseSpecs_ = java.util.Collections.unmodifiableList(databaseSpecs_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
userSpecs_ = java.util.Collections.unmodifiableList(userSpecs_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
hostSpecs_ = java.util.Collections.unmodifiableList(hostSpecs_);
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000020) != 0)) {
hostGroupIds_ = hostGroupIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.Builder.class);
}
public static final int FOLDER_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object folderId_;
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 4;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int ENVIRONMENT_FIELD_NUMBER = 5;
private int environment_;
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
@java.lang.Override public int getEnvironmentValue() {
return environment_;
}
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @return The environment.
*/
@java.lang.Override public yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment getEnvironment() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment result = yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.valueOf(environment_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.UNRECOGNIZED : result;
}
public static final int CONFIG_SPEC_FIELD_NUMBER = 6;
private yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec configSpec_;
/**
*
* Configuration and resources for hosts that should be created for the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.ConfigSpec config_spec = 6 [(.yandex.cloud.required) = true];
* @return Whether the configSpec field is set.
*/
@java.lang.Override
public boolean hasConfigSpec() {
return configSpec_ != null;
}
/**
*
* Configuration and resources for hosts that should be created for the PostgreSQL cluster.
*
*
* string network_id = 10 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for networkId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNetworkIdBytes() {
java.lang.Object ref = networkId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
networkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SECURITY_GROUP_IDS_FIELD_NUMBER = 11;
private com.google.protobuf.LazyStringList securityGroupIds_;
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
public static final int DELETION_PROTECTION_FIELD_NUMBER = 12;
private boolean deletionProtection_;
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* bool deletion_protection = 12;
* @return The deletionProtection.
*/
@java.lang.Override
public boolean getDeletionProtection() {
return deletionProtection_;
}
public static final int HOST_GROUP_IDS_FIELD_NUMBER = 13;
private com.google.protobuf.LazyStringList hostGroupIds_;
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @return A list containing the hostGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getHostGroupIdsList() {
return hostGroupIds_;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @return The count of hostGroupIds.
*/
public int getHostGroupIdsCount() {
return hostGroupIds_.size();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
public java.lang.String getHostGroupIds(int index) {
return hostGroupIds_.get(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getHostGroupIdsBytes(int index) {
return hostGroupIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, folderId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
4);
if (environment_ != yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) {
output.writeEnum(5, environment_);
}
if (configSpec_ != null) {
output.writeMessage(6, getConfigSpec());
}
for (int i = 0; i < databaseSpecs_.size(); i++) {
output.writeMessage(7, databaseSpecs_.get(i));
}
for (int i = 0; i < userSpecs_.size(); i++) {
output.writeMessage(8, userSpecs_.get(i));
}
for (int i = 0; i < hostSpecs_.size(); i++) {
output.writeMessage(9, hostSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, networkId_);
}
for (int i = 0; i < securityGroupIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, securityGroupIds_.getRaw(i));
}
if (deletionProtection_ != false) {
output.writeBool(12, deletionProtection_);
}
for (int i = 0; i < hostGroupIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, hostGroupIds_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, folderId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, labels__);
}
if (environment_ != yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(5, environment_);
}
if (configSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getConfigSpec());
}
for (int i = 0; i < databaseSpecs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, databaseSpecs_.get(i));
}
for (int i = 0; i < userSpecs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, userSpecs_.get(i));
}
for (int i = 0; i < hostSpecs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, hostSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, networkId_);
}
{
int dataSize = 0;
for (int i = 0; i < securityGroupIds_.size(); i++) {
dataSize += computeStringSizeNoTag(securityGroupIds_.getRaw(i));
}
size += dataSize;
size += 1 * getSecurityGroupIdsList().size();
}
if (deletionProtection_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(12, deletionProtection_);
}
{
int dataSize = 0;
for (int i = 0; i < hostGroupIds_.size(); i++) {
dataSize += computeStringSizeNoTag(hostGroupIds_.getRaw(i));
}
size += dataSize;
size += 1 * getHostGroupIdsList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest) obj;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (environment_ != other.environment_) return false;
if (hasConfigSpec() != other.hasConfigSpec()) return false;
if (hasConfigSpec()) {
if (!getConfigSpec()
.equals(other.getConfigSpec())) return false;
}
if (!getDatabaseSpecsList()
.equals(other.getDatabaseSpecsList())) return false;
if (!getUserSpecsList()
.equals(other.getUserSpecsList())) return false;
if (!getHostSpecsList()
.equals(other.getHostSpecsList())) return false;
if (!getNetworkId()
.equals(other.getNetworkId())) return false;
if (!getSecurityGroupIdsList()
.equals(other.getSecurityGroupIdsList())) return false;
if (getDeletionProtection()
!= other.getDeletionProtection()) return false;
if (!getHostGroupIdsList()
.equals(other.getHostGroupIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER;
hash = (53 * hash) + environment_;
if (hasConfigSpec()) {
hash = (37 * hash) + CONFIG_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getConfigSpec().hashCode();
}
if (getDatabaseSpecsCount() > 0) {
hash = (37 * hash) + DATABASE_SPECS_FIELD_NUMBER;
hash = (53 * hash) + getDatabaseSpecsList().hashCode();
}
if (getUserSpecsCount() > 0) {
hash = (37 * hash) + USER_SPECS_FIELD_NUMBER;
hash = (53 * hash) + getUserSpecsList().hashCode();
}
if (getHostSpecsCount() > 0) {
hash = (37 * hash) + HOST_SPECS_FIELD_NUMBER;
hash = (53 * hash) + getHostSpecsList().hashCode();
}
hash = (37 * hash) + NETWORK_ID_FIELD_NUMBER;
hash = (53 * hash) + getNetworkId().hashCode();
if (getSecurityGroupIdsCount() > 0) {
hash = (37 * hash) + SECURITY_GROUP_IDS_FIELD_NUMBER;
hash = (53 * hash) + getSecurityGroupIdsList().hashCode();
}
hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeletionProtection());
if (getHostGroupIdsCount() > 0) {
hash = (37 * hash) + HOST_GROUP_IDS_FIELD_NUMBER;
hash = (53 * hash) + getHostGroupIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.CreateClusterRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.CreateClusterRequest)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getDatabaseSpecsFieldBuilder();
getUserSpecsFieldBuilder();
getHostSpecsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
folderId_ = "";
name_ = "";
description_ = "";
internalGetMutableLabels().clear();
environment_ = 0;
if (configSpecBuilder_ == null) {
configSpec_ = null;
} else {
configSpec_ = null;
configSpecBuilder_ = null;
}
if (databaseSpecsBuilder_ == null) {
databaseSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
databaseSpecsBuilder_.clear();
}
if (userSpecsBuilder_ == null) {
userSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
userSpecsBuilder_.clear();
}
if (hostSpecsBuilder_ == null) {
hostSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000008);
} else {
hostSpecsBuilder_.clear();
}
networkId_ = "";
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000010);
deletionProtection_ = false;
hostGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_CreateClusterRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest(this);
int from_bitField0_ = bitField0_;
result.folderId_ = folderId_;
result.name_ = name_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.environment_ = environment_;
if (configSpecBuilder_ == null) {
result.configSpec_ = configSpec_;
} else {
result.configSpec_ = configSpecBuilder_.build();
}
if (databaseSpecsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
databaseSpecs_ = java.util.Collections.unmodifiableList(databaseSpecs_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.databaseSpecs_ = databaseSpecs_;
} else {
result.databaseSpecs_ = databaseSpecsBuilder_.build();
}
if (userSpecsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
userSpecs_ = java.util.Collections.unmodifiableList(userSpecs_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.userSpecs_ = userSpecs_;
} else {
result.userSpecs_ = userSpecsBuilder_.build();
}
if (hostSpecsBuilder_ == null) {
if (((bitField0_ & 0x00000008) != 0)) {
hostSpecs_ = java.util.Collections.unmodifiableList(hostSpecs_);
bitField0_ = (bitField0_ & ~0x00000008);
}
result.hostSpecs_ = hostSpecs_;
} else {
result.hostSpecs_ = hostSpecsBuilder_.build();
}
result.networkId_ = networkId_;
if (((bitField0_ & 0x00000010) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000010);
}
result.securityGroupIds_ = securityGroupIds_;
result.deletionProtection_ = deletionProtection_;
if (((bitField0_ & 0x00000020) != 0)) {
hostGroupIds_ = hostGroupIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000020);
}
result.hostGroupIds_ = hostGroupIds_;
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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest.getDefaultInstance()) return this;
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.environment_ != 0) {
setEnvironmentValue(other.getEnvironmentValue());
}
if (other.hasConfigSpec()) {
mergeConfigSpec(other.getConfigSpec());
}
if (databaseSpecsBuilder_ == null) {
if (!other.databaseSpecs_.isEmpty()) {
if (databaseSpecs_.isEmpty()) {
databaseSpecs_ = other.databaseSpecs_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureDatabaseSpecsIsMutable();
databaseSpecs_.addAll(other.databaseSpecs_);
}
onChanged();
}
} else {
if (!other.databaseSpecs_.isEmpty()) {
if (databaseSpecsBuilder_.isEmpty()) {
databaseSpecsBuilder_.dispose();
databaseSpecsBuilder_ = null;
databaseSpecs_ = other.databaseSpecs_;
bitField0_ = (bitField0_ & ~0x00000002);
databaseSpecsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getDatabaseSpecsFieldBuilder() : null;
} else {
databaseSpecsBuilder_.addAllMessages(other.databaseSpecs_);
}
}
}
if (userSpecsBuilder_ == null) {
if (!other.userSpecs_.isEmpty()) {
if (userSpecs_.isEmpty()) {
userSpecs_ = other.userSpecs_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureUserSpecsIsMutable();
userSpecs_.addAll(other.userSpecs_);
}
onChanged();
}
} else {
if (!other.userSpecs_.isEmpty()) {
if (userSpecsBuilder_.isEmpty()) {
userSpecsBuilder_.dispose();
userSpecsBuilder_ = null;
userSpecs_ = other.userSpecs_;
bitField0_ = (bitField0_ & ~0x00000004);
userSpecsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getUserSpecsFieldBuilder() : null;
} else {
userSpecsBuilder_.addAllMessages(other.userSpecs_);
}
}
}
if (hostSpecsBuilder_ == null) {
if (!other.hostSpecs_.isEmpty()) {
if (hostSpecs_.isEmpty()) {
hostSpecs_ = other.hostSpecs_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureHostSpecsIsMutable();
hostSpecs_.addAll(other.hostSpecs_);
}
onChanged();
}
} else {
if (!other.hostSpecs_.isEmpty()) {
if (hostSpecsBuilder_.isEmpty()) {
hostSpecsBuilder_.dispose();
hostSpecsBuilder_ = null;
hostSpecs_ = other.hostSpecs_;
bitField0_ = (bitField0_ & ~0x00000008);
hostSpecsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHostSpecsFieldBuilder() : null;
} else {
hostSpecsBuilder_.addAllMessages(other.hostSpecs_);
}
}
}
if (!other.getNetworkId().isEmpty()) {
networkId_ = other.networkId_;
onChanged();
}
if (!other.securityGroupIds_.isEmpty()) {
if (securityGroupIds_.isEmpty()) {
securityGroupIds_ = other.securityGroupIds_;
bitField0_ = (bitField0_ & ~0x00000010);
} else {
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.addAll(other.securityGroupIds_);
}
onChanged();
}
if (other.getDeletionProtection() != false) {
setDeletionProtection(other.getDeletionProtection());
}
if (!other.hostGroupIds_.isEmpty()) {
if (hostGroupIds_.isEmpty()) {
hostGroupIds_ = other.hostGroupIds_;
bitField0_ = (bitField0_ & ~0x00000020);
} else {
ensureHostGroupIdsIsMutable();
hostGroupIds_.addAll(other.hostGroupIds_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.CreateClusterRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object folderId_ = "";
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
@java.lang.Override public int getEnvironmentValue() {
return environment_;
}
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for environment to set.
* @return This builder for chaining.
*/
public Builder setEnvironmentValue(int value) {
environment_ = value;
onChanged();
return this;
}
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @return The environment.
*/
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment getEnvironment() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment result = yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.valueOf(environment_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.UNRECOGNIZED : result;
}
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 5 [(.yandex.cloud.required) = true];
* @param value The environment to set.
* @return This builder for chaining.
*/
public Builder setEnvironment(yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment value) {
if (value == null) {
throw new NullPointerException();
}
environment_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Deployment environment of the PostgreSQL cluster.
*
*
* string network_id = 10 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @param value The bytes for networkId to set.
* @return This builder for chaining.
*/
public Builder setNetworkIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
networkId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSecurityGroupIdsIsMutable() {
if (!((bitField0_ & 0x00000010) != 0)) {
securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(securityGroupIds_);
bitField0_ |= 0x00000010;
}
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_.getUnmodifiableView();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param index The index to set the value at.
* @param value The securityGroupIds to set.
* @return This builder for chaining.
*/
public Builder setSecurityGroupIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.set(index, value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param value The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addSecurityGroupIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.add(value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 11;
* @param values The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityGroupIds(
java.lang.Iterable values) {
ensureSecurityGroupIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, securityGroupIds_);
onChanged();
return this;
}
/**
*
*
* repeated string host_group_ids = 13;
* @return A list containing the hostGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getHostGroupIdsList() {
return hostGroupIds_.getUnmodifiableView();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @return The count of hostGroupIds.
*/
public int getHostGroupIdsCount() {
return hostGroupIds_.size();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
public java.lang.String getHostGroupIds(int index) {
return hostGroupIds_.get(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getHostGroupIdsBytes(int index) {
return hostGroupIds_.getByteString(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param index The index to set the value at.
* @param value The hostGroupIds to set.
* @return This builder for chaining.
*/
public Builder setHostGroupIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostGroupIdsIsMutable();
hostGroupIds_.set(index, value);
onChanged();
return this;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param value The hostGroupIds to add.
* @return This builder for chaining.
*/
public Builder addHostGroupIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostGroupIdsIsMutable();
hostGroupIds_.add(value);
onChanged();
return this;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 13;
* @param values The hostGroupIds to add.
* @return This builder for chaining.
*/
public Builder addAllHostGroupIds(
java.lang.Iterable values) {
ensureHostGroupIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hostGroupIds_);
onChanged();
return this;
}
/**
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
*
* repeated string security_group_ids = 8;
* @return A list containing the securityGroupIds.
*/
java.util.List
getSecurityGroupIdsList();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @return The count of securityGroupIds.
*/
int getSecurityGroupIdsCount();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
java.lang.String getSecurityGroupIds(int index);
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index);
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* bool deletion_protection = 9;
* @return The deletionProtection.
*/
boolean getDeletionProtection();
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest}
*/
public static final class UpdateClusterRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest)
UpdateClusterRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use UpdateClusterRequest.newBuilder() to construct.
private UpdateClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private UpdateClusterRequest() {
clusterId_ = "";
description_ = "";
name_ = "";
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new UpdateClusterRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private UpdateClusterRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
clusterId_ = s;
break;
}
case 18: {
com.google.protobuf.FieldMask.Builder subBuilder = null;
if (updateMask_ != null) {
subBuilder = updateMask_.toBuilder();
}
updateMask_ = input.readMessage(com.google.protobuf.FieldMask.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(updateMask_);
updateMask_ = subBuilder.buildPartial();
}
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 42: {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.Builder subBuilder = null;
if (configSpec_ != null) {
subBuilder = configSpec_.toBuilder();
}
configSpec_ = input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(configSpec_);
configSpec_ = subBuilder.buildPartial();
}
break;
}
case 50: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 58: {
yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindow.Builder subBuilder = null;
if (maintenanceWindow_ != null) {
subBuilder = maintenanceWindow_.toBuilder();
}
maintenanceWindow_ = input.readMessage(yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindow.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(maintenanceWindow_);
maintenanceWindow_ = subBuilder.buildPartial();
}
break;
}
case 66: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
securityGroupIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000002;
}
securityGroupIds_.add(s);
break;
}
case 72: {
deletionProtection_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.Builder.class);
}
public static final int CLUSTER_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object clusterId_;
/**
*
* ID of the PostgreSQL Cluster resource to update.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 4;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int CONFIG_SPEC_FIELD_NUMBER = 5;
private yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec configSpec_;
/**
*
* New configuration and resources for hosts in the cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.ConfigSpec config_spec = 5;
* @return Whether the configSpec field is set.
*/
@java.lang.Override
public boolean hasConfigSpec() {
return configSpec_ != null;
}
/**
*
* New configuration and resources for hosts in the cluster.
*
* New maintenance window settings for the cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.MaintenanceWindow maintenance_window = 7;
*/
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindowOrBuilder getMaintenanceWindowOrBuilder() {
return getMaintenanceWindow();
}
public static final int SECURITY_GROUP_IDS_FIELD_NUMBER = 8;
private com.google.protobuf.LazyStringList securityGroupIds_;
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
public static final int DELETION_PROTECTION_FIELD_NUMBER = 9;
private boolean deletionProtection_;
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* bool deletion_protection = 9;
* @return The deletionProtection.
*/
@java.lang.Override
public boolean getDeletionProtection() {
return deletionProtection_;
}
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(clusterId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterId_);
}
if (updateMask_ != null) {
output.writeMessage(2, getUpdateMask());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
4);
if (configSpec_ != null) {
output.writeMessage(5, getConfigSpec());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, name_);
}
if (maintenanceWindow_ != null) {
output.writeMessage(7, getMaintenanceWindow());
}
for (int i = 0; i < securityGroupIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, securityGroupIds_.getRaw(i));
}
if (deletionProtection_ != false) {
output.writeBool(9, deletionProtection_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterId_);
}
if (updateMask_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getUpdateMask());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, labels__);
}
if (configSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getConfigSpec());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, name_);
}
if (maintenanceWindow_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getMaintenanceWindow());
}
{
int dataSize = 0;
for (int i = 0; i < securityGroupIds_.size(); i++) {
dataSize += computeStringSizeNoTag(securityGroupIds_.getRaw(i));
}
size += dataSize;
size += 1 * getSecurityGroupIdsList().size();
}
if (deletionProtection_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(9, deletionProtection_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest) obj;
if (!getClusterId()
.equals(other.getClusterId())) return false;
if (hasUpdateMask() != other.hasUpdateMask()) return false;
if (hasUpdateMask()) {
if (!getUpdateMask()
.equals(other.getUpdateMask())) return false;
}
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (hasConfigSpec() != other.hasConfigSpec()) return false;
if (hasConfigSpec()) {
if (!getConfigSpec()
.equals(other.getConfigSpec())) return false;
}
if (!getName()
.equals(other.getName())) return false;
if (hasMaintenanceWindow() != other.hasMaintenanceWindow()) return false;
if (hasMaintenanceWindow()) {
if (!getMaintenanceWindow()
.equals(other.getMaintenanceWindow())) return false;
}
if (!getSecurityGroupIdsList()
.equals(other.getSecurityGroupIdsList())) return false;
if (getDeletionProtection()
!= other.getDeletionProtection()) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER;
hash = (53 * hash) + getClusterId().hashCode();
if (hasUpdateMask()) {
hash = (37 * hash) + UPDATE_MASK_FIELD_NUMBER;
hash = (53 * hash) + getUpdateMask().hashCode();
}
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
if (hasConfigSpec()) {
hash = (37 * hash) + CONFIG_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getConfigSpec().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
if (hasMaintenanceWindow()) {
hash = (37 * hash) + MAINTENANCE_WINDOW_FIELD_NUMBER;
hash = (53 * hash) + getMaintenanceWindow().hashCode();
}
if (getSecurityGroupIdsCount() > 0) {
hash = (37 * hash) + SECURITY_GROUP_IDS_FIELD_NUMBER;
hash = (53 * hash) + getSecurityGroupIdsList().hashCode();
}
hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeletionProtection());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.UpdateClusterRequest)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
clusterId_ = "";
if (updateMaskBuilder_ == null) {
updateMask_ = null;
} else {
updateMask_ = null;
updateMaskBuilder_ = null;
}
description_ = "";
internalGetMutableLabels().clear();
if (configSpecBuilder_ == null) {
configSpec_ = null;
} else {
configSpec_ = null;
configSpecBuilder_ = null;
}
name_ = "";
if (maintenanceWindowBuilder_ == null) {
maintenanceWindow_ = null;
} else {
maintenanceWindow_ = null;
maintenanceWindowBuilder_ = null;
}
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
deletionProtection_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_UpdateClusterRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest(this);
int from_bitField0_ = bitField0_;
result.clusterId_ = clusterId_;
if (updateMaskBuilder_ == null) {
result.updateMask_ = updateMask_;
} else {
result.updateMask_ = updateMaskBuilder_.build();
}
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
if (configSpecBuilder_ == null) {
result.configSpec_ = configSpec_;
} else {
result.configSpec_ = configSpecBuilder_.build();
}
result.name_ = name_;
if (maintenanceWindowBuilder_ == null) {
result.maintenanceWindow_ = maintenanceWindow_;
} else {
result.maintenanceWindow_ = maintenanceWindowBuilder_.build();
}
if (((bitField0_ & 0x00000002) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000002);
}
result.securityGroupIds_ = securityGroupIds_;
result.deletionProtection_ = deletionProtection_;
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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest.getDefaultInstance()) return this;
if (!other.getClusterId().isEmpty()) {
clusterId_ = other.clusterId_;
onChanged();
}
if (other.hasUpdateMask()) {
mergeUpdateMask(other.getUpdateMask());
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.hasConfigSpec()) {
mergeConfigSpec(other.getConfigSpec());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (other.hasMaintenanceWindow()) {
mergeMaintenanceWindow(other.getMaintenanceWindow());
}
if (!other.securityGroupIds_.isEmpty()) {
if (securityGroupIds_.isEmpty()) {
securityGroupIds_ = other.securityGroupIds_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.addAll(other.securityGroupIds_);
}
onChanged();
}
if (other.getDeletionProtection() != false) {
setDeletionProtection(other.getDeletionProtection());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.UpdateClusterRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object clusterId_ = "";
/**
*
* ID of the PostgreSQL Cluster resource to update.
* To get the PostgreSQL cluster ID, use a [ClusterService.List] request.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* New description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* New description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* New description of the PostgreSQL cluster.
*
*
* string description = 3 [(.yandex.cloud.length) = "<=256"];
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
* The new set of labels will completely replace the old ones. To add a label, request the current
* set with the [ClusterService.Get] method, then send an [ClusterService.Update] request with the new label added to the set.
*
*
* string name = 6 [(.yandex.cloud.pattern) = "[a-zA-Z0-9_-]*", (.yandex.cloud.length) = "<=63"];
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* New name for the cluster.
*
*
* string name = 6 [(.yandex.cloud.pattern) = "[a-zA-Z0-9_-]*", (.yandex.cloud.length) = "<=63"];
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
onChanged();
return this;
}
/**
*
* New name for the cluster.
*
*
* string name = 6 [(.yandex.cloud.pattern) = "[a-zA-Z0-9_-]*", (.yandex.cloud.length) = "<=63"];
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* New name for the cluster.
*
*
* string name = 6 [(.yandex.cloud.pattern) = "[a-zA-Z0-9_-]*", (.yandex.cloud.length) = "<=63"];
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
onChanged();
return this;
}
private yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindow maintenanceWindow_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindow, yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindow.Builder, yandex.cloud.api.mdb.postgresql.v1.Maintenance.MaintenanceWindowOrBuilder> maintenanceWindowBuilder_;
/**
*
* New maintenance window settings for the cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.MaintenanceWindow maintenance_window = 7;
* @return Whether the maintenanceWindow field is set.
*/
public boolean hasMaintenanceWindow() {
return maintenanceWindowBuilder_ != null || maintenanceWindow_ != null;
}
/**
*
* New maintenance window settings for the cluster.
*
*
* repeated string security_group_ids = 8;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_.getUnmodifiableView();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param index The index to set the value at.
* @param value The securityGroupIds to set.
* @return This builder for chaining.
*/
public Builder setSecurityGroupIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.set(index, value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param value The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addSecurityGroupIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.add(value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 8;
* @param values The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityGroupIds(
java.lang.Iterable values) {
ensureSecurityGroupIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, securityGroupIds_);
onChanged();
return this;
}
/**
*
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
int getEnvironmentValue();
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return A list containing the securityGroupIds.
*/
java.util.List
getSecurityGroupIdsList();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return The count of securityGroupIds.
*/
int getSecurityGroupIdsCount();
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
java.lang.String getSecurityGroupIds(int index);
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index);
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* repeated string host_group_ids = 14;
* @return A list containing the hostGroupIds.
*/
java.util.List
getHostGroupIdsList();
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @return The count of hostGroupIds.
*/
int getHostGroupIdsCount();
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
java.lang.String getHostGroupIds(int index);
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
com.google.protobuf.ByteString
getHostGroupIdsBytes(int index);
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest}
*/
public static final class RestoreClusterRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest)
RestoreClusterRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RestoreClusterRequest.newBuilder() to construct.
private RestoreClusterRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RestoreClusterRequest() {
backupId_ = "";
name_ = "";
description_ = "";
environment_ = 0;
hostSpecs_ = java.util.Collections.emptyList();
networkId_ = "";
folderId_ = "";
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
hostGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RestoreClusterRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RestoreClusterRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
backupId_ = s;
break;
}
case 18: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (time_ != null) {
subBuilder = time_.toBuilder();
}
time_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(time_);
time_ = subBuilder.buildPartial();
}
break;
}
case 24: {
timeInclusive_ = input.readBool();
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
description_ = s;
break;
}
case 50: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 56: {
int rawValue = input.readEnum();
environment_ = rawValue;
break;
}
case 66: {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.Builder subBuilder = null;
if (configSpec_ != null) {
subBuilder = configSpec_.toBuilder();
}
configSpec_ = input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(configSpec_);
configSpec_ = subBuilder.buildPartial();
}
break;
}
case 74: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
hostSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
hostSpecs_.add(
input.readMessage(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.HostSpec.parser(), extensionRegistry));
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
networkId_ = s;
break;
}
case 90: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
securityGroupIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000004;
}
securityGroupIds_.add(s);
break;
}
case 104: {
deletionProtection_ = input.readBool();
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
hostGroupIds_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
hostGroupIds_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
hostSpecs_ = java.util.Collections.unmodifiableList(hostSpecs_);
}
if (((mutable_bitField0_ & 0x00000004) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
hostGroupIds_ = hostGroupIds_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.Builder.class);
}
public static final int BACKUP_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object backupId_;
/**
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
*
* string backup_id = 1 [(.yandex.cloud.required) = true];
* @return The bytes for backupId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getBackupIdBytes() {
java.lang.Object ref = backupId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
backupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TIME_FIELD_NUMBER = 2;
private com.google.protobuf.Timestamp time_;
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
* @return Whether the time field is set.
*/
@java.lang.Override
public boolean hasTime() {
return time_ != null;
}
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
* @return The time.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getTime() {
return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
}
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getTimeOrBuilder() {
return getTime();
}
public static final int TIME_INCLUSIVE_FIELD_NUMBER = 3;
private boolean timeInclusive_;
/**
*
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*
*
* bool time_inclusive = 3;
* @return The timeInclusive.
*/
@java.lang.Override
public boolean getTimeInclusive() {
return timeInclusive_;
}
public static final int NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object name_;
/**
*
* Name of the new PostgreSQL cluster. The name must be unique within the folder.
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LABELS_FIELD_NUMBER = 6;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
*
* map<string, string> labels = 6 [(.yandex.cloud.pattern) = "[-_0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int ENVIRONMENT_FIELD_NUMBER = 7;
private int environment_;
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
@java.lang.Override public int getEnvironmentValue() {
return environment_;
}
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @return The environment.
*/
@java.lang.Override public yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment getEnvironment() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment result = yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.valueOf(environment_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.UNRECOGNIZED : result;
}
public static final int CONFIG_SPEC_FIELD_NUMBER = 8;
private yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ConfigSpec configSpec_;
/**
*
* Configuration for the PostgreSQL cluster to be created.
*
*
* .yandex.cloud.mdb.postgresql.v1.ConfigSpec config_spec = 8 [(.yandex.cloud.required) = true];
* @return Whether the configSpec field is set.
*/
@java.lang.Override
public boolean hasConfigSpec() {
return configSpec_ != null;
}
/**
*
* Configuration for the PostgreSQL cluster to be created.
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @return The bytes for folderId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int SECURITY_GROUP_IDS_FIELD_NUMBER = 12;
private com.google.protobuf.LazyStringList securityGroupIds_;
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
public static final int DELETION_PROTECTION_FIELD_NUMBER = 13;
private boolean deletionProtection_;
/**
*
* Deletion Protection inhibits deletion of the cluster
*
*
* bool deletion_protection = 13;
* @return The deletionProtection.
*/
@java.lang.Override
public boolean getDeletionProtection() {
return deletionProtection_;
}
public static final int HOST_GROUP_IDS_FIELD_NUMBER = 14;
private com.google.protobuf.LazyStringList hostGroupIds_;
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @return A list containing the hostGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getHostGroupIdsList() {
return hostGroupIds_;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @return The count of hostGroupIds.
*/
public int getHostGroupIdsCount() {
return hostGroupIds_.size();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
public java.lang.String getHostGroupIds(int index) {
return hostGroupIds_.get(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getHostGroupIdsBytes(int index) {
return hostGroupIds_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, backupId_);
}
if (time_ != null) {
output.writeMessage(2, getTime());
}
if (timeInclusive_ != false) {
output.writeBool(3, timeInclusive_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, description_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
6);
if (environment_ != yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) {
output.writeEnum(7, environment_);
}
if (configSpec_ != null) {
output.writeMessage(8, getConfigSpec());
}
for (int i = 0; i < hostSpecs_.size(); i++) {
output.writeMessage(9, hostSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 10, networkId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, folderId_);
}
for (int i = 0; i < securityGroupIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, securityGroupIds_.getRaw(i));
}
if (deletionProtection_ != false) {
output.writeBool(13, deletionProtection_);
}
for (int i = 0; i < hostGroupIds_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, hostGroupIds_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(backupId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, backupId_);
}
if (time_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, getTime());
}
if (timeInclusive_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(3, timeInclusive_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(description_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, description_);
}
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, labels__);
}
if (environment_ != yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.ENVIRONMENT_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(7, environment_);
}
if (configSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getConfigSpec());
}
for (int i = 0; i < hostSpecs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, hostSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, networkId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, folderId_);
}
{
int dataSize = 0;
for (int i = 0; i < securityGroupIds_.size(); i++) {
dataSize += computeStringSizeNoTag(securityGroupIds_.getRaw(i));
}
size += dataSize;
size += 1 * getSecurityGroupIdsList().size();
}
if (deletionProtection_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(13, deletionProtection_);
}
{
int dataSize = 0;
for (int i = 0; i < hostGroupIds_.size(); i++) {
dataSize += computeStringSizeNoTag(hostGroupIds_.getRaw(i));
}
size += dataSize;
size += 1 * getHostGroupIdsList().size();
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest) obj;
if (!getBackupId()
.equals(other.getBackupId())) return false;
if (hasTime() != other.hasTime()) return false;
if (hasTime()) {
if (!getTime()
.equals(other.getTime())) return false;
}
if (getTimeInclusive()
!= other.getTimeInclusive()) return false;
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (environment_ != other.environment_) return false;
if (hasConfigSpec() != other.hasConfigSpec()) return false;
if (hasConfigSpec()) {
if (!getConfigSpec()
.equals(other.getConfigSpec())) return false;
}
if (!getHostSpecsList()
.equals(other.getHostSpecsList())) return false;
if (!getNetworkId()
.equals(other.getNetworkId())) return false;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (!getSecurityGroupIdsList()
.equals(other.getSecurityGroupIdsList())) return false;
if (getDeletionProtection()
!= other.getDeletionProtection()) return false;
if (!getHostGroupIdsList()
.equals(other.getHostGroupIdsList())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + BACKUP_ID_FIELD_NUMBER;
hash = (53 * hash) + getBackupId().hashCode();
if (hasTime()) {
hash = (37 * hash) + TIME_FIELD_NUMBER;
hash = (53 * hash) + getTime().hashCode();
}
hash = (37 * hash) + TIME_INCLUSIVE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getTimeInclusive());
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + DESCRIPTION_FIELD_NUMBER;
hash = (53 * hash) + getDescription().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + ENVIRONMENT_FIELD_NUMBER;
hash = (53 * hash) + environment_;
if (hasConfigSpec()) {
hash = (37 * hash) + CONFIG_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getConfigSpec().hashCode();
}
if (getHostSpecsCount() > 0) {
hash = (37 * hash) + HOST_SPECS_FIELD_NUMBER;
hash = (53 * hash) + getHostSpecsList().hashCode();
}
hash = (37 * hash) + NETWORK_ID_FIELD_NUMBER;
hash = (53 * hash) + getNetworkId().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
if (getSecurityGroupIdsCount() > 0) {
hash = (37 * hash) + SECURITY_GROUP_IDS_FIELD_NUMBER;
hash = (53 * hash) + getSecurityGroupIdsList().hashCode();
}
hash = (37 * hash) + DELETION_PROTECTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDeletionProtection());
if (getHostGroupIdsCount() > 0) {
hash = (37 * hash) + HOST_GROUP_IDS_FIELD_NUMBER;
hash = (53 * hash) + getHostGroupIdsList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.RestoreClusterRequest)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 6:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 6:
return internalGetMutableLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getHostSpecsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
backupId_ = "";
if (timeBuilder_ == null) {
time_ = null;
} else {
time_ = null;
timeBuilder_ = null;
}
timeInclusive_ = false;
name_ = "";
description_ = "";
internalGetMutableLabels().clear();
environment_ = 0;
if (configSpecBuilder_ == null) {
configSpec_ = null;
} else {
configSpec_ = null;
configSpecBuilder_ = null;
}
if (hostSpecsBuilder_ == null) {
hostSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
} else {
hostSpecsBuilder_.clear();
}
networkId_ = "";
folderId_ = "";
securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000004);
deletionProtection_ = false;
hostGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RestoreClusterRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest(this);
int from_bitField0_ = bitField0_;
result.backupId_ = backupId_;
if (timeBuilder_ == null) {
result.time_ = time_;
} else {
result.time_ = timeBuilder_.build();
}
result.timeInclusive_ = timeInclusive_;
result.name_ = name_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.environment_ = environment_;
if (configSpecBuilder_ == null) {
result.configSpec_ = configSpec_;
} else {
result.configSpec_ = configSpecBuilder_.build();
}
if (hostSpecsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
hostSpecs_ = java.util.Collections.unmodifiableList(hostSpecs_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.hostSpecs_ = hostSpecs_;
} else {
result.hostSpecs_ = hostSpecsBuilder_.build();
}
result.networkId_ = networkId_;
result.folderId_ = folderId_;
if (((bitField0_ & 0x00000004) != 0)) {
securityGroupIds_ = securityGroupIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000004);
}
result.securityGroupIds_ = securityGroupIds_;
result.deletionProtection_ = deletionProtection_;
if (((bitField0_ & 0x00000008) != 0)) {
hostGroupIds_ = hostGroupIds_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000008);
}
result.hostGroupIds_ = hostGroupIds_;
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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest.getDefaultInstance()) return this;
if (!other.getBackupId().isEmpty()) {
backupId_ = other.backupId_;
onChanged();
}
if (other.hasTime()) {
mergeTime(other.getTime());
}
if (other.getTimeInclusive() != false) {
setTimeInclusive(other.getTimeInclusive());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.environment_ != 0) {
setEnvironmentValue(other.getEnvironmentValue());
}
if (other.hasConfigSpec()) {
mergeConfigSpec(other.getConfigSpec());
}
if (hostSpecsBuilder_ == null) {
if (!other.hostSpecs_.isEmpty()) {
if (hostSpecs_.isEmpty()) {
hostSpecs_ = other.hostSpecs_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureHostSpecsIsMutable();
hostSpecs_.addAll(other.hostSpecs_);
}
onChanged();
}
} else {
if (!other.hostSpecs_.isEmpty()) {
if (hostSpecsBuilder_.isEmpty()) {
hostSpecsBuilder_.dispose();
hostSpecsBuilder_ = null;
hostSpecs_ = other.hostSpecs_;
bitField0_ = (bitField0_ & ~0x00000002);
hostSpecsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getHostSpecsFieldBuilder() : null;
} else {
hostSpecsBuilder_.addAllMessages(other.hostSpecs_);
}
}
}
if (!other.getNetworkId().isEmpty()) {
networkId_ = other.networkId_;
onChanged();
}
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (!other.securityGroupIds_.isEmpty()) {
if (securityGroupIds_.isEmpty()) {
securityGroupIds_ = other.securityGroupIds_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.addAll(other.securityGroupIds_);
}
onChanged();
}
if (other.getDeletionProtection() != false) {
setDeletionProtection(other.getDeletionProtection());
}
if (!other.hostGroupIds_.isEmpty()) {
if (hostGroupIds_.isEmpty()) {
hostGroupIds_ = other.hostGroupIds_;
bitField0_ = (bitField0_ & ~0x00000008);
} else {
ensureHostGroupIdsIsMutable();
hostGroupIds_.addAll(other.hostGroupIds_);
}
onChanged();
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RestoreClusterRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object backupId_ = "";
/**
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
*
* string backup_id = 1 [(.yandex.cloud.required) = true];
* @return The bytes for backupId.
*/
public com.google.protobuf.ByteString
getBackupIdBytes() {
java.lang.Object ref = backupId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
backupId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
*
* string backup_id = 1 [(.yandex.cloud.required) = true];
* @param value The backupId to set.
* @return This builder for chaining.
*/
public Builder setBackupId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
backupId_ = value;
onChanged();
return this;
}
/**
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
*
* string backup_id = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearBackupId() {
backupId_ = getDefaultInstance().getBackupId();
onChanged();
return this;
}
/**
*
* ID of the backup to create a cluster from.
* To get the backup ID, use a [ClusterService.ListBackups] request.
*
*
* string backup_id = 1 [(.yandex.cloud.required) = true];
* @param value The bytes for backupId to set.
* @return This builder for chaining.
*/
public Builder setBackupIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
backupId_ = value;
onChanged();
return this;
}
private com.google.protobuf.Timestamp time_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> timeBuilder_;
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
* @return Whether the time field is set.
*/
public boolean hasTime() {
return timeBuilder_ != null || time_ != null;
}
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
* @return The time.
*/
public com.google.protobuf.Timestamp getTime() {
if (timeBuilder_ == null) {
return time_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : time_;
} else {
return timeBuilder_.getMessage();
}
}
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
*
* .google.protobuf.Timestamp time = 2;
*/
public Builder setTime(com.google.protobuf.Timestamp value) {
if (timeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
time_ = value;
onChanged();
} else {
timeBuilder_.setMessage(value);
}
return this;
}
/**
*
* Timestamp of the moment to which the PostgreSQL cluster should be restored.
*
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*
*
* bool time_inclusive = 3;
* @param value The timeInclusive to set.
* @return This builder for chaining.
*/
public Builder setTimeInclusive(boolean value) {
timeInclusive_ = value;
onChanged();
return this;
}
/**
*
* Flag that indicates whether a database should be restored to the first backup point
* available just after the timestamp specified in the [time] field instead of just before.
* Possible values:
* * false (default) - the restore point refers to the first backup moment before [time].
* * true - the restore point refers to the first backup point after [time].
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @return The bytes for description.
*/
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
description_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Description of the new PostgreSQL cluster.
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @param value The description to set.
* @return This builder for chaining.
*/
public Builder setDescription(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
description_ = value;
onChanged();
return this;
}
/**
*
* Description of the new PostgreSQL cluster.
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Description of the new PostgreSQL cluster.
*
*
* string description = 5 [(.yandex.cloud.length) = "<=256"];
* @param value The bytes for description to set.
* @return This builder for chaining.
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
description_ = value;
onChanged();
return this;
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Custom labels for the PostgreSQL cluster as `` key:value `` pairs. Maximum 64 per resource.
* For example, "project": "mvp" or "source": "dictionary".
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for environment.
*/
@java.lang.Override public int getEnvironmentValue() {
return environment_;
}
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for environment to set.
* @return This builder for chaining.
*/
public Builder setEnvironmentValue(int value) {
environment_ = value;
onChanged();
return this;
}
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @return The environment.
*/
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment getEnvironment() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment result = yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.valueOf(environment_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment.UNRECOGNIZED : result;
}
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
*
* .yandex.cloud.mdb.postgresql.v1.Cluster.Environment environment = 7 [(.yandex.cloud.required) = true];
* @param value The environment to set.
* @return This builder for chaining.
*/
public Builder setEnvironment(yandex.cloud.api.mdb.postgresql.v1.ClusterOuterClass.Cluster.Environment value) {
if (value == null) {
throw new NullPointerException();
}
environment_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Deployment environment of the new PostgreSQL cluster.
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @return The bytes for folderId.
*/
public com.google.protobuf.ByteString
getFolderIdBytes() {
java.lang.Object ref = folderId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
folderId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @param value The folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
folderId_ = value;
onChanged();
return this;
}
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @return This builder for chaining.
*/
public Builder clearFolderId() {
folderId_ = getDefaultInstance().getFolderId();
onChanged();
return this;
}
/**
*
* ID of the folder to create the PostgreSQL cluster in.
*
*
* string folder_id = 11 [(.yandex.cloud.length) = "<=50"];
* @param value The bytes for folderId to set.
* @return This builder for chaining.
*/
public Builder setFolderIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
folderId_ = value;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList securityGroupIds_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureSecurityGroupIdsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
securityGroupIds_ = new com.google.protobuf.LazyStringArrayList(securityGroupIds_);
bitField0_ |= 0x00000004;
}
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return A list containing the securityGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getSecurityGroupIdsList() {
return securityGroupIds_.getUnmodifiableView();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @return The count of securityGroupIds.
*/
public int getSecurityGroupIdsCount() {
return securityGroupIds_.size();
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the element to return.
* @return The securityGroupIds at the given index.
*/
public java.lang.String getSecurityGroupIds(int index) {
return securityGroupIds_.get(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index of the value to return.
* @return The bytes of the securityGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getSecurityGroupIdsBytes(int index) {
return securityGroupIds_.getByteString(index);
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param index The index to set the value at.
* @param value The securityGroupIds to set.
* @return This builder for chaining.
*/
public Builder setSecurityGroupIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.set(index, value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param value The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addSecurityGroupIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSecurityGroupIdsIsMutable();
securityGroupIds_.add(value);
onChanged();
return this;
}
/**
*
* User security groups
*
*
* repeated string security_group_ids = 12;
* @param values The securityGroupIds to add.
* @return This builder for chaining.
*/
public Builder addAllSecurityGroupIds(
java.lang.Iterable values) {
ensureSecurityGroupIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, securityGroupIds_);
onChanged();
return this;
}
/**
*
*
* repeated string host_group_ids = 14;
* @return A list containing the hostGroupIds.
*/
public com.google.protobuf.ProtocolStringList
getHostGroupIdsList() {
return hostGroupIds_.getUnmodifiableView();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @return The count of hostGroupIds.
*/
public int getHostGroupIdsCount() {
return hostGroupIds_.size();
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the element to return.
* @return The hostGroupIds at the given index.
*/
public java.lang.String getHostGroupIds(int index) {
return hostGroupIds_.get(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index of the value to return.
* @return The bytes of the hostGroupIds at the given index.
*/
public com.google.protobuf.ByteString
getHostGroupIdsBytes(int index) {
return hostGroupIds_.getByteString(index);
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param index The index to set the value at.
* @param value The hostGroupIds to set.
* @return This builder for chaining.
*/
public Builder setHostGroupIds(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostGroupIdsIsMutable();
hostGroupIds_.set(index, value);
onChanged();
return this;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param value The hostGroupIds to add.
* @return This builder for chaining.
*/
public Builder addHostGroupIds(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureHostGroupIdsIsMutable();
hostGroupIds_.add(value);
onChanged();
return this;
}
/**
*
* Host groups hosting VMs of the cluster.
*
*
* repeated string host_group_ids = 14;
* @param values The hostGroupIds to add.
* @return This builder for chaining.
*/
public Builder addAllHostGroupIds(
java.lang.Iterable values) {
ensureHostGroupIdsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, hostGroupIds_);
onChanged();
return this;
}
/**
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for rescheduleType.
*/
int getRescheduleTypeValue();
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
* @return Whether the delayedUntil field is set.
*/
boolean hasDelayedUntil();
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
*/
com.google.protobuf.TimestampOrBuilder getDelayedUntilOrBuilder();
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest}
*/
public static final class RescheduleMaintenanceRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest)
RescheduleMaintenanceRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use RescheduleMaintenanceRequest.newBuilder() to construct.
private RescheduleMaintenanceRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private RescheduleMaintenanceRequest() {
clusterId_ = "";
rescheduleType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new RescheduleMaintenanceRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private RescheduleMaintenanceRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
clusterId_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
rescheduleType_ = rawValue;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (delayedUntil_ != null) {
subBuilder = delayedUntil_.toBuilder();
}
delayedUntil_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(delayedUntil_);
delayedUntil_ = subBuilder.buildPartial();
}
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RescheduleMaintenanceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RescheduleMaintenanceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType}
*/
public enum RescheduleType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* RESCHEDULE_TYPE_UNSPECIFIED = 0;
*/
RESCHEDULE_TYPE_UNSPECIFIED(0),
/**
*
* Start the maintenance operation immediately.
*
*
* IMMEDIATE = 1;
*/
IMMEDIATE(1),
/**
*
* Start the maintenance operation within the next available maintenance window.
*
* Start the maintenance operation at the specific time.
*
*
* SPECIFIC_TIME = 3;
*/
SPECIFIC_TIME(3),
UNRECOGNIZED(-1),
;
/**
* RESCHEDULE_TYPE_UNSPECIFIED = 0;
*/
public static final int RESCHEDULE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Start the maintenance operation immediately.
*
*
* IMMEDIATE = 1;
*/
public static final int IMMEDIATE_VALUE = 1;
/**
*
* Start the maintenance operation within the next available maintenance window.
*
*
* NEXT_AVAILABLE_WINDOW = 2;
*/
public static final int NEXT_AVAILABLE_WINDOW_VALUE = 2;
/**
*
* Start the maintenance operation at the specific time.
*
*
* SPECIFIC_TIME = 3;
*/
public static final int SPECIFIC_TIME_VALUE = 3;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static RescheduleType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static RescheduleType forNumber(int value) {
switch (value) {
case 0: return RESCHEDULE_TYPE_UNSPECIFIED;
case 1: return IMMEDIATE;
case 2: return NEXT_AVAILABLE_WINDOW;
case 3: return SPECIFIC_TIME;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
RescheduleType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public RescheduleType findValueByNumber(int number) {
return RescheduleType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.getDescriptor().getEnumTypes().get(0);
}
private static final RescheduleType[] VALUES = values();
public static RescheduleType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private RescheduleType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType)
}
public static final int CLUSTER_ID_FIELD_NUMBER = 1;
private volatile java.lang.Object clusterId_;
/**
*
* ID of the PostgreSQL cluster to reschedule the maintenance operation for.
*
* ID of the PostgreSQL cluster to reschedule the maintenance operation for.
*
*
* string cluster_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for clusterId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getClusterIdBytes() {
java.lang.Object ref = clusterId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
clusterId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESCHEDULE_TYPE_FIELD_NUMBER = 2;
private int rescheduleType_;
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for rescheduleType.
*/
@java.lang.Override public int getRescheduleTypeValue() {
return rescheduleType_;
}
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @return The rescheduleType.
*/
@java.lang.Override public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType getRescheduleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType result = yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.valueOf(rescheduleType_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.UNRECOGNIZED : result;
}
public static final int DELAYED_UNTIL_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp delayedUntil_;
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
* @return Whether the delayedUntil field is set.
*/
@java.lang.Override
public boolean hasDelayedUntil() {
return delayedUntil_ != null;
}
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getDelayedUntilOrBuilder() {
return getDelayedUntil();
}
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(clusterId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, clusterId_);
}
if (rescheduleType_ != yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.RESCHEDULE_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, rescheduleType_);
}
if (delayedUntil_ != null) {
output.writeMessage(3, getDelayedUntil());
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(clusterId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, clusterId_);
}
if (rescheduleType_ != yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.RESCHEDULE_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, rescheduleType_);
}
if (delayedUntil_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getDelayedUntil());
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest)) {
return super.equals(obj);
}
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest other = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest) obj;
if (!getClusterId()
.equals(other.getClusterId())) return false;
if (rescheduleType_ != other.rescheduleType_) return false;
if (hasDelayedUntil() != other.hasDelayedUntil()) return false;
if (hasDelayedUntil()) {
if (!getDelayedUntil()
.equals(other.getDelayedUntil())) return false;
}
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + CLUSTER_ID_FIELD_NUMBER;
hash = (53 * hash) + getClusterId().hashCode();
hash = (37 * hash) + RESCHEDULE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + rescheduleType_;
if (hasDelayedUntil()) {
hash = (37 * hash) + DELAYED_UNTIL_FIELD_NUMBER;
hash = (53 * hash) + getDelayedUntil().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest 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 yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest 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(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest 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;
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest)
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RescheduleMaintenanceRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RescheduleMaintenanceRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.Builder.class);
}
// Construct using yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
}
}
@java.lang.Override
public Builder clear() {
super.clear();
clusterId_ = "";
rescheduleType_ = 0;
if (delayedUntilBuilder_ == null) {
delayedUntil_ = null;
} else {
delayedUntil_ = null;
delayedUntilBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_RescheduleMaintenanceRequest_descriptor;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest getDefaultInstanceForType() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest build() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest buildPartial() {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest result = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest(this);
result.clusterId_ = clusterId_;
result.rescheduleType_ = rescheduleType_;
if (delayedUntilBuilder_ == null) {
result.delayedUntil_ = delayedUntil_;
} else {
result.delayedUntil_ = delayedUntilBuilder_.build();
}
onBuilt();
return result;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest) {
return mergeFrom((yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest other) {
if (other == yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.getDefaultInstance()) return this;
if (!other.getClusterId().isEmpty()) {
clusterId_ = other.clusterId_;
onChanged();
}
if (other.rescheduleType_ != 0) {
setRescheduleTypeValue(other.getRescheduleTypeValue());
}
if (other.hasDelayedUntil()) {
mergeDelayedUntil(other.getDelayedUntil());
}
this.mergeUnknownFields(other.unknownFields);
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object clusterId_ = "";
/**
*
* ID of the PostgreSQL cluster to reschedule the maintenance operation for.
*
* ID of the PostgreSQL cluster to reschedule the maintenance operation for.
*
*
* string cluster_id = 1 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @param value The bytes for clusterId to set.
* @return This builder for chaining.
*/
public Builder setClusterIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
clusterId_ = value;
onChanged();
return this;
}
private int rescheduleType_ = 0;
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for rescheduleType.
*/
@java.lang.Override public int getRescheduleTypeValue() {
return rescheduleType_;
}
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for rescheduleType to set.
* @return This builder for chaining.
*/
public Builder setRescheduleTypeValue(int value) {
rescheduleType_ = value;
onChanged();
return this;
}
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @return The rescheduleType.
*/
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType getRescheduleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType result = yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.valueOf(rescheduleType_);
return result == null ? yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType.UNRECOGNIZED : result;
}
/**
*
* The type of reschedule request.
*
*
* .yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest.RescheduleType reschedule_type = 2 [(.yandex.cloud.required) = true];
* @param value The rescheduleType to set.
* @return This builder for chaining.
*/
public Builder setRescheduleType(yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest.RescheduleType value) {
if (value == null) {
throw new NullPointerException();
}
rescheduleType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
* @return Whether the delayedUntil field is set.
*/
public boolean hasDelayedUntil() {
return delayedUntilBuilder_ != null || delayedUntil_ != null;
}
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
*/
public Builder setDelayedUntil(com.google.protobuf.Timestamp value) {
if (delayedUntilBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
delayedUntil_ = value;
onChanged();
} else {
delayedUntilBuilder_.setMessage(value);
}
return this;
}
/**
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
* The time until which this maintenance operation should be delayed. The value should be ahead of the first time when the maintenance operation has been scheduled for no more than two weeks. The value can also point to the past moment of time if [reschedule_type.IMMEDIATE] reschedule type is chosen.
*
*
* .google.protobuf.Timestamp delayed_until = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getDelayedUntilFieldBuilder() {
if (delayedUntilBuilder_ == null) {
delayedUntilBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getDelayedUntil(),
getParentForChildren(),
isClean());
delayedUntil_ = null;
}
return delayedUntilBuilder_;
}
@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:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceRequest)
private static final yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest();
}
public static yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public RescheduleMaintenanceRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new RescheduleMaintenanceRequest(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.RescheduleMaintenanceRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface RescheduleMaintenanceMetadataOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.mdb.postgresql.v1.RescheduleMaintenanceMetadata)
com.google.protobuf.MessageOrBuilder {
/**
*
* Columns from the logs table to request.
* If no columns are specified, entire log records are returned.
*
*
* repeated string column_filter = 2;
* @return A list containing the columnFilter.
*/
java.util.List
getColumnFilterList();
/**
*
* Columns from the logs table to request.
* If no columns are specified, entire log records are returned.
*
*
* repeated string column_filter = 2;
* @return The count of columnFilter.
*/
int getColumnFilterCount();
/**
*
* Columns from the logs table to request.
* If no columns are specified, entire log records are returned.
*
*
* repeated string column_filter = 2;
* @param index The index of the element to return.
* @return The columnFilter at the given index.
*/
java.lang.String getColumnFilter(int index);
/**
*
* Columns from the logs table to request.
* If no columns are specified, entire log records are returned.
*
*
* repeated string column_filter = 2;
* @param index The index of the value to return.
* @return The bytes of the columnFilter at the given index.
*/
com.google.protobuf.ByteString
getColumnFilterBytes(int index);
/**
*
* Type of the service to request logs about.
*
*
* .yandex.cloud.mdb.postgresql.v1.ListClusterLogsRequest.ServiceType service_type = 3;
* @return The enum numeric value on the wire for serviceType.
*/
int getServiceTypeValue();
/**
*
* The maximum number of results per page to return. If the number of available
* results is larger than [page_size], the service returns a [ListClusterLogsResponse.next_page_token]
* that can be used to get the next page of results in subsequent list requests.
*
*
* int64 page_size = 6 [(.yandex.cloud.value) = "<=1000"];
* @return The pageSize.
*/
long getPageSize();
/**
*
* Page token. To get the next page of results, set [page_token] to the
* [ListClusterLogsResponse.next_page_token] returned by the previous list request.
*
* Page token. To get the next page of results, set [page_token] to the
* [ListClusterLogsResponse.next_page_token] returned by the previous list request.
*
*
* string page_token = 7 [(.yandex.cloud.length) = "<=100"];
* @return The bytes for pageToken.
*/
com.google.protobuf.ByteString
getPageTokenBytes();
/**
*
* Always return `next_page_token`, even if current page is empty.
*
*
* bool always_next_page_token = 8;
* @return The alwaysNextPageToken.
*/
boolean getAlwaysNextPageToken();
}
/**
* Protobuf type {@code yandex.cloud.mdb.postgresql.v1.ListClusterLogsRequest}
*/
public static final class ListClusterLogsRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.mdb.postgresql.v1.ListClusterLogsRequest)
ListClusterLogsRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use ListClusterLogsRequest.newBuilder() to construct.
private ListClusterLogsRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ListClusterLogsRequest() {
clusterId_ = "";
columnFilter_ = com.google.protobuf.LazyStringArrayList.EMPTY;
serviceType_ = 0;
pageToken_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ListClusterLogsRequest();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ListClusterLogsRequest(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
java.lang.String s = input.readStringRequireUtf8();
clusterId_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
columnFilter_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
columnFilter_.add(s);
break;
}
case 24: {
int rawValue = input.readEnum();
serviceType_ = rawValue;
break;
}
case 34: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (fromTime_ != null) {
subBuilder = fromTime_.toBuilder();
}
fromTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fromTime_);
fromTime_ = subBuilder.buildPartial();
}
break;
}
case 42: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (toTime_ != null) {
subBuilder = toTime_.toBuilder();
}
toTime_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(toTime_);
toTime_ = subBuilder.buildPartial();
}
break;
}
case 48: {
pageSize_ = input.readInt64();
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
pageToken_ = s;
break;
}
case 64: {
alwaysNextPageToken_ = input.readBool();
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
columnFilter_ = columnFilter_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClusterLogsRequest_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.internal_static_yandex_cloud_mdb_postgresql_v1_ListClusterLogsRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClusterLogsRequest.class, yandex.cloud.api.mdb.postgresql.v1.ClusterServiceOuterClass.ListClusterLogsRequest.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.mdb.postgresql.v1.ListClusterLogsRequest.ServiceType}
*/
public enum ServiceType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* SERVICE_TYPE_UNSPECIFIED = 0;
*/
SERVICE_TYPE_UNSPECIFIED(0),
/**
*
* Logs of PostgreSQL activity.
*
*
* POSTGRESQL = 1;
*/
POSTGRESQL(1),
/**
*
* Logs of connection pooler activity.
*
*
* POOLER = 2;
*/
POOLER(2),
UNRECOGNIZED(-1),
;
/**
* SERVICE_TYPE_UNSPECIFIED = 0;
*/
public static final int SERVICE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Logs of PostgreSQL activity.
*
*
* POSTGRESQL = 1;
*/
public static final int POSTGRESQL_VALUE = 1;
/**
*
* Logs of connection pooler activity.
*
*
* POOLER = 2;
*/
public static final int POOLER_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ServiceType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static ServiceType forNumber(int value) {
switch (value) {
case 0: return SERVICE_TYPE_UNSPECIFIED;
case 1: return POSTGRESQL;
case 2: return POOLER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
ServiceType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap