yandex.cloud.api.compute.v1.HostGroupOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/compute/v1/host_group.proto
package yandex.cloud.api.compute.v1;
public final class HostGroupOuterClass {
private HostGroupOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.MaintenancePolicy}
*/
public enum MaintenancePolicy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MAINTENANCE_POLICY_UNSPECIFIED = 0;
*/
MAINTENANCE_POLICY_UNSPECIFIED(0),
/**
*
* Restart instances on the same host after maintenance event.
*
*
* RESTART = 1;
*/
RESTART(1),
/**
*
* Migrate instances to another host before maintenance event.
*
*
* MIGRATE = 2;
*/
MIGRATE(2),
UNRECOGNIZED(-1),
;
/**
* MAINTENANCE_POLICY_UNSPECIFIED = 0;
*/
public static final int MAINTENANCE_POLICY_UNSPECIFIED_VALUE = 0;
/**
*
* Restart instances on the same host after maintenance event.
*
*
* RESTART = 1;
*/
public static final int RESTART_VALUE = 1;
/**
*
* Migrate instances to another host before maintenance event.
*
*
* MIGRATE = 2;
*/
public static final int MIGRATE_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 MaintenancePolicy 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 MaintenancePolicy forNumber(int value) {
switch (value) {
case 0: return MAINTENANCE_POLICY_UNSPECIFIED;
case 1: return RESTART;
case 2: return MIGRATE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MaintenancePolicy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MaintenancePolicy findValueByNumber(int number) {
return MaintenancePolicy.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.compute.v1.HostGroupOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final MaintenancePolicy[] VALUES = values();
public static MaintenancePolicy 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 MaintenancePolicy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.MaintenancePolicy)
}
public interface HostGroupOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.HostGroup)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
java.lang.String getFolderId();
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
boolean hasCreatedAt();
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
com.google.protobuf.Timestamp getCreatedAt();
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder();
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Description of the group.
*
*
* string description = 5;
* @return The description.
*/
java.lang.String getDescription();
/**
*
* Description of the group.
*
*
* string description = 5;
* @return The bytes for description.
*/
com.google.protobuf.ByteString
getDescriptionBytes();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
int getLabelsCount();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
java.util.Map
getLabelsMap();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The zoneId.
*/
java.lang.String getZoneId();
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The bytes for zoneId.
*/
com.google.protobuf.ByteString
getZoneIdBytes();
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The status.
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status getStatus();
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The typeId.
*/
java.lang.String getTypeId();
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The bytes for typeId.
*/
com.google.protobuf.ByteString
getTypeIdBytes();
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The enum numeric value on the wire for maintenancePolicy.
*/
int getMaintenancePolicyValue();
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The maintenancePolicy.
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy getMaintenancePolicy();
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return Whether the scalePolicy field is set.
*/
boolean hasScalePolicy();
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return The scalePolicy.
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy getScalePolicy();
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder getScalePolicyOrBuilder();
}
/**
*
* Represents group of dedicated hosts
*
*
* Protobuf type {@code yandex.cloud.compute.v1.HostGroup}
*/
public static final class HostGroup extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.HostGroup)
HostGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use HostGroup.newBuilder() to construct.
private HostGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HostGroup() {
id_ = "";
folderId_ = "";
name_ = "";
description_ = "";
zoneId_ = "";
status_ = 0;
typeId_ = "";
maintenancePolicy_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HostGroup();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HostGroup(
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();
id_ = s;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 26: {
com.google.protobuf.Timestamp.Builder subBuilder = null;
if (createdAt_ != null) {
subBuilder = createdAt_.toBuilder();
}
createdAt_ = input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(createdAt_);
createdAt_ = subBuilder.buildPartial();
}
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 58: {
java.lang.String s = input.readStringRequireUtf8();
zoneId_ = s;
break;
}
case 64: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 74: {
java.lang.String s = input.readStringRequireUtf8();
typeId_ = s;
break;
}
case 80: {
int rawValue = input.readEnum();
maintenancePolicy_ = rawValue;
break;
}
case 90: {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder subBuilder = null;
if (scalePolicy_ != null) {
subBuilder = scalePolicy_.toBuilder();
}
scalePolicy_ = input.readMessage(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scalePolicy_);
scalePolicy_ = 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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.HostGroup.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STATUS_UNSPECIFIED = 0;
*/
STATUS_UNSPECIFIED(0),
/**
* CREATING = 1;
*/
CREATING(1),
/**
* READY = 2;
*/
READY(2),
/**
* UPDATING = 3;
*/
UPDATING(3),
/**
* DELETING = 4;
*/
DELETING(4),
UNRECOGNIZED(-1),
;
/**
* STATUS_UNSPECIFIED = 0;
*/
public static final int STATUS_UNSPECIFIED_VALUE = 0;
/**
* CREATING = 1;
*/
public static final int CREATING_VALUE = 1;
/**
* READY = 2;
*/
public static final int READY_VALUE = 2;
/**
* UPDATING = 3;
*/
public static final int UPDATING_VALUE = 3;
/**
* DELETING = 4;
*/
public static final int DELETING_VALUE = 4;
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 Status 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 Status forNumber(int value) {
switch (value) {
case 0: return STATUS_UNSPECIFIED;
case 1: return CREATING;
case 2: return READY;
case 3: return UPDATING;
case 4: return DELETING;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.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.compute.v1.HostGroupOuterClass.HostGroup.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.HostGroup.Status)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FOLDER_ID_FIELD_NUMBER = 2;
private volatile java.lang.Object folderId_;
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
@java.lang.Override
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
folderId_ = s;
return s;
}
}
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @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 CREATED_AT_FIELD_NUMBER = 3;
private com.google.protobuf.Timestamp createdAt_;
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
@java.lang.Override
public boolean hasCreatedAt() {
return createdAt_ != null;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
@java.lang.Override
public com.google.protobuf.Timestamp getCreatedAt() {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
@java.lang.Override
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
return getCreatedAt();
}
public static final int NAME_FIELD_NUMBER = 4;
private volatile java.lang.Object name_;
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The name.
*/
@java.lang.Override
public java.lang.String getName() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
}
}
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DESCRIPTION_FIELD_NUMBER = 5;
private volatile java.lang.Object description_;
/**
*
* Description of the group.
*
*
* string description = 5;
* @return The description.
*/
@java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
}
}
/**
*
* Description of the group.
*
*
* string description = 5;
* @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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_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();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@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 ZONE_ID_FIELD_NUMBER = 7;
private volatile java.lang.Object zoneId_;
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The zoneId.
*/
@java.lang.Override
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zoneId_ = s;
return s;
}
}
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The bytes for zoneId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 8;
private int status_;
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status result = yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.UNRECOGNIZED : result;
}
public static final int TYPE_ID_FIELD_NUMBER = 9;
private volatile java.lang.Object typeId_;
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The typeId.
*/
@java.lang.Override
public java.lang.String getTypeId() {
java.lang.Object ref = typeId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
typeId_ = s;
return s;
}
}
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The bytes for typeId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getTypeIdBytes() {
java.lang.Object ref = typeId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAINTENANCE_POLICY_FIELD_NUMBER = 10;
private int maintenancePolicy_;
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The enum numeric value on the wire for maintenancePolicy.
*/
@java.lang.Override public int getMaintenancePolicyValue() {
return maintenancePolicy_;
}
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The maintenancePolicy.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy getMaintenancePolicy() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy result = yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.valueOf(maintenancePolicy_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.UNRECOGNIZED : result;
}
public static final int SCALE_POLICY_FIELD_NUMBER = 11;
private yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy scalePolicy_;
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return Whether the scalePolicy field is set.
*/
@java.lang.Override
public boolean hasScalePolicy() {
return scalePolicy_ != null;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return The scalePolicy.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy getScalePolicy() {
return scalePolicy_ == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.getDefaultInstance() : scalePolicy_;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder getScalePolicyOrBuilder() {
return getScalePolicy();
}
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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, folderId_);
}
if (createdAt_ != null) {
output.writeMessage(3, getCreatedAt());
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, zoneId_);
}
if (status_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(8, status_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 9, typeId_);
}
if (maintenancePolicy_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.MAINTENANCE_POLICY_UNSPECIFIED.getNumber()) {
output.writeEnum(10, maintenancePolicy_);
}
if (scalePolicy_ != null) {
output.writeMessage(11, getScalePolicy());
}
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(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, folderId_);
}
if (createdAt_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getCreatedAt());
}
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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, zoneId_);
}
if (status_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(8, status_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(typeId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(9, typeId_);
}
if (maintenancePolicy_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.MAINTENANCE_POLICY_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(10, maintenancePolicy_);
}
if (scalePolicy_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, getScalePolicy());
}
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.compute.v1.HostGroupOuterClass.HostGroup)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup other = (yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup) obj;
if (!getId()
.equals(other.getId())) return false;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (hasCreatedAt() != other.hasCreatedAt()) return false;
if (hasCreatedAt()) {
if (!getCreatedAt()
.equals(other.getCreatedAt())) return false;
}
if (!getName()
.equals(other.getName())) return false;
if (!getDescription()
.equals(other.getDescription())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (!getZoneId()
.equals(other.getZoneId())) return false;
if (status_ != other.status_) return false;
if (!getTypeId()
.equals(other.getTypeId())) return false;
if (maintenancePolicy_ != other.maintenancePolicy_) return false;
if (hasScalePolicy() != other.hasScalePolicy()) return false;
if (hasScalePolicy()) {
if (!getScalePolicy()
.equals(other.getScalePolicy())) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
if (hasCreatedAt()) {
hash = (37 * hash) + CREATED_AT_FIELD_NUMBER;
hash = (53 * hash) + getCreatedAt().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) + ZONE_ID_FIELD_NUMBER;
hash = (53 * hash) + getZoneId().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
hash = (37 * hash) + TYPE_ID_FIELD_NUMBER;
hash = (53 * hash) + getTypeId().hashCode();
hash = (37 * hash) + MAINTENANCE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + maintenancePolicy_;
if (hasScalePolicy()) {
hash = (37 * hash) + SCALE_POLICY_FIELD_NUMBER;
hash = (53 * hash) + getScalePolicy().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup 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.compute.v1.HostGroupOuterClass.HostGroup parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup 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.compute.v1.HostGroupOuterClass.HostGroup parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup 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.compute.v1.HostGroupOuterClass.HostGroup parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup 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.compute.v1.HostGroupOuterClass.HostGroup parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup 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.compute.v1.HostGroupOuterClass.HostGroup 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;
}
/**
*
* Represents group of dedicated hosts
*
*
* Protobuf type {@code yandex.cloud.compute.v1.HostGroup}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.HostGroup)
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroupOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.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();
id_ = "";
folderId_ = "";
if (createdAtBuilder_ == null) {
createdAt_ = null;
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
name_ = "";
description_ = "";
internalGetMutableLabels().clear();
zoneId_ = "";
status_ = 0;
typeId_ = "";
maintenancePolicy_ = 0;
if (scalePolicyBuilder_ == null) {
scalePolicy_ = null;
} else {
scalePolicy_ = null;
scalePolicyBuilder_ = null;
}
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_HostGroup_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup build() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup buildPartial() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup result = new yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup(this);
int from_bitField0_ = bitField0_;
result.id_ = id_;
result.folderId_ = folderId_;
if (createdAtBuilder_ == null) {
result.createdAt_ = createdAt_;
} else {
result.createdAt_ = createdAtBuilder_.build();
}
result.name_ = name_;
result.description_ = description_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.zoneId_ = zoneId_;
result.status_ = status_;
result.typeId_ = typeId_;
result.maintenancePolicy_ = maintenancePolicy_;
if (scalePolicyBuilder_ == null) {
result.scalePolicy_ = scalePolicy_;
} else {
result.scalePolicy_ = scalePolicyBuilder_.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.compute.v1.HostGroupOuterClass.HostGroup) {
return mergeFrom((yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup other) {
if (other == yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (other.hasCreatedAt()) {
mergeCreatedAt(other.getCreatedAt());
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
onChanged();
}
if (!other.getDescription().isEmpty()) {
description_ = other.description_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (!other.getZoneId().isEmpty()) {
zoneId_ = other.zoneId_;
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (!other.getTypeId().isEmpty()) {
typeId_ = other.typeId_;
onChanged();
}
if (other.maintenancePolicy_ != 0) {
setMaintenancePolicyValue(other.getMaintenancePolicyValue());
}
if (other.hasScalePolicy()) {
mergeScalePolicy(other.getScalePolicy());
}
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.compute.v1.HostGroupOuterClass.HostGroup parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object id_ = "";
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the group.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the group.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the group.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the group.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private java.lang.Object folderId_ = "";
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @return The folderId.
*/
public java.lang.String getFolderId() {
java.lang.Object ref = folderId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
folderId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @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 that the group belongs to.
*
*
* string folder_id = 2;
* @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 that the group belongs to.
*
*
* string folder_id = 2;
* @return This builder for chaining.
*/
public Builder clearFolderId() {
folderId_ = getDefaultInstance().getFolderId();
onChanged();
return this;
}
/**
*
* ID of the folder that the group belongs to.
*
*
* string folder_id = 2;
* @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.Timestamp createdAt_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createdAtBuilder_;
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return Whether the createdAt field is set.
*/
public boolean hasCreatedAt() {
return createdAtBuilder_ != null || createdAt_ != null;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
* @return The createdAt.
*/
public com.google.protobuf.Timestamp getCreatedAt() {
if (createdAtBuilder_ == null) {
return createdAt_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
} else {
return createdAtBuilder_.getMessage();
}
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
createdAt_ = value;
onChanged();
} else {
createdAtBuilder_.setMessage(value);
}
return this;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder setCreatedAt(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (createdAtBuilder_ == null) {
createdAt_ = builderForValue.build();
onChanged();
} else {
createdAtBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder mergeCreatedAt(com.google.protobuf.Timestamp value) {
if (createdAtBuilder_ == null) {
if (createdAt_ != null) {
createdAt_ =
com.google.protobuf.Timestamp.newBuilder(createdAt_).mergeFrom(value).buildPartial();
} else {
createdAt_ = value;
}
onChanged();
} else {
createdAtBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public Builder clearCreatedAt() {
if (createdAtBuilder_ == null) {
createdAt_ = null;
onChanged();
} else {
createdAt_ = null;
createdAtBuilder_ = null;
}
return this;
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.Timestamp.Builder getCreatedAtBuilder() {
onChanged();
return getCreatedAtFieldBuilder().getBuilder();
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
public com.google.protobuf.TimestampOrBuilder getCreatedAtOrBuilder() {
if (createdAtBuilder_ != null) {
return createdAtBuilder_.getMessageOrBuilder();
} else {
return createdAt_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : createdAt_;
}
}
/**
*
* Creation timestamp in [RFC3339](https://www.ietf.org/rfc/rfc3339.txt) text format.
*
*
* .google.protobuf.Timestamp created_at = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
getCreatedAtFieldBuilder() {
if (createdAtBuilder_ == null) {
createdAtBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>(
getCreatedAt(),
getParentForChildren(),
isClean());
createdAt_ = null;
}
return createdAtBuilder_;
}
private java.lang.Object name_ = "";
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The name.
*/
public java.lang.String getName() {
java.lang.Object ref = name_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
name_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return The bytes for name.
*/
public com.google.protobuf.ByteString
getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @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;
}
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the group. The name is unique within the folder.
*
*
* string name = 4;
* @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 java.lang.Object description_ = "";
/**
*
* Description of the group.
*
*
* string description = 5;
* @return The description.
*/
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
description_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Description of the group.
*
*
* string description = 5;
* @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 group.
*
*
* string description = 5;
* @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 group.
*
*
* string description = 5;
* @return This builder for chaining.
*/
public Builder clearDescription() {
description_ = getDefaultInstance().getDescription();
onChanged();
return this;
}
/**
*
* Description of the group.
*
*
* string description = 5;
* @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();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
@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 Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 6;
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object zoneId_ = "";
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The zoneId.
*/
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zoneId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return The bytes for zoneId.
*/
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @param value The zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
zoneId_ = value;
onChanged();
return this;
}
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @return This builder for chaining.
*/
public Builder clearZoneId() {
zoneId_ = getDefaultInstance().getZoneId();
onChanged();
return this;
}
/**
*
* Availability zone where all dedicated hosts are allocated.
*
*
* string zone_id = 7;
* @param value The bytes for zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
zoneId_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status result = yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status.UNRECOGNIZED : result;
}
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Status of the group.
*
*
* .yandex.cloud.compute.v1.HostGroup.Status status = 8;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private java.lang.Object typeId_ = "";
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The typeId.
*/
public java.lang.String getTypeId() {
java.lang.Object ref = typeId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
typeId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return The bytes for typeId.
*/
public com.google.protobuf.ByteString
getTypeIdBytes() {
java.lang.Object ref = typeId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
typeId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @param value The typeId to set.
* @return This builder for chaining.
*/
public Builder setTypeId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
typeId_ = value;
onChanged();
return this;
}
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @return This builder for chaining.
*/
public Builder clearTypeId() {
typeId_ = getDefaultInstance().getTypeId();
onChanged();
return this;
}
/**
*
* ID of host type. Resources provided by each host of the group.
*
*
* string type_id = 9;
* @param value The bytes for typeId to set.
* @return This builder for chaining.
*/
public Builder setTypeIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
typeId_ = value;
onChanged();
return this;
}
private int maintenancePolicy_ = 0;
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The enum numeric value on the wire for maintenancePolicy.
*/
@java.lang.Override public int getMaintenancePolicyValue() {
return maintenancePolicy_;
}
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @param value The enum numeric value on the wire for maintenancePolicy to set.
* @return This builder for chaining.
*/
public Builder setMaintenancePolicyValue(int value) {
maintenancePolicy_ = value;
onChanged();
return this;
}
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return The maintenancePolicy.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy getMaintenancePolicy() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy result = yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.valueOf(maintenancePolicy_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy.UNRECOGNIZED : result;
}
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @param value The maintenancePolicy to set.
* @return This builder for chaining.
*/
public Builder setMaintenancePolicy(yandex.cloud.api.compute.v1.HostGroupOuterClass.MaintenancePolicy value) {
if (value == null) {
throw new NullPointerException();
}
maintenancePolicy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Behaviour on maintenance events.
*
*
* .yandex.cloud.compute.v1.MaintenancePolicy maintenance_policy = 10;
* @return This builder for chaining.
*/
public Builder clearMaintenancePolicy() {
maintenancePolicy_ = 0;
onChanged();
return this;
}
private yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy scalePolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder> scalePolicyBuilder_;
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return Whether the scalePolicy field is set.
*/
public boolean hasScalePolicy() {
return scalePolicyBuilder_ != null || scalePolicy_ != null;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
* @return The scalePolicy.
*/
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy getScalePolicy() {
if (scalePolicyBuilder_ == null) {
return scalePolicy_ == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.getDefaultInstance() : scalePolicy_;
} else {
return scalePolicyBuilder_.getMessage();
}
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public Builder setScalePolicy(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy value) {
if (scalePolicyBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scalePolicy_ = value;
onChanged();
} else {
scalePolicyBuilder_.setMessage(value);
}
return this;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public Builder setScalePolicy(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder builderForValue) {
if (scalePolicyBuilder_ == null) {
scalePolicy_ = builderForValue.build();
onChanged();
} else {
scalePolicyBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public Builder mergeScalePolicy(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy value) {
if (scalePolicyBuilder_ == null) {
if (scalePolicy_ != null) {
scalePolicy_ =
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.newBuilder(scalePolicy_).mergeFrom(value).buildPartial();
} else {
scalePolicy_ = value;
}
onChanged();
} else {
scalePolicyBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public Builder clearScalePolicy() {
if (scalePolicyBuilder_ == null) {
scalePolicy_ = null;
onChanged();
} else {
scalePolicy_ = null;
scalePolicyBuilder_ = null;
}
return this;
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder getScalePolicyBuilder() {
onChanged();
return getScalePolicyFieldBuilder().getBuilder();
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder getScalePolicyOrBuilder() {
if (scalePolicyBuilder_ != null) {
return scalePolicyBuilder_.getMessageOrBuilder();
} else {
return scalePolicy_ == null ?
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.getDefaultInstance() : scalePolicy_;
}
}
/**
*
* Scale policy. Only fixed number of hosts are supported at this moment.
*
*
* .yandex.cloud.compute.v1.ScalePolicy scale_policy = 11;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder>
getScalePolicyFieldBuilder() {
if (scalePolicyBuilder_ == null) {
scalePolicyBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder>(
getScalePolicy(),
getParentForChildren(),
isClean());
scalePolicy_ = null;
}
return scalePolicyBuilder_;
}
@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.compute.v1.HostGroup)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.HostGroup)
private static final yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup();
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.HostGroup getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public HostGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new HostGroup(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.compute.v1.HostGroupOuterClass.HostGroup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface HostOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.Host)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The status.
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status getStatus();
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The serverId.
*/
java.lang.String getServerId();
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The bytes for serverId.
*/
com.google.protobuf.ByteString
getServerIdBytes();
}
/**
*
* Represents a dedicated host
*
*
* Protobuf type {@code yandex.cloud.compute.v1.Host}
*/
public static final class Host extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.Host)
HostOrBuilder {
private static final long serialVersionUID = 0L;
// Use Host.newBuilder() to construct.
private Host(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Host() {
id_ = "";
status_ = 0;
serverId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Host();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Host(
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();
id_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
serverId_ = 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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_Host_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_Host_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.Host.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STATUS_UNSPECIFIED = 0;
*/
STATUS_UNSPECIFIED(0),
/**
* UP = 1;
*/
UP(1),
/**
* DOWN = 2;
*/
DOWN(2),
UNRECOGNIZED(-1),
;
/**
* STATUS_UNSPECIFIED = 0;
*/
public static final int STATUS_UNSPECIFIED_VALUE = 0;
/**
* UP = 1;
*/
public static final int UP_VALUE = 1;
/**
* DOWN = 2;
*/
public static final int DOWN_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 Status 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 Status forNumber(int value) {
switch (value) {
case 0: return STATUS_UNSPECIFIED;
case 1: return UP;
case 2: return DOWN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Status> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Status findValueByNumber(int number) {
return Status.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.compute.v1.HostGroupOuterClass.Host.getDescriptor().getEnumTypes().get(0);
}
private static final Status[] VALUES = values();
public static Status 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 Status(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.Host.Status)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The bytes for id.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 2;
private int status_;
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status result = yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.UNRECOGNIZED : result;
}
public static final int SERVER_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object serverId_;
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The serverId.
*/
@java.lang.Override
public java.lang.String getServerId() {
java.lang.Object ref = serverId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serverId_ = s;
return s;
}
}
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The bytes for serverId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServerIdBytes() {
java.lang.Object ref = serverId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serverId_ = 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(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, id_);
}
if (status_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.STATUS_UNSPECIFIED.getNumber()) {
output.writeEnum(2, status_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, serverId_);
}
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(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, id_);
}
if (status_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.STATUS_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, status_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serverId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, serverId_);
}
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.compute.v1.HostGroupOuterClass.Host)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host other = (yandex.cloud.api.compute.v1.HostGroupOuterClass.Host) obj;
if (!getId()
.equals(other.getId())) return false;
if (status_ != other.status_) return false;
if (!getServerId()
.equals(other.getServerId())) 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) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (37 * hash) + STATUS_FIELD_NUMBER;
hash = (53 * hash) + status_;
hash = (37 * hash) + SERVER_ID_FIELD_NUMBER;
hash = (53 * hash) + getServerId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host 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.compute.v1.HostGroupOuterClass.Host parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host 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.compute.v1.HostGroupOuterClass.Host parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host 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.compute.v1.HostGroupOuterClass.Host parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host 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.compute.v1.HostGroupOuterClass.Host parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host 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.compute.v1.HostGroupOuterClass.Host 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;
}
/**
*
* Represents a dedicated host
*
*
* Protobuf type {@code yandex.cloud.compute.v1.Host}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.Host)
yandex.cloud.api.compute.v1.HostGroupOuterClass.HostOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_Host_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_Host_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.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();
id_ = "";
status_ = 0;
serverId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_Host_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.Host getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.Host build() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.Host buildPartial() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host result = new yandex.cloud.api.compute.v1.HostGroupOuterClass.Host(this);
result.id_ = id_;
result.status_ = status_;
result.serverId_ = serverId_;
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.compute.v1.HostGroupOuterClass.Host) {
return mergeFrom((yandex.cloud.api.compute.v1.HostGroupOuterClass.Host)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.HostGroupOuterClass.Host other) {
if (other == yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.getDefaultInstance()) return this;
if (!other.getId().isEmpty()) {
id_ = other.id_;
onChanged();
}
if (other.status_ != 0) {
setStatusValue(other.getStatusValue());
}
if (!other.getServerId().isEmpty()) {
serverId_ = other.serverId_;
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.compute.v1.HostGroupOuterClass.Host parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.HostGroupOuterClass.Host) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private java.lang.Object id_ = "";
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the host.
*
*
* string id = 1;
* @return The bytes for id.
*/
public com.google.protobuf.ByteString
getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the host.
*
*
* string id = 1;
* @param value The id to set.
* @return This builder for chaining.
*/
public Builder setId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
id_ = value;
onChanged();
return this;
}
/**
*
* ID of the host.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the host.
*
*
* string id = 1;
* @param value The bytes for id to set.
* @return This builder for chaining.
*/
public Builder setIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
id_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @param value The enum numeric value on the wire for status to set.
* @return This builder for chaining.
*/
public Builder setStatusValue(int value) {
status_ = value;
onChanged();
return this;
}
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status result = yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status.UNRECOGNIZED : result;
}
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.compute.v1.HostGroupOuterClass.Host.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Current status of the host. New instances are unable to start on host in DOWN status.
*
*
* .yandex.cloud.compute.v1.Host.Status status = 2;
* @return This builder for chaining.
*/
public Builder clearStatus() {
status_ = 0;
onChanged();
return this;
}
private java.lang.Object serverId_ = "";
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The serverId.
*/
public java.lang.String getServerId() {
java.lang.Object ref = serverId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serverId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return The bytes for serverId.
*/
public com.google.protobuf.ByteString
getServerIdBytes() {
java.lang.Object ref = serverId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serverId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @param value The serverId to set.
* @return This builder for chaining.
*/
public Builder setServerId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serverId_ = value;
onChanged();
return this;
}
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @return This builder for chaining.
*/
public Builder clearServerId() {
serverId_ = getDefaultInstance().getServerId();
onChanged();
return this;
}
/**
*
* ID of the physical server that the host belongs to.
*
*
* string server_id = 3;
* @param value The bytes for serverId to set.
* @return This builder for chaining.
*/
public Builder setServerIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serverId_ = 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.compute.v1.Host)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.Host)
private static final yandex.cloud.api.compute.v1.HostGroupOuterClass.Host DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.HostGroupOuterClass.Host();
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.Host getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Host parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Host(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.compute.v1.HostGroupOuterClass.Host getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ScalePolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.ScalePolicy)
com.google.protobuf.MessageOrBuilder {
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return Whether the fixedScale field is set.
*/
boolean hasFixedScale();
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return The fixedScale.
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getFixedScale();
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder getFixedScaleOrBuilder();
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.ScaleTypeCase getScaleTypeCase();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.ScalePolicy}
*/
public static final class ScalePolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.ScalePolicy)
ScalePolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use ScalePolicy.newBuilder() to construct.
private ScalePolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ScalePolicy() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ScalePolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ScalePolicy(
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: {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder subBuilder = null;
if (scaleTypeCase_ == 1) {
subBuilder = ((yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_).toBuilder();
}
scaleType_ =
input.readMessage(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom((yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_);
scaleType_ = subBuilder.buildPartial();
}
scaleTypeCase_ = 1;
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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder.class);
}
public interface FixedScaleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.ScalePolicy.FixedScale)
com.google.protobuf.MessageOrBuilder {
/**
* int64 size = 1;
* @return The size.
*/
long getSize();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.ScalePolicy.FixedScale}
*/
public static final class FixedScale extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.ScalePolicy.FixedScale)
FixedScaleOrBuilder {
private static final long serialVersionUID = 0L;
// Use FixedScale.newBuilder() to construct.
private FixedScale(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FixedScale() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FixedScale();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private FixedScale(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 8: {
size_ = input.readInt64();
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.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder.class);
}
public static final int SIZE_FIELD_NUMBER = 1;
private long size_;
/**
* int64 size = 1;
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
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 (size_ != 0L) {
output.writeInt64(1, size_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (size_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale other = (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) obj;
if (getSize()
!= other.getSize()) 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) + SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSize());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale 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.compute.v1.ScalePolicy.FixedScale}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.ScalePolicy.FixedScale)
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.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();
size_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale build() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale buildPartial() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale result = new yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale(this);
result.size_ = size_;
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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) {
return mergeFrom((yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale other) {
if (other == yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance()) return this;
if (other.getSize() != 0L) {
setSize(other.getSize());
}
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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long size_ ;
/**
* int64 size = 1;
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
/**
* int64 size = 1;
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
* int64 size = 1;
* @return This builder for chaining.
*/
public Builder clearSize() {
size_ = 0L;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:yandex.cloud.compute.v1.ScalePolicy.FixedScale)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.ScalePolicy.FixedScale)
private static final yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale();
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FixedScale parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new FixedScale(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.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int scaleTypeCase_ = 0;
private java.lang.Object scaleType_;
public enum ScaleTypeCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
FIXED_SCALE(1),
SCALETYPE_NOT_SET(0);
private final int value;
private ScaleTypeCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static ScaleTypeCase valueOf(int value) {
return forNumber(value);
}
public static ScaleTypeCase forNumber(int value) {
switch (value) {
case 1: return FIXED_SCALE;
case 0: return SCALETYPE_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public ScaleTypeCase
getScaleTypeCase() {
return ScaleTypeCase.forNumber(
scaleTypeCase_);
}
public static final int FIXED_SCALE_FIELD_NUMBER = 1;
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return Whether the fixedScale field is set.
*/
@java.lang.Override
public boolean hasFixedScale() {
return scaleTypeCase_ == 1;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return The fixedScale.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getFixedScale() {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder getFixedScaleOrBuilder() {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (scaleTypeCase_ == 1) {
output.writeMessage(1, (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (scaleTypeCase_ == 1) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_);
}
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.compute.v1.HostGroupOuterClass.ScalePolicy)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy other = (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy) obj;
if (!getScaleTypeCase().equals(other.getScaleTypeCase())) return false;
switch (scaleTypeCase_) {
case 1:
if (!getFixedScale()
.equals(other.getFixedScale())) return false;
break;
case 0:
default:
}
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();
switch (scaleTypeCase_) {
case 1:
hash = (37 * hash) + FIXED_SCALE_FIELD_NUMBER;
hash = (53 * hash) + getFixedScale().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.HostGroupOuterClass.ScalePolicy parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.HostGroupOuterClass.ScalePolicy parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.HostGroupOuterClass.ScalePolicy 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.compute.v1.ScalePolicy}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.ScalePolicy)
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicyOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.class, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.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();
scaleTypeCase_ = 0;
scaleType_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy build() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy buildPartial() {
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy result = new yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy(this);
if (scaleTypeCase_ == 1) {
if (fixedScaleBuilder_ == null) {
result.scaleType_ = scaleType_;
} else {
result.scaleType_ = fixedScaleBuilder_.build();
}
}
result.scaleTypeCase_ = scaleTypeCase_;
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.compute.v1.HostGroupOuterClass.ScalePolicy) {
return mergeFrom((yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy other) {
if (other == yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.getDefaultInstance()) return this;
switch (other.getScaleTypeCase()) {
case FIXED_SCALE: {
mergeFixedScale(other.getFixedScale());
break;
}
case SCALETYPE_NOT_SET: {
break;
}
}
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.compute.v1.HostGroupOuterClass.ScalePolicy parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int scaleTypeCase_ = 0;
private java.lang.Object scaleType_;
public ScaleTypeCase
getScaleTypeCase() {
return ScaleTypeCase.forNumber(
scaleTypeCase_);
}
public Builder clearScaleType() {
scaleTypeCase_ = 0;
scaleType_ = null;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder> fixedScaleBuilder_;
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return Whether the fixedScale field is set.
*/
@java.lang.Override
public boolean hasFixedScale() {
return scaleTypeCase_ == 1;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
* @return The fixedScale.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale getFixedScale() {
if (fixedScaleBuilder_ == null) {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
} else {
if (scaleTypeCase_ == 1) {
return fixedScaleBuilder_.getMessage();
}
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
public Builder setFixedScale(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale value) {
if (fixedScaleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
scaleType_ = value;
onChanged();
} else {
fixedScaleBuilder_.setMessage(value);
}
scaleTypeCase_ = 1;
return this;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
public Builder setFixedScale(
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder builderForValue) {
if (fixedScaleBuilder_ == null) {
scaleType_ = builderForValue.build();
onChanged();
} else {
fixedScaleBuilder_.setMessage(builderForValue.build());
}
scaleTypeCase_ = 1;
return this;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
public Builder mergeFixedScale(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale value) {
if (fixedScaleBuilder_ == null) {
if (scaleTypeCase_ == 1 &&
scaleType_ != yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance()) {
scaleType_ = yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.newBuilder((yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_)
.mergeFrom(value).buildPartial();
} else {
scaleType_ = value;
}
onChanged();
} else {
if (scaleTypeCase_ == 1) {
fixedScaleBuilder_.mergeFrom(value);
}
fixedScaleBuilder_.setMessage(value);
}
scaleTypeCase_ = 1;
return this;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
public Builder clearFixedScale() {
if (fixedScaleBuilder_ == null) {
if (scaleTypeCase_ == 1) {
scaleTypeCase_ = 0;
scaleType_ = null;
onChanged();
}
} else {
if (scaleTypeCase_ == 1) {
scaleTypeCase_ = 0;
scaleType_ = null;
}
fixedScaleBuilder_.clear();
}
return this;
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder getFixedScaleBuilder() {
return getFixedScaleFieldBuilder().getBuilder();
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder getFixedScaleOrBuilder() {
if ((scaleTypeCase_ == 1) && (fixedScaleBuilder_ != null)) {
return fixedScaleBuilder_.getMessageOrBuilder();
} else {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
}
/**
* .yandex.cloud.compute.v1.ScalePolicy.FixedScale fixed_scale = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder>
getFixedScaleFieldBuilder() {
if (fixedScaleBuilder_ == null) {
if (!(scaleTypeCase_ == 1)) {
scaleType_ = yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
fixedScaleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale.Builder, yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScaleOrBuilder>(
(yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy.FixedScale) scaleType_,
getParentForChildren(),
isClean());
scaleType_ = null;
}
scaleTypeCase_ = 1;
onChanged();;
return fixedScaleBuilder_;
}
@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.compute.v1.ScalePolicy)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.ScalePolicy)
private static final yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy();
}
public static yandex.cloud.api.compute.v1.HostGroupOuterClass.ScalePolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ScalePolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ScalePolicy(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.compute.v1.HostGroupOuterClass.ScalePolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_HostGroup_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_HostGroup_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_HostGroup_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_HostGroup_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_Host_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_Host_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_ScalePolicy_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\n(yandex/cloud/compute/v1/host_group.pro" +
"to\022\027yandex.cloud.compute.v1\032\037google/prot" +
"obuf/timestamp.proto\"\244\004\n\tHostGroup\022\n\n\002id" +
"\030\001 \001(\t\022\021\n\tfolder_id\030\002 \001(\t\022.\n\ncreated_at\030" +
"\003 \001(\0132\032.google.protobuf.Timestamp\022\014\n\004nam" +
"e\030\004 \001(\t\022\023\n\013description\030\005 \001(\t\022>\n\006labels\030\006" +
" \003(\0132..yandex.cloud.compute.v1.HostGroup" +
".LabelsEntry\022\017\n\007zone_id\030\007 \001(\t\0229\n\006status\030" +
"\010 \001(\0162).yandex.cloud.compute.v1.HostGrou" +
"p.Status\022\017\n\007type_id\030\t \001(\t\022F\n\022maintenance" +
"_policy\030\n \001(\0162*.yandex.cloud.compute.v1." +
"MaintenancePolicy\022:\n\014scale_policy\030\013 \001(\0132" +
"$.yandex.cloud.compute.v1.ScalePolicy\032-\n" +
"\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 \001(\t" +
":\0028\001\"U\n\006Status\022\026\n\022STATUS_UNSPECIFIED\020\000\022\014" +
"\n\010CREATING\020\001\022\t\n\005READY\020\002\022\014\n\010UPDATING\020\003\022\014\n" +
"\010DELETING\020\004\"\217\001\n\004Host\022\n\n\002id\030\001 \001(\t\0224\n\006stat" +
"us\030\002 \001(\0162$.yandex.cloud.compute.v1.Host." +
"Status\022\021\n\tserver_id\030\003 \001(\t\"2\n\006Status\022\026\n\022S" +
"TATUS_UNSPECIFIED\020\000\022\006\n\002UP\020\001\022\010\n\004DOWN\020\002\"\177\n" +
"\013ScalePolicy\022F\n\013fixed_scale\030\001 \001(\0132/.yand" +
"ex.cloud.compute.v1.ScalePolicy.FixedSca" +
"leH\000\032\032\n\nFixedScale\022\014\n\004size\030\001 \001(\003B\014\n\nscal" +
"e_type*Q\n\021MaintenancePolicy\022\"\n\036MAINTENAN" +
"CE_POLICY_UNSPECIFIED\020\000\022\013\n\007RESTART\020\001\022\013\n\007" +
"MIGRATE\020\002Bb\n\033yandex.cloud.api.compute.v1" +
"ZCgithub.com/yandex-cloud/go-genproto/ya" +
"ndex/cloud/compute/v1;computeb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
com.google.protobuf.TimestampProto.getDescriptor(),
});
internal_static_yandex_cloud_compute_v1_HostGroup_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_compute_v1_HostGroup_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_HostGroup_descriptor,
new java.lang.String[] { "Id", "FolderId", "CreatedAt", "Name", "Description", "Labels", "ZoneId", "Status", "TypeId", "MaintenancePolicy", "ScalePolicy", });
internal_static_yandex_cloud_compute_v1_HostGroup_LabelsEntry_descriptor =
internal_static_yandex_cloud_compute_v1_HostGroup_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_compute_v1_HostGroup_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_HostGroup_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_yandex_cloud_compute_v1_Host_descriptor =
getDescriptor().getMessageTypes().get(1);
internal_static_yandex_cloud_compute_v1_Host_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_Host_descriptor,
new java.lang.String[] { "Id", "Status", "ServerId", });
internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor =
getDescriptor().getMessageTypes().get(2);
internal_static_yandex_cloud_compute_v1_ScalePolicy_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor,
new java.lang.String[] { "FixedScale", "ScaleType", });
internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor =
internal_static_yandex_cloud_compute_v1_ScalePolicy_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_compute_v1_ScalePolicy_FixedScale_descriptor,
new java.lang.String[] { "Size", });
com.google.protobuf.TimestampProto.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy