Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/compute/v1/instancegroup/instance_group.proto
package yandex.cloud.api.compute.v1.instancegroup;
public final class InstanceGroupOuterClass {
private InstanceGroupOuterClass() {}
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.instancegroup.IpVersion}
*/
public enum IpVersion
implements com.google.protobuf.ProtocolMessageEnum {
/**
* IP_VERSION_UNSPECIFIED = 0;
*/
IP_VERSION_UNSPECIFIED(0),
/**
*
* IPv4 address, for example 192.168.0.0.
*
*
* IPV4 = 1;
*/
IPV4(1),
/**
*
* IPv6 address, not available yet.
*
*
* IPV6 = 2;
*/
IPV6(2),
UNRECOGNIZED(-1),
;
/**
* IP_VERSION_UNSPECIFIED = 0;
*/
public static final int IP_VERSION_UNSPECIFIED_VALUE = 0;
/**
*
* IPv4 address, for example 192.168.0.0.
*
*
* IPV4 = 1;
*/
public static final int IPV4_VALUE = 1;
/**
*
* IPv6 address, not available yet.
*
*
* IPV6 = 2;
*/
public static final int IPV6_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 IpVersion 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 IpVersion forNumber(int value) {
switch (value) {
case 0: return IP_VERSION_UNSPECIFIED;
case 1: return IPV4;
case 2: return IPV6;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
IpVersion> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public IpVersion findValueByNumber(int number) {
return IpVersion.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.instancegroup.InstanceGroupOuterClass.getDescriptor().getEnumTypes().get(0);
}
private static final IpVersion[] VALUES = values();
public static IpVersion 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 IpVersion(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.IpVersion)
}
public interface InstanceGroupOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.InstanceGroup)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the instance group.
*
*
* string id = 1;
* @return The id.
*/
java.lang.String getId();
/**
*
* ID of the instance group.
*
*
* string id = 1;
* @return The bytes for id.
*/
com.google.protobuf.ByteString
getIdBytes();
/**
*
* ID of the folder that the instance group belongs to.
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceTemplate instance_template = 7;
* @return Whether the instanceTemplate field is set.
*/
boolean hasInstanceTemplate();
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @return The bytes for serviceAccountId.
*/
com.google.protobuf.ByteString
getServiceAccountIdBytes();
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @return The enum numeric value on the wire for status.
*/
int getStatusValue();
/**
*
* Flag prohibiting deletion of the instance group.
* Allowed values:</br>- `false`: The instance group can be deleted.</br>- `true`: The instance group cannot be deleted.
* The default is `false`.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
* @return Whether the applicationLoadBalancerState field is set.
*/
boolean hasApplicationLoadBalancerState();
/**
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
*/
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerStateOrBuilder getApplicationLoadBalancerStateOrBuilder();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.InstanceGroup}
*/
public static final class InstanceGroup extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.InstanceGroup)
InstanceGroupOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstanceGroup.newBuilder() to construct.
private InstanceGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InstanceGroup() {
id_ = "";
folderId_ = "";
name_ = "";
description_ = "";
serviceAccountId_ = "";
status_ = 0;
variables_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new InstanceGroup();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InstanceGroup(
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: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate.Builder subBuilder = null;
if (instanceTemplate_ != null) {
subBuilder = instanceTemplate_.toBuilder();
}
instanceTemplate_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(instanceTemplate_);
instanceTemplate_ = subBuilder.buildPartial();
}
break;
}
case 66: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.Builder subBuilder = null;
if (scalePolicy_ != null) {
subBuilder = scalePolicy_.toBuilder();
}
scalePolicy_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(scalePolicy_);
scalePolicy_ = subBuilder.buildPartial();
}
break;
}
case 74: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Builder subBuilder = null;
if (deployPolicy_ != null) {
subBuilder = deployPolicy_.toBuilder();
}
deployPolicy_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(deployPolicy_);
deployPolicy_ = subBuilder.buildPartial();
}
break;
}
case 82: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AllocationPolicy.Builder subBuilder = null;
if (allocationPolicy_ != null) {
subBuilder = allocationPolicy_.toBuilder();
}
allocationPolicy_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AllocationPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(allocationPolicy_);
allocationPolicy_ = subBuilder.buildPartial();
}
break;
}
case 90: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerState.Builder subBuilder = null;
if (loadBalancerState_ != null) {
subBuilder = loadBalancerState_.toBuilder();
}
loadBalancerState_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerState.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loadBalancerState_);
loadBalancerState_ = subBuilder.buildPartial();
}
break;
}
case 98: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Builder subBuilder = null;
if (managedInstancesState_ != null) {
subBuilder = managedInstancesState_.toBuilder();
}
managedInstancesState_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(managedInstancesState_);
managedInstancesState_ = subBuilder.buildPartial();
}
break;
}
case 114: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerSpec.Builder subBuilder = null;
if (loadBalancerSpec_ != null) {
subBuilder = loadBalancerSpec_.toBuilder();
}
loadBalancerSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(loadBalancerSpec_);
loadBalancerSpec_ = subBuilder.buildPartial();
}
break;
}
case 122: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.HealthChecksSpec.Builder subBuilder = null;
if (healthChecksSpec_ != null) {
subBuilder = healthChecksSpec_.toBuilder();
}
healthChecksSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.HealthChecksSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(healthChecksSpec_);
healthChecksSpec_ = subBuilder.buildPartial();
}
break;
}
case 130: {
java.lang.String s = input.readStringRequireUtf8();
serviceAccountId_ = s;
break;
}
case 136: {
int rawValue = input.readEnum();
status_ = rawValue;
break;
}
case 146: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
variables_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000002;
}
variables_.add(
input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.Variable.parser(), extensionRegistry));
break;
}
case 152: {
deletionProtection_ = input.readBool();
break;
}
case 162: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerSpec.Builder subBuilder = null;
if (applicationLoadBalancerSpec_ != null) {
subBuilder = applicationLoadBalancerSpec_.toBuilder();
}
applicationLoadBalancerSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(applicationLoadBalancerSpec_);
applicationLoadBalancerSpec_ = subBuilder.buildPartial();
}
break;
}
case 170: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState.Builder subBuilder = null;
if (applicationLoadBalancerState_ != null) {
subBuilder = applicationLoadBalancerState_.toBuilder();
}
applicationLoadBalancerState_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(applicationLoadBalancerState_);
applicationLoadBalancerState_ = 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 {
if (((mutable_bitField0_ & 0x00000002) != 0)) {
variables_ = java.util.Collections.unmodifiableList(variables_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_InstanceGroup_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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_InstanceGroup_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status}
*/
public enum Status
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STATUS_UNSPECIFIED = 0;
*/
STATUS_UNSPECIFIED(0),
/**
*
* Instance group is being started and will become active soon.
*
*
* STARTING = 1;
*/
STARTING(1),
/**
*
* Instance group is active.
* In this state the group manages its instances and monitors their health,
* creating, deleting, stopping, updating and starting instances as needed.
* To stop the instance group, call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.Stop].
* To pause the processes in the instance group, i.e. scaling, checking instances' health,
* auto-healing and updating them, without stopping the instances,
* call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.PauseProcesses].
*
*
* ACTIVE = 2;
*/
ACTIVE(2),
/**
*
* Instance group is being stopped.
* Group's instances stop receiving traffic from the load balancer (if any) and are then stopped.
*
*
* STOPPING = 3;
*/
STOPPING(3),
/**
*
* Instance group is stopped.
* In this state the group cannot be updated and does not react to any changes made to its instances.
* To start the instance group, call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.Start].
*
*
* STOPPED = 4;
*/
STOPPED(4),
/**
*
* Instance group is being deleted.
*
*
* DELETING = 5;
*/
DELETING(5),
/**
*
* Instance group is paused.
* In this state all the processes regarding the group management, i.e. scaling, checking instances' health,
* auto-healing and updating them, are paused. The instances that were running prior to pausing the group, however,
* may still be running.
* To resume the processes in the instance group,
* call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.ResumeProcesses].
* The group status will change to `ACTIVE`.
*
*
* PAUSED = 6;
*/
PAUSED(6),
UNRECOGNIZED(-1),
;
/**
* STATUS_UNSPECIFIED = 0;
*/
public static final int STATUS_UNSPECIFIED_VALUE = 0;
/**
*
* Instance group is being started and will become active soon.
*
*
* STARTING = 1;
*/
public static final int STARTING_VALUE = 1;
/**
*
* Instance group is active.
* In this state the group manages its instances and monitors their health,
* creating, deleting, stopping, updating and starting instances as needed.
* To stop the instance group, call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.Stop].
* To pause the processes in the instance group, i.e. scaling, checking instances' health,
* auto-healing and updating them, without stopping the instances,
* call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.PauseProcesses].
*
*
* ACTIVE = 2;
*/
public static final int ACTIVE_VALUE = 2;
/**
*
* Instance group is being stopped.
* Group's instances stop receiving traffic from the load balancer (if any) and are then stopped.
*
*
* STOPPING = 3;
*/
public static final int STOPPING_VALUE = 3;
/**
*
* Instance group is stopped.
* In this state the group cannot be updated and does not react to any changes made to its instances.
* To start the instance group, call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.Start].
*
*
* STOPPED = 4;
*/
public static final int STOPPED_VALUE = 4;
/**
*
* Instance group is being deleted.
*
*
* DELETING = 5;
*/
public static final int DELETING_VALUE = 5;
/**
*
* Instance group is paused.
* In this state all the processes regarding the group management, i.e. scaling, checking instances' health,
* auto-healing and updating them, are paused. The instances that were running prior to pausing the group, however,
* may still be running.
* To resume the processes in the instance group,
* call [yandex.cloud.compute.v1.instancegroup.InstanceGroupService.ResumeProcesses].
* The group status will change to `ACTIVE`.
*
*
* PAUSED = 6;
*/
public static final int PAUSED_VALUE = 6;
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 STARTING;
case 2: return ACTIVE;
case 3: return STOPPING;
case 4: return STOPPED;
case 5: return DELETING;
case 6: return PAUSED;
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.instancegroup.InstanceGroupOuterClass.InstanceGroup.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.instancegroup.InstanceGroup.Status)
}
public static final int ID_FIELD_NUMBER = 1;
private volatile java.lang.Object id_;
/**
*
* ID of the instance 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 instance 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 instance group belongs to.
*
*
* 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 INSTANCE_TEMPLATE_FIELD_NUMBER = 7;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate instanceTemplate_;
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceTemplate instance_template = 7;
* @return Whether the instanceTemplate field is set.
*/
@java.lang.Override
public boolean hasInstanceTemplate() {
return instanceTemplate_ != null;
}
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceTemplate instance_template = 7;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplateOrBuilder getInstanceTemplateOrBuilder() {
return getInstanceTemplate();
}
public static final int SCALE_POLICY_FIELD_NUMBER = 8;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy scalePolicy_;
/**
*
* [Scaling policy](/docs/compute/concepts/instance-groups/scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy scale_policy = 8;
* @return Whether the scalePolicy field is set.
*/
@java.lang.Override
public boolean hasScalePolicy() {
return scalePolicy_ != null;
}
/**
*
* [Scaling policy](/docs/compute/concepts/instance-groups/scale) of the instance group.
*
* Health checking specification. For more information, see [Health check](/docs/network-load-balancer/concepts/health-check).
*
*
* .yandex.cloud.compute.v1.instancegroup.HealthChecksSpec health_checks_spec = 15;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.HealthChecksSpecOrBuilder getHealthChecksSpecOrBuilder() {
return getHealthChecksSpec();
}
public static final int SERVICE_ACCOUNT_ID_FIELD_NUMBER = 16;
private volatile java.lang.Object serviceAccountId_;
/**
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @return The bytes for serviceAccountId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceAccountIdBytes() {
java.lang.Object ref = serviceAccountId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serviceAccountId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATUS_FIELD_NUMBER = 17;
private int status_;
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @return The status.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status.UNRECOGNIZED : result;
}
public static final int VARIABLES_FIELD_NUMBER = 18;
private java.util.List variables_;
/**
* repeated .yandex.cloud.compute.v1.instancegroup.Variable variables = 18;
*/
@java.lang.Override
public java.util.List getVariablesList() {
return variables_;
}
/**
* repeated .yandex.cloud.compute.v1.instancegroup.Variable variables = 18;
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.VariableOrBuilder>
getVariablesOrBuilderList() {
return variables_;
}
/**
* repeated .yandex.cloud.compute.v1.instancegroup.Variable variables = 18;
*/
@java.lang.Override
public int getVariablesCount() {
return variables_.size();
}
/**
* repeated .yandex.cloud.compute.v1.instancegroup.Variable variables = 18;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.Variable getVariables(int index) {
return variables_.get(index);
}
/**
* repeated .yandex.cloud.compute.v1.instancegroup.Variable variables = 18;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.VariableOrBuilder getVariablesOrBuilder(
int index) {
return variables_.get(index);
}
public static final int DELETION_PROTECTION_FIELD_NUMBER = 19;
private boolean deletionProtection_;
/**
*
* Flag prohibiting deletion of the instance group.
* Allowed values:</br>- `false`: The instance group can be deleted.</br>- `true`: The instance group cannot be deleted.
* The default is `false`.
*
*
* bool deletion_protection = 19;
* @return The deletionProtection.
*/
@java.lang.Override
public boolean getDeletionProtection() {
return deletionProtection_;
}
public static final int APPLICATION_LOAD_BALANCER_SPEC_FIELD_NUMBER = 20;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerSpec applicationLoadBalancerSpec_;
/**
*
* Settings for balancing load between instances via [Application Load Balancer](/docs/application-load-balancer/concepts)
* (OSI model layer 7).
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerSpec application_load_balancer_spec = 20;
* @return Whether the applicationLoadBalancerSpec field is set.
*/
@java.lang.Override
public boolean hasApplicationLoadBalancerSpec() {
return applicationLoadBalancerSpec_ != null;
}
/**
*
* Settings for balancing load between instances via [Application Load Balancer](/docs/application-load-balancer/concepts)
* (OSI model layer 7).
*
* Settings for balancing load between instances via [Application Load Balancer](/docs/application-load-balancer/concepts)
* (OSI model layer 7).
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerSpec application_load_balancer_spec = 20;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerSpecOrBuilder getApplicationLoadBalancerSpecOrBuilder() {
return getApplicationLoadBalancerSpec();
}
public static final int APPLICATION_LOAD_BALANCER_STATE_FIELD_NUMBER = 21;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState applicationLoadBalancerState_;
/**
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
* @return Whether the applicationLoadBalancerState field is set.
*/
@java.lang.Override
public boolean hasApplicationLoadBalancerState() {
return applicationLoadBalancerState_ != null;
}
/**
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* 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 instance 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 instance 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 instance group.
*
*
* string id = 1;
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
onChanged();
return this;
}
/**
*
* ID of the instance 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 instance group belongs to.
*
* Name of the instance 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 instance 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 instance 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 instance 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 instance 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_ = "";
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceTemplate instance_template = 7;
* @return Whether the instanceTemplate field is set.
*/
public boolean hasInstanceTemplate() {
return instanceTemplateBuilder_ != null || instanceTemplate_ != null;
}
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceTemplate instance_template = 7;
*/
public Builder setInstanceTemplate(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate value) {
if (instanceTemplateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
instanceTemplate_ = value;
onChanged();
} else {
instanceTemplateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* Instance template for creating the instance group.
* For more information, see [Instance Templates](/docs/compute/concepts/instance-groups/instance-template).
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @return The bytes for serviceAccountId.
*/
public com.google.protobuf.ByteString
getServiceAccountIdBytes() {
java.lang.Object ref = serviceAccountId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
serviceAccountId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @param value The serviceAccountId to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
serviceAccountId_ = value;
onChanged();
return this;
}
/**
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @return This builder for chaining.
*/
public Builder clearServiceAccountId() {
serviceAccountId_ = getDefaultInstance().getServiceAccountId();
onChanged();
return this;
}
/**
*
* ID of the service account. The service account will be used for all API calls
* made by the Instance Groups component on behalf of the user (for example, creating instances, adding them to load balancer target group, etc.). For more information, see [Service accounts](/docs/iam/concepts/users/service-accounts).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 16;
* @param value The bytes for serviceAccountId to set.
* @return This builder for chaining.
*/
public Builder setServiceAccountIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
serviceAccountId_ = value;
onChanged();
return this;
}
private int status_ = 0;
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @return The enum numeric value on the wire for status.
*/
@java.lang.Override public int getStatusValue() {
return status_;
}
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @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 instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @return The status.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status getStatus() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status.valueOf(status_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status.UNRECOGNIZED : result;
}
/**
*
* Status of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.InstanceGroup.Status status = 17;
* @param value The status to set.
* @return This builder for chaining.
*/
public Builder setStatus(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup.Status value) {
if (value == null) {
throw new NullPointerException();
}
status_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Flag prohibiting deletion of the instance group.
* Allowed values:</br>- `false`: The instance group can be deleted.</br>- `true`: The instance group cannot be deleted.
* The default is `false`.
*
* Flag prohibiting deletion of the instance group.
* Allowed values:</br>- `false`: The instance group can be deleted.</br>- `true`: The instance group cannot be deleted.
* The default is `false`.
*
*
* bool deletion_protection = 19;
* @param value The deletionProtection to set.
* @return This builder for chaining.
*/
public Builder setDeletionProtection(boolean value) {
deletionProtection_ = value;
onChanged();
return this;
}
/**
*
* Flag prohibiting deletion of the instance group.
* Allowed values:</br>- `false`: The instance group can be deleted.</br>- `true`: The instance group cannot be deleted.
* The default is `false`.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
* @return Whether the applicationLoadBalancerState field is set.
*/
public boolean hasApplicationLoadBalancerState() {
return applicationLoadBalancerStateBuilder_ != null || applicationLoadBalancerState_ != null;
}
/**
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
*/
public Builder setApplicationLoadBalancerState(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState value) {
if (applicationLoadBalancerStateBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
applicationLoadBalancerState_ = value;
onChanged();
} else {
applicationLoadBalancerStateBuilder_.setMessage(value);
}
return this;
}
/**
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
* Status of the Application Load Balancer target group attributed to the instance group.
* Returned if there is a working load balancer that the target group is connected to.
*
*
* .yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState application_load_balancer_state = 21;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerStateOrBuilder>
getApplicationLoadBalancerStateFieldBuilder() {
if (applicationLoadBalancerStateBuilder_ == null) {
applicationLoadBalancerStateBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerState.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ApplicationLoadBalancerStateOrBuilder>(
getApplicationLoadBalancerState(),
getParentForChildren(),
isClean());
applicationLoadBalancerState_ = null;
}
return applicationLoadBalancerStateBuilder_;
}
@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.instancegroup.InstanceGroup)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.InstanceGroup)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceGroup getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstanceGroup parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InstanceGroup(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.instancegroup.InstanceGroupOuterClass.InstanceGroup getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ApplicationLoadBalancerStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ApplicationLoadBalancerState)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the Application Load Balancer target group attributed to the instance group.
*
*
* string status_message = 2;
* @return The bytes for statusMessage.
*/
public com.google.protobuf.ByteString
getStatusMessageBytes() {
java.lang.Object ref = statusMessage_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
statusMessage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Status message of the target group.
*
*
* string status_message = 2;
* @param value The statusMessage to set.
* @return This builder for chaining.
*/
public Builder setStatusMessage(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
statusMessage_ = value;
onChanged();
return this;
}
/**
*
* Status message of the target group.
*
*
* string status_message = 2;
* @return This builder for chaining.
*/
public Builder clearStatusMessage() {
statusMessage_ = getDefaultInstance().getStatusMessage();
onChanged();
return this;
}
/**
*
* Status message of the target group.
*
*
* string status_message = 2;
* @param value The bytes for statusMessage to set.
* @return This builder for chaining.
*/
public Builder setStatusMessageBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
statusMessage_ = 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.instancegroup.LoadBalancerState)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.LoadBalancerState)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerState();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.LoadBalancerState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LoadBalancerState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new LoadBalancerState(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.instancegroup.InstanceGroupOuterClass.LoadBalancerState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ManagedInstancesStateOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState)
com.google.protobuf.MessageOrBuilder {
/**
*
* Target number of instances for this instance group.
*
*
* int64 target_size = 1;
* @return The targetSize.
*/
long getTargetSize();
/**
*
* The number of running instances that match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_ACTUAL].
*
*
* int64 running_actual_count = 4;
* @return The runningActualCount.
*/
long getRunningActualCount();
/**
*
* The number of running instances that does not match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_OUTDATED].
*
*
* int64 running_outdated_count = 5;
* @return The runningOutdatedCount.
*/
long getRunningOutdatedCount();
/**
*
* The number of instances in flight (for example, updating, starting, deleting). For more information, see [ManagedInstance.Status].
*
*
* int64 processing_count = 6;
* @return The processingCount.
*/
long getProcessingCount();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ManagedInstancesState}
*/
public static final class ManagedInstancesState extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState)
ManagedInstancesStateOrBuilder {
private static final long serialVersionUID = 0L;
// Use ManagedInstancesState.newBuilder() to construct.
private ManagedInstancesState(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ManagedInstancesState() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ManagedInstancesState();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ManagedInstancesState(
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: {
targetSize_ = input.readInt64();
break;
}
case 32: {
runningActualCount_ = input.readInt64();
break;
}
case 40: {
runningOutdatedCount_ = input.readInt64();
break;
}
case 48: {
processingCount_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Builder.class);
}
public interface StatusesOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState.Statuses)
com.google.protobuf.MessageOrBuilder {
/**
*
* Instance is being created.
*
*
* int64 creating = 1;
* @return The creating.
*/
long getCreating();
/**
*
* Instance is being started.
*
*
* int64 starting = 2;
* @return The starting.
*/
long getStarting();
/**
*
* Instance is being opened to receive traffic.
*
*
* int64 opening = 3;
* @return The opening.
*/
long getOpening();
/**
*
* Instance is being warmed.
*
*
* int64 warming = 4;
* @return The warming.
*/
long getWarming();
/**
*
* Instance is running normally.
*
*
* int64 running = 5;
* @return The running.
*/
long getRunning();
/**
*
* Instance is being closed to traffic.
*
*
* int64 closing = 6;
* @return The closing.
*/
long getClosing();
/**
*
* Instance is being stopped.
*
*
* int64 stopping = 7;
* @return The stopping.
*/
long getStopping();
/**
*
* Instance is being updated.
*
*
* int64 updating = 8;
* @return The updating.
*/
long getUpdating();
/**
*
* Instance is being deleted.
*
*
* int64 deleting = 9;
* @return The deleting.
*/
long getDeleting();
/**
*
* Instance failed and needs to be recreated.
*
*
* int64 failed = 10;
* @return The failed.
*/
long getFailed();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ManagedInstancesState.Statuses}
*/
public static final class Statuses extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState.Statuses)
StatusesOrBuilder {
private static final long serialVersionUID = 0L;
// Use Statuses.newBuilder() to construct.
private Statuses(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Statuses() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Statuses();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Statuses(
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: {
creating_ = input.readInt64();
break;
}
case 16: {
starting_ = input.readInt64();
break;
}
case 24: {
opening_ = input.readInt64();
break;
}
case 32: {
warming_ = input.readInt64();
break;
}
case 40: {
running_ = input.readInt64();
break;
}
case 48: {
closing_ = input.readInt64();
break;
}
case 56: {
stopping_ = input.readInt64();
break;
}
case 64: {
updating_ = input.readInt64();
break;
}
case 72: {
deleting_ = input.readInt64();
break;
}
case 80: {
failed_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_Statuses_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_Statuses_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses.Builder.class);
}
public static final int CREATING_FIELD_NUMBER = 1;
private long creating_;
/**
*
* Instance is being created.
*
*
* int64 creating = 1;
* @return The creating.
*/
@java.lang.Override
public long getCreating() {
return creating_;
}
public static final int STARTING_FIELD_NUMBER = 2;
private long starting_;
/**
*
* Instance is being started.
*
*
* int64 starting = 2;
* @return The starting.
*/
@java.lang.Override
public long getStarting() {
return starting_;
}
public static final int OPENING_FIELD_NUMBER = 3;
private long opening_;
/**
*
* Instance is being opened to receive traffic.
*
*
* int64 opening = 3;
* @return The opening.
*/
@java.lang.Override
public long getOpening() {
return opening_;
}
public static final int WARMING_FIELD_NUMBER = 4;
private long warming_;
/**
*
* Instance is being warmed.
*
*
* int64 warming = 4;
* @return The warming.
*/
@java.lang.Override
public long getWarming() {
return warming_;
}
public static final int RUNNING_FIELD_NUMBER = 5;
private long running_;
/**
*
* Instance is running normally.
*
*
* int64 running = 5;
* @return The running.
*/
@java.lang.Override
public long getRunning() {
return running_;
}
public static final int CLOSING_FIELD_NUMBER = 6;
private long closing_;
/**
*
* Instance is being closed to traffic.
*
*
* int64 closing = 6;
* @return The closing.
*/
@java.lang.Override
public long getClosing() {
return closing_;
}
public static final int STOPPING_FIELD_NUMBER = 7;
private long stopping_;
/**
*
* Instance is being stopped.
*
*
* int64 stopping = 7;
* @return The stopping.
*/
@java.lang.Override
public long getStopping() {
return stopping_;
}
public static final int UPDATING_FIELD_NUMBER = 8;
private long updating_;
/**
*
* Instance is being updated.
*
*
* int64 updating = 8;
* @return The updating.
*/
@java.lang.Override
public long getUpdating() {
return updating_;
}
public static final int DELETING_FIELD_NUMBER = 9;
private long deleting_;
/**
*
* Instance is being deleted.
*
*
* int64 deleting = 9;
* @return The deleting.
*/
@java.lang.Override
public long getDeleting() {
return deleting_;
}
public static final int FAILED_FIELD_NUMBER = 10;
private long failed_;
/**
*
*
* int64 creating = 1;
* @return The creating.
*/
@java.lang.Override
public long getCreating() {
return creating_;
}
/**
*
* Instance is being created.
*
*
* int64 creating = 1;
* @param value The creating to set.
* @return This builder for chaining.
*/
public Builder setCreating(long value) {
creating_ = value;
onChanged();
return this;
}
/**
*
* Instance is being created.
*
*
* int64 creating = 1;
* @return This builder for chaining.
*/
public Builder clearCreating() {
creating_ = 0L;
onChanged();
return this;
}
private long starting_ ;
/**
*
* Instance is being started.
*
*
* int64 starting = 2;
* @return The starting.
*/
@java.lang.Override
public long getStarting() {
return starting_;
}
/**
*
* Instance is being started.
*
*
* int64 starting = 2;
* @param value The starting to set.
* @return This builder for chaining.
*/
public Builder setStarting(long value) {
starting_ = value;
onChanged();
return this;
}
/**
*
* Instance is being started.
*
*
* int64 starting = 2;
* @return This builder for chaining.
*/
public Builder clearStarting() {
starting_ = 0L;
onChanged();
return this;
}
private long opening_ ;
/**
*
* Instance is being opened to receive traffic.
*
*
* int64 opening = 3;
* @return The opening.
*/
@java.lang.Override
public long getOpening() {
return opening_;
}
/**
*
* Instance is being opened to receive traffic.
*
*
* int64 opening = 3;
* @param value The opening to set.
* @return This builder for chaining.
*/
public Builder setOpening(long value) {
opening_ = value;
onChanged();
return this;
}
/**
*
* Instance is being opened to receive traffic.
*
*
* int64 opening = 3;
* @return This builder for chaining.
*/
public Builder clearOpening() {
opening_ = 0L;
onChanged();
return this;
}
private long warming_ ;
/**
*
* Instance is being warmed.
*
*
* int64 warming = 4;
* @return The warming.
*/
@java.lang.Override
public long getWarming() {
return warming_;
}
/**
*
* Instance is being warmed.
*
*
* int64 warming = 4;
* @param value The warming to set.
* @return This builder for chaining.
*/
public Builder setWarming(long value) {
warming_ = value;
onChanged();
return this;
}
/**
*
* Instance is being warmed.
*
*
* int64 warming = 4;
* @return This builder for chaining.
*/
public Builder clearWarming() {
warming_ = 0L;
onChanged();
return this;
}
private long running_ ;
/**
*
* Instance is running normally.
*
*
* int64 running = 5;
* @return The running.
*/
@java.lang.Override
public long getRunning() {
return running_;
}
/**
*
* Instance is running normally.
*
*
* int64 running = 5;
* @param value The running to set.
* @return This builder for chaining.
*/
public Builder setRunning(long value) {
running_ = value;
onChanged();
return this;
}
/**
*
* Instance is running normally.
*
*
* int64 running = 5;
* @return This builder for chaining.
*/
public Builder clearRunning() {
running_ = 0L;
onChanged();
return this;
}
private long closing_ ;
/**
*
* Instance is being closed to traffic.
*
*
* int64 closing = 6;
* @return The closing.
*/
@java.lang.Override
public long getClosing() {
return closing_;
}
/**
*
* Instance is being closed to traffic.
*
*
* int64 closing = 6;
* @param value The closing to set.
* @return This builder for chaining.
*/
public Builder setClosing(long value) {
closing_ = value;
onChanged();
return this;
}
/**
*
* Instance is being closed to traffic.
*
*
* int64 closing = 6;
* @return This builder for chaining.
*/
public Builder clearClosing() {
closing_ = 0L;
onChanged();
return this;
}
private long stopping_ ;
/**
*
* Instance is being stopped.
*
*
* int64 stopping = 7;
* @return The stopping.
*/
@java.lang.Override
public long getStopping() {
return stopping_;
}
/**
*
* Instance is being stopped.
*
*
* int64 stopping = 7;
* @param value The stopping to set.
* @return This builder for chaining.
*/
public Builder setStopping(long value) {
stopping_ = value;
onChanged();
return this;
}
/**
*
* Instance is being stopped.
*
*
* int64 stopping = 7;
* @return This builder for chaining.
*/
public Builder clearStopping() {
stopping_ = 0L;
onChanged();
return this;
}
private long updating_ ;
/**
*
* Instance is being updated.
*
*
* int64 updating = 8;
* @return The updating.
*/
@java.lang.Override
public long getUpdating() {
return updating_;
}
/**
*
* Instance is being updated.
*
*
* int64 updating = 8;
* @param value The updating to set.
* @return This builder for chaining.
*/
public Builder setUpdating(long value) {
updating_ = value;
onChanged();
return this;
}
/**
*
* Instance is being updated.
*
*
* int64 updating = 8;
* @return This builder for chaining.
*/
public Builder clearUpdating() {
updating_ = 0L;
onChanged();
return this;
}
private long deleting_ ;
/**
*
* Instance is being deleted.
*
*
* int64 deleting = 9;
* @return The deleting.
*/
@java.lang.Override
public long getDeleting() {
return deleting_;
}
/**
*
* Instance is being deleted.
*
*
* int64 deleting = 9;
* @param value The deleting to set.
* @return This builder for chaining.
*/
public Builder setDeleting(long value) {
deleting_ = value;
onChanged();
return this;
}
/**
*
* Instance is being deleted.
*
*
* int64 deleting = 9;
* @return This builder for chaining.
*/
public Builder clearDeleting() {
deleting_ = 0L;
onChanged();
return this;
}
private long failed_ ;
/**
*
* Instance failed and needs to be recreated.
*
*
* int64 failed = 10;
* @return The failed.
*/
@java.lang.Override
public long getFailed() {
return failed_;
}
/**
*
* Instance failed and needs to be recreated.
*
*
* int64 failed = 10;
* @param value The failed to set.
* @return This builder for chaining.
*/
public Builder setFailed(long value) {
failed_ = value;
onChanged();
return this;
}
/**
*
* Instance failed and needs to be recreated.
*
*
* int64 failed = 10;
* @return This builder for chaining.
*/
public Builder clearFailed() {
failed_ = 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.instancegroup.ManagedInstancesState.Statuses)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState.Statuses)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public Statuses parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Statuses(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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Statuses getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int TARGET_SIZE_FIELD_NUMBER = 1;
private long targetSize_;
/**
*
* Target number of instances for this instance group.
*
*
* int64 target_size = 1;
* @return The targetSize.
*/
@java.lang.Override
public long getTargetSize() {
return targetSize_;
}
public static final int RUNNING_ACTUAL_COUNT_FIELD_NUMBER = 4;
private long runningActualCount_;
/**
*
* The number of running instances that match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_ACTUAL].
*
*
* int64 running_actual_count = 4;
* @return The runningActualCount.
*/
@java.lang.Override
public long getRunningActualCount() {
return runningActualCount_;
}
public static final int RUNNING_OUTDATED_COUNT_FIELD_NUMBER = 5;
private long runningOutdatedCount_;
/**
*
* The number of running instances that does not match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_OUTDATED].
*
*
* int64 running_outdated_count = 5;
* @return The runningOutdatedCount.
*/
@java.lang.Override
public long getRunningOutdatedCount() {
return runningOutdatedCount_;
}
public static final int PROCESSING_COUNT_FIELD_NUMBER = 6;
private long processingCount_;
/**
*
* The number of instances in flight (for example, updating, starting, deleting). For more information, see [ManagedInstance.Status].
*
*
* int64 processing_count = 6;
* @return The processingCount.
*/
@java.lang.Override
public long getProcessingCount() {
return processingCount_;
}
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 (targetSize_ != 0L) {
output.writeInt64(1, targetSize_);
}
if (runningActualCount_ != 0L) {
output.writeInt64(4, runningActualCount_);
}
if (runningOutdatedCount_ != 0L) {
output.writeInt64(5, runningOutdatedCount_);
}
if (processingCount_ != 0L) {
output.writeInt64(6, processingCount_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (targetSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, targetSize_);
}
if (runningActualCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, runningActualCount_);
}
if (runningOutdatedCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(5, runningOutdatedCount_);
}
if (processingCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, processingCount_);
}
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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState) obj;
if (getTargetSize()
!= other.getTargetSize()) return false;
if (getRunningActualCount()
!= other.getRunningActualCount()) return false;
if (getRunningOutdatedCount()
!= other.getRunningOutdatedCount()) return false;
if (getProcessingCount()
!= other.getProcessingCount()) 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) + TARGET_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTargetSize());
hash = (37 * hash) + RUNNING_ACTUAL_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRunningActualCount());
hash = (37 * hash) + RUNNING_OUTDATED_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getRunningOutdatedCount());
hash = (37 * hash) + PROCESSING_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getProcessingCount());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState 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.instancegroup.ManagedInstancesState}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesStateOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.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();
targetSize_ = 0L;
runningActualCount_ = 0L;
runningOutdatedCount_ = 0L;
processingCount_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ManagedInstancesState_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState(this);
result.targetSize_ = targetSize_;
result.runningActualCount_ = runningActualCount_;
result.runningOutdatedCount_ = runningOutdatedCount_;
result.processingCount_ = processingCount_;
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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState.getDefaultInstance()) return this;
if (other.getTargetSize() != 0L) {
setTargetSize(other.getTargetSize());
}
if (other.getRunningActualCount() != 0L) {
setRunningActualCount(other.getRunningActualCount());
}
if (other.getRunningOutdatedCount() != 0L) {
setRunningOutdatedCount(other.getRunningOutdatedCount());
}
if (other.getProcessingCount() != 0L) {
setProcessingCount(other.getProcessingCount());
}
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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long targetSize_ ;
/**
*
* Target number of instances for this instance group.
*
*
* int64 target_size = 1;
* @return The targetSize.
*/
@java.lang.Override
public long getTargetSize() {
return targetSize_;
}
/**
*
* Target number of instances for this instance group.
*
*
* int64 target_size = 1;
* @param value The targetSize to set.
* @return This builder for chaining.
*/
public Builder setTargetSize(long value) {
targetSize_ = value;
onChanged();
return this;
}
/**
*
* Target number of instances for this instance group.
*
*
* int64 target_size = 1;
* @return This builder for chaining.
*/
public Builder clearTargetSize() {
targetSize_ = 0L;
onChanged();
return this;
}
private long runningActualCount_ ;
/**
*
* The number of running instances that match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_ACTUAL].
*
*
* int64 running_actual_count = 4;
* @return The runningActualCount.
*/
@java.lang.Override
public long getRunningActualCount() {
return runningActualCount_;
}
/**
*
* The number of running instances that match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_ACTUAL].
*
*
* int64 running_actual_count = 4;
* @param value The runningActualCount to set.
* @return This builder for chaining.
*/
public Builder setRunningActualCount(long value) {
runningActualCount_ = value;
onChanged();
return this;
}
/**
*
* The number of running instances that match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_ACTUAL].
*
*
* int64 running_actual_count = 4;
* @return This builder for chaining.
*/
public Builder clearRunningActualCount() {
runningActualCount_ = 0L;
onChanged();
return this;
}
private long runningOutdatedCount_ ;
/**
*
* The number of running instances that does not match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_OUTDATED].
*
*
* int64 running_outdated_count = 5;
* @return The runningOutdatedCount.
*/
@java.lang.Override
public long getRunningOutdatedCount() {
return runningOutdatedCount_;
}
/**
*
* The number of running instances that does not match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_OUTDATED].
*
*
* int64 running_outdated_count = 5;
* @param value The runningOutdatedCount to set.
* @return This builder for chaining.
*/
public Builder setRunningOutdatedCount(long value) {
runningOutdatedCount_ = value;
onChanged();
return this;
}
/**
*
* The number of running instances that does not match the current instance template. For more information, see [ManagedInstance.Status.RUNNING_OUTDATED].
*
*
* int64 running_outdated_count = 5;
* @return This builder for chaining.
*/
public Builder clearRunningOutdatedCount() {
runningOutdatedCount_ = 0L;
onChanged();
return this;
}
private long processingCount_ ;
/**
*
* The number of instances in flight (for example, updating, starting, deleting). For more information, see [ManagedInstance.Status].
*
*
* int64 processing_count = 6;
* @return The processingCount.
*/
@java.lang.Override
public long getProcessingCount() {
return processingCount_;
}
/**
*
* The number of instances in flight (for example, updating, starting, deleting). For more information, see [ManagedInstance.Status].
*
*
* int64 processing_count = 6;
* @param value The processingCount to set.
* @return This builder for chaining.
*/
public Builder setProcessingCount(long value) {
processingCount_ = value;
onChanged();
return this;
}
/**
*
* The number of instances in flight (for example, updating, starting, deleting). For more information, see [ManagedInstance.Status].
*
*
* int64 processing_count = 6;
* @return This builder for chaining.
*/
public Builder clearProcessingCount() {
processingCount_ = 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.instancegroup.ManagedInstancesState)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ManagedInstancesState)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ManagedInstancesState getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ManagedInstancesState parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ManagedInstancesState(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.instancegroup.InstanceGroupOuterClass.ManagedInstancesState getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ScalePolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ScalePolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* [Manual scaling policy](/docs/compute/concepts/instance-groups/scale#fixed-policy) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale fixed_scale = 1;
* @return Whether the fixedScale field is set.
*/
boolean hasFixedScale();
/**
*
* [Manual scaling policy](/docs/compute/concepts/instance-groups/scale#fixed-policy) of the instance group.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
*
* .google.protobuf.Duration stabilization_duration = 5 [(.yandex.cloud.value) = "1m-30m"];
* @return Whether the stabilizationDuration field is set.
*/
boolean hasStabilizationDuration();
/**
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
*
* int64 initial_size = 6 [(.yandex.cloud.value) = ">=1"];
* @return The initialSize.
*/
long getInitialSize();
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule cpu_utilization_rule = 7;
* @return Whether the cpuUtilizationRule field is set.
*/
boolean hasCpuUtilizationRule();
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The enum numeric value on the wire for autoScaleType.
*/
int getAutoScaleTypeValue();
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The autoScaleType.
*/
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType getAutoScaleType();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale}
*/
public static final class AutoScale extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale)
AutoScaleOrBuilder {
private static final long serialVersionUID = 0L;
// Use AutoScale.newBuilder() to construct.
private AutoScale(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AutoScale() {
customRules_ = java.util.Collections.emptyList();
autoScaleType_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AutoScale();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AutoScale(
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 8: {
minZoneSize_ = input.readInt64();
break;
}
case 16: {
maxSize_ = input.readInt64();
break;
}
case 26: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (measurementDuration_ != null) {
subBuilder = measurementDuration_.toBuilder();
}
measurementDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(measurementDuration_);
measurementDuration_ = subBuilder.buildPartial();
}
break;
}
case 34: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (warmupDuration_ != null) {
subBuilder = warmupDuration_.toBuilder();
}
warmupDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(warmupDuration_);
warmupDuration_ = subBuilder.buildPartial();
}
break;
}
case 42: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (stabilizationDuration_ != null) {
subBuilder = stabilizationDuration_.toBuilder();
}
stabilizationDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(stabilizationDuration_);
stabilizationDuration_ = subBuilder.buildPartial();
}
break;
}
case 48: {
initialSize_ = input.readInt64();
break;
}
case 58: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.Builder subBuilder = null;
if (cpuUtilizationRule_ != null) {
subBuilder = cpuUtilizationRule_.toBuilder();
}
cpuUtilizationRule_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cpuUtilizationRule_);
cpuUtilizationRule_ = subBuilder.buildPartial();
}
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
customRules_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
customRules_.add(
input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.parser(), extensionRegistry));
break;
}
case 72: {
int rawValue = input.readEnum();
autoScaleType_ = rawValue;
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
customRules_ = java.util.Collections.unmodifiableList(customRules_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_AutoScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_AutoScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType}
*/
public enum AutoScaleType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* AUTO_SCALE_TYPE_UNSPECIFIED = 0;
*/
AUTO_SCALE_TYPE_UNSPECIFIED(0),
/**
*
* Scale each zone independently. This is the default.
*
*
* ZONAL = 1;
*/
ZONAL(1),
/**
*
* Scale group as a whole.
*
*
* REGIONAL = 2;
*/
REGIONAL(2),
UNRECOGNIZED(-1),
;
/**
* AUTO_SCALE_TYPE_UNSPECIFIED = 0;
*/
public static final int AUTO_SCALE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* Scale each zone independently. This is the default.
*
*
* ZONAL = 1;
*/
public static final int ZONAL_VALUE = 1;
/**
*
* Scale group as a whole.
*
*
* REGIONAL = 2;
*/
public static final int REGIONAL_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 AutoScaleType 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 AutoScaleType forNumber(int value) {
switch (value) {
case 0: return AUTO_SCALE_TYPE_UNSPECIFIED;
case 1: return ZONAL;
case 2: return REGIONAL;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
AutoScaleType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public AutoScaleType findValueByNumber(int number) {
return AutoScaleType.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.getDescriptor().getEnumTypes().get(0);
}
private static final AutoScaleType[] VALUES = values();
public static AutoScaleType 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 AutoScaleType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType)
}
public static final int MIN_ZONE_SIZE_FIELD_NUMBER = 1;
private long minZoneSize_;
/**
*
* Lower limit for instance count in each zone.
*
*
* int64 min_zone_size = 1 [(.yandex.cloud.value) = "0-100"];
* @return The minZoneSize.
*/
@java.lang.Override
public long getMinZoneSize() {
return minZoneSize_;
}
public static final int MAX_SIZE_FIELD_NUMBER = 2;
private long maxSize_;
/**
*
* Upper limit for total instance count (across all zones).
* 0 means maximum limit = 100.
*
*
* int64 max_size = 2 [(.yandex.cloud.value) = "0-100"];
* @return The maxSize.
*/
@java.lang.Override
public long getMaxSize() {
return maxSize_;
}
public static final int MEASUREMENT_DURATION_FIELD_NUMBER = 3;
private com.google.protobuf.Duration measurementDuration_;
/**
*
* Time in seconds allotted for averaging metrics.
* 1 minute by default.
*
*
* .google.protobuf.Duration measurement_duration = 3 [(.yandex.cloud.value) = "1m-10m"];
* @return Whether the measurementDuration field is set.
*/
@java.lang.Override
public boolean hasMeasurementDuration() {
return measurementDuration_ != null;
}
/**
*
* Time in seconds allotted for averaging metrics.
* 1 minute by default.
*
* The warmup time of the instance in seconds. During this time,
* traffic is sent to the instance, but instance metrics are not collected.
*
*
* .google.protobuf.Duration warmup_duration = 4 [(.yandex.cloud.value) = "<=10m"];
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getWarmupDurationOrBuilder() {
return getWarmupDuration();
}
public static final int STABILIZATION_DURATION_FIELD_NUMBER = 5;
private com.google.protobuf.Duration stabilizationDuration_;
/**
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
*
* .google.protobuf.Duration stabilization_duration = 5 [(.yandex.cloud.value) = "1m-30m"];
* @return Whether the stabilizationDuration field is set.
*/
@java.lang.Override
public boolean hasStabilizationDuration() {
return stabilizationDuration_ != null;
}
/**
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
*
* .google.protobuf.Duration stabilization_duration = 5 [(.yandex.cloud.value) = "1m-30m"];
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getStabilizationDurationOrBuilder() {
return getStabilizationDuration();
}
public static final int INITIAL_SIZE_FIELD_NUMBER = 6;
private long initialSize_;
/**
*
* Target group size.
*
*
* int64 initial_size = 6 [(.yandex.cloud.value) = ">=1"];
* @return The initialSize.
*/
@java.lang.Override
public long getInitialSize() {
return initialSize_;
}
public static final int CPU_UTILIZATION_RULE_FIELD_NUMBER = 7;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule cpuUtilizationRule_;
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule cpu_utilization_rule = 7;
* @return Whether the cpuUtilizationRule field is set.
*/
@java.lang.Override
public boolean hasCpuUtilizationRule() {
return cpuUtilizationRule_ != null;
}
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule cpu_utilization_rule = 7;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRuleOrBuilder getCpuUtilizationRuleOrBuilder() {
return getCpuUtilizationRule();
}
public static final int CUSTOM_RULES_FIELD_NUMBER = 8;
private java.util.List customRules_;
/**
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule custom_rules = 8 [(.yandex.cloud.size) = "<=3"];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRuleOrBuilder getCustomRulesOrBuilder(
int index) {
return customRules_.get(index);
}
public static final int AUTO_SCALE_TYPE_FIELD_NUMBER = 9;
private int autoScaleType_;
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The enum numeric value on the wire for autoScaleType.
*/
@java.lang.Override public int getAutoScaleTypeValue() {
return autoScaleType_;
}
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The autoScaleType.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType getAutoScaleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.valueOf(autoScaleType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.UNRECOGNIZED : result;
}
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 (minZoneSize_ != 0L) {
output.writeInt64(1, minZoneSize_);
}
if (maxSize_ != 0L) {
output.writeInt64(2, maxSize_);
}
if (measurementDuration_ != null) {
output.writeMessage(3, getMeasurementDuration());
}
if (warmupDuration_ != null) {
output.writeMessage(4, getWarmupDuration());
}
if (stabilizationDuration_ != null) {
output.writeMessage(5, getStabilizationDuration());
}
if (initialSize_ != 0L) {
output.writeInt64(6, initialSize_);
}
if (cpuUtilizationRule_ != null) {
output.writeMessage(7, getCpuUtilizationRule());
}
for (int i = 0; i < customRules_.size(); i++) {
output.writeMessage(8, customRules_.get(i));
}
if (autoScaleType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.AUTO_SCALE_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(9, autoScaleType_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (minZoneSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, minZoneSize_);
}
if (maxSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, maxSize_);
}
if (measurementDuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, getMeasurementDuration());
}
if (warmupDuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getWarmupDuration());
}
if (stabilizationDuration_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getStabilizationDuration());
}
if (initialSize_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, initialSize_);
}
if (cpuUtilizationRule_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getCpuUtilizationRule());
}
for (int i = 0; i < customRules_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, customRules_.get(i));
}
if (autoScaleType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.AUTO_SCALE_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, autoScaleType_);
}
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale) obj;
if (getMinZoneSize()
!= other.getMinZoneSize()) return false;
if (getMaxSize()
!= other.getMaxSize()) return false;
if (hasMeasurementDuration() != other.hasMeasurementDuration()) return false;
if (hasMeasurementDuration()) {
if (!getMeasurementDuration()
.equals(other.getMeasurementDuration())) return false;
}
if (hasWarmupDuration() != other.hasWarmupDuration()) return false;
if (hasWarmupDuration()) {
if (!getWarmupDuration()
.equals(other.getWarmupDuration())) return false;
}
if (hasStabilizationDuration() != other.hasStabilizationDuration()) return false;
if (hasStabilizationDuration()) {
if (!getStabilizationDuration()
.equals(other.getStabilizationDuration())) return false;
}
if (getInitialSize()
!= other.getInitialSize()) return false;
if (hasCpuUtilizationRule() != other.hasCpuUtilizationRule()) return false;
if (hasCpuUtilizationRule()) {
if (!getCpuUtilizationRule()
.equals(other.getCpuUtilizationRule())) return false;
}
if (!getCustomRulesList()
.equals(other.getCustomRulesList())) return false;
if (autoScaleType_ != other.autoScaleType_) 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) + MIN_ZONE_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMinZoneSize());
hash = (37 * hash) + MAX_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMaxSize());
if (hasMeasurementDuration()) {
hash = (37 * hash) + MEASUREMENT_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getMeasurementDuration().hashCode();
}
if (hasWarmupDuration()) {
hash = (37 * hash) + WARMUP_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getWarmupDuration().hashCode();
}
if (hasStabilizationDuration()) {
hash = (37 * hash) + STABILIZATION_DURATION_FIELD_NUMBER;
hash = (53 * hash) + getStabilizationDuration().hashCode();
}
hash = (37 * hash) + INITIAL_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getInitialSize());
if (hasCpuUtilizationRule()) {
hash = (37 * hash) + CPU_UTILIZATION_RULE_FIELD_NUMBER;
hash = (53 * hash) + getCpuUtilizationRule().hashCode();
}
if (getCustomRulesCount() > 0) {
hash = (37 * hash) + CUSTOM_RULES_FIELD_NUMBER;
hash = (53 * hash) + getCustomRulesList().hashCode();
}
hash = (37 * hash) + AUTO_SCALE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + autoScaleType_;
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale 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.instancegroup.ScalePolicy.AutoScale}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScaleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_AutoScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_AutoScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getCustomRulesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
minZoneSize_ = 0L;
maxSize_ = 0L;
if (measurementDurationBuilder_ == null) {
measurementDuration_ = null;
} else {
measurementDuration_ = null;
measurementDurationBuilder_ = null;
}
if (warmupDurationBuilder_ == null) {
warmupDuration_ = null;
} else {
warmupDuration_ = null;
warmupDurationBuilder_ = null;
}
if (stabilizationDurationBuilder_ == null) {
stabilizationDuration_ = null;
} else {
stabilizationDuration_ = null;
stabilizationDurationBuilder_ = null;
}
initialSize_ = 0L;
if (cpuUtilizationRuleBuilder_ == null) {
cpuUtilizationRule_ = null;
} else {
cpuUtilizationRule_ = null;
cpuUtilizationRuleBuilder_ = null;
}
if (customRulesBuilder_ == null) {
customRules_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
} else {
customRulesBuilder_.clear();
}
autoScaleType_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_AutoScale_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale(this);
int from_bitField0_ = bitField0_;
result.minZoneSize_ = minZoneSize_;
result.maxSize_ = maxSize_;
if (measurementDurationBuilder_ == null) {
result.measurementDuration_ = measurementDuration_;
} else {
result.measurementDuration_ = measurementDurationBuilder_.build();
}
if (warmupDurationBuilder_ == null) {
result.warmupDuration_ = warmupDuration_;
} else {
result.warmupDuration_ = warmupDurationBuilder_.build();
}
if (stabilizationDurationBuilder_ == null) {
result.stabilizationDuration_ = stabilizationDuration_;
} else {
result.stabilizationDuration_ = stabilizationDurationBuilder_.build();
}
result.initialSize_ = initialSize_;
if (cpuUtilizationRuleBuilder_ == null) {
result.cpuUtilizationRule_ = cpuUtilizationRule_;
} else {
result.cpuUtilizationRule_ = cpuUtilizationRuleBuilder_.build();
}
if (customRulesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
customRules_ = java.util.Collections.unmodifiableList(customRules_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.customRules_ = customRules_;
} else {
result.customRules_ = customRulesBuilder_.build();
}
result.autoScaleType_ = autoScaleType_;
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.getDefaultInstance()) return this;
if (other.getMinZoneSize() != 0L) {
setMinZoneSize(other.getMinZoneSize());
}
if (other.getMaxSize() != 0L) {
setMaxSize(other.getMaxSize());
}
if (other.hasMeasurementDuration()) {
mergeMeasurementDuration(other.getMeasurementDuration());
}
if (other.hasWarmupDuration()) {
mergeWarmupDuration(other.getWarmupDuration());
}
if (other.hasStabilizationDuration()) {
mergeStabilizationDuration(other.getStabilizationDuration());
}
if (other.getInitialSize() != 0L) {
setInitialSize(other.getInitialSize());
}
if (other.hasCpuUtilizationRule()) {
mergeCpuUtilizationRule(other.getCpuUtilizationRule());
}
if (customRulesBuilder_ == null) {
if (!other.customRules_.isEmpty()) {
if (customRules_.isEmpty()) {
customRules_ = other.customRules_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureCustomRulesIsMutable();
customRules_.addAll(other.customRules_);
}
onChanged();
}
} else {
if (!other.customRules_.isEmpty()) {
if (customRulesBuilder_.isEmpty()) {
customRulesBuilder_.dispose();
customRulesBuilder_ = null;
customRules_ = other.customRules_;
bitField0_ = (bitField0_ & ~0x00000001);
customRulesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getCustomRulesFieldBuilder() : null;
} else {
customRulesBuilder_.addAllMessages(other.customRules_);
}
}
}
if (other.autoScaleType_ != 0) {
setAutoScaleTypeValue(other.getAutoScaleTypeValue());
}
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private long minZoneSize_ ;
/**
*
* Lower limit for instance count in each zone.
*
*
* int64 min_zone_size = 1 [(.yandex.cloud.value) = "0-100"];
* @return The minZoneSize.
*/
@java.lang.Override
public long getMinZoneSize() {
return minZoneSize_;
}
/**
*
* Lower limit for instance count in each zone.
*
*
* int64 min_zone_size = 1 [(.yandex.cloud.value) = "0-100"];
* @param value The minZoneSize to set.
* @return This builder for chaining.
*/
public Builder setMinZoneSize(long value) {
minZoneSize_ = value;
onChanged();
return this;
}
/**
*
* Lower limit for instance count in each zone.
*
*
* int64 min_zone_size = 1 [(.yandex.cloud.value) = "0-100"];
* @return This builder for chaining.
*/
public Builder clearMinZoneSize() {
minZoneSize_ = 0L;
onChanged();
return this;
}
private long maxSize_ ;
/**
*
* Upper limit for total instance count (across all zones).
* 0 means maximum limit = 100.
*
*
* int64 max_size = 2 [(.yandex.cloud.value) = "0-100"];
* @return The maxSize.
*/
@java.lang.Override
public long getMaxSize() {
return maxSize_;
}
/**
*
* Upper limit for total instance count (across all zones).
* 0 means maximum limit = 100.
*
*
* int64 max_size = 2 [(.yandex.cloud.value) = "0-100"];
* @param value The maxSize to set.
* @return This builder for chaining.
*/
public Builder setMaxSize(long value) {
maxSize_ = value;
onChanged();
return this;
}
/**
*
* Upper limit for total instance count (across all zones).
* 0 means maximum limit = 100.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
*
* .google.protobuf.Duration stabilization_duration = 5 [(.yandex.cloud.value) = "1m-30m"];
* @return Whether the stabilizationDuration field is set.
*/
public boolean hasStabilizationDuration() {
return stabilizationDurationBuilder_ != null || stabilizationDuration_ != null;
}
/**
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Minimum amount of time in seconds allotted for monitoring before
* Instance Groups can reduce the number of instances in the group.
* During this time, the group size doesn't decrease, even if the new metric values
* indicate that it should.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule cpu_utilization_rule = 7;
* @return Whether the cpuUtilizationRule field is set.
*/
public boolean hasCpuUtilizationRule() {
return cpuUtilizationRuleBuilder_ != null || cpuUtilizationRule_ != null;
}
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule cpu_utilization_rule = 7;
*/
public Builder setCpuUtilizationRule(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule value) {
if (cpuUtilizationRuleBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cpuUtilizationRule_ = value;
onChanged();
} else {
cpuUtilizationRuleBuilder_.setMessage(value);
}
return this;
}
/**
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on the average CPU utilization of the instance group.
* If more than one rule is specified, e.g. CPU utilization and one or more Monitoring metrics ([custom_rules]),
* the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule custom_rules = 8 [(.yandex.cloud.size) = "<=3"];
*/
public Builder setCustomRules(
int index, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule value) {
if (customRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCustomRulesIsMutable();
customRules_.set(index, value);
onChanged();
} else {
customRulesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule custom_rules = 8 [(.yandex.cloud.size) = "<=3"];
*/
public Builder addCustomRules(
int index, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule value) {
if (customRulesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureCustomRulesIsMutable();
customRules_.add(index, value);
onChanged();
} else {
customRulesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
* Defines an autoscaling rule based on a [custom metric](/docs/monitoring/operations/metric/add) from Monitoring.
* If more than one rule is specified, e.g. CPU utilization ([cpu_utilization_rule]) and one or more Monitoring
* metrics, the size of the instance group will be equal to the maximum of sizes calculated according to each metric.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The enum numeric value on the wire for autoScaleType.
*/
@java.lang.Override public int getAutoScaleTypeValue() {
return autoScaleType_;
}
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @param value The enum numeric value on the wire for autoScaleType to set.
* @return This builder for chaining.
*/
public Builder setAutoScaleTypeValue(int value) {
autoScaleType_ = value;
onChanged();
return this;
}
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return The autoScaleType.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType getAutoScaleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.valueOf(autoScaleType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType.UNRECOGNIZED : result;
}
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @param value The autoScaleType to set.
* @return This builder for chaining.
*/
public Builder setAutoScaleType(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.AutoScaleType value) {
if (value == null) {
throw new NullPointerException();
}
autoScaleType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Autoscaling type.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale.AutoScaleType auto_scale_type = 9;
* @return This builder for chaining.
*/
public Builder clearAutoScaleType() {
autoScaleType_ = 0;
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.instancegroup.ScalePolicy.AutoScale)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AutoScale parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new AutoScale(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.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CpuUtilizationRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* Target CPU utilization level. Instance Groups maintains this level for each availability zone.
*
*
* double utilization_target = 1 [(.yandex.cloud.value) = "10-100"];
* @return The utilizationTarget.
*/
double getUtilizationTarget();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule}
*/
public static final class CpuUtilizationRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule)
CpuUtilizationRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use CpuUtilizationRule.newBuilder() to construct.
private CpuUtilizationRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CpuUtilizationRule() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CpuUtilizationRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CpuUtilizationRule(
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 9: {
utilizationTarget_ = input.readDouble();
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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CpuUtilizationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CpuUtilizationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.Builder.class);
}
public static final int UTILIZATION_TARGET_FIELD_NUMBER = 1;
private double utilizationTarget_;
/**
*
* Target CPU utilization level. Instance Groups maintains this level for each availability zone.
*
*
* double utilization_target = 1 [(.yandex.cloud.value) = "10-100"];
* @return The utilizationTarget.
*/
@java.lang.Override
public double getUtilizationTarget() {
return utilizationTarget_;
}
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 (java.lang.Double.doubleToRawLongBits(utilizationTarget_) != 0) {
output.writeDouble(1, utilizationTarget_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (java.lang.Double.doubleToRawLongBits(utilizationTarget_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(1, utilizationTarget_);
}
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule) obj;
if (java.lang.Double.doubleToLongBits(getUtilizationTarget())
!= java.lang.Double.doubleToLongBits(
other.getUtilizationTarget())) 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) + UTILIZATION_TARGET_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getUtilizationTarget()));
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule 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.instancegroup.ScalePolicy.CpuUtilizationRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CpuUtilizationRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CpuUtilizationRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.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();
utilizationTarget_ = 0D;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CpuUtilizationRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule(this);
result.utilizationTarget_ = utilizationTarget_;
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule.getDefaultInstance()) return this;
if (other.getUtilizationTarget() != 0D) {
setUtilizationTarget(other.getUtilizationTarget());
}
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private double utilizationTarget_ ;
/**
*
* Target CPU utilization level. Instance Groups maintains this level for each availability zone.
*
* Target CPU utilization level. Instance Groups maintains this level for each availability zone.
*
*
* double utilization_target = 1 [(.yandex.cloud.value) = "10-100"];
* @param value The utilizationTarget to set.
* @return This builder for chaining.
*/
public Builder setUtilizationTarget(double value) {
utilizationTarget_ = value;
onChanged();
return this;
}
/**
*
* Target CPU utilization level. Instance Groups maintains this level for each availability zone.
*
*
* double utilization_target = 1 [(.yandex.cloud.value) = "10-100"];
* @return This builder for chaining.
*/
public Builder clearUtilizationTarget() {
utilizationTarget_ = 0D;
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.instancegroup.ScalePolicy.CpuUtilizationRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CpuUtilizationRule)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CpuUtilizationRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CpuUtilizationRule(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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CpuUtilizationRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface CustomRuleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule)
com.google.protobuf.MessageOrBuilder {
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for ruleType.
*/
int getRuleTypeValue();
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for metricType.
*/
int getMetricTypeValue();
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
* Folder id of custom metric in Monitoring that should be used for scaling.
*
*
* string folder_id = 6 [(.yandex.cloud.length) = "<=50"];
* @return The bytes for folderId.
*/
com.google.protobuf.ByteString
getFolderIdBytes();
/**
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @return The service.
*/
java.lang.String getService();
/**
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @return The bytes for service.
*/
com.google.protobuf.ByteString
getServiceBytes();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule}
*/
public static final class CustomRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule)
CustomRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use CustomRule.newBuilder() to construct.
private CustomRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CustomRule() {
ruleType_ = 0;
metricType_ = 0;
metricName_ = "";
folderId_ = "";
service_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CustomRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CustomRule(
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 8: {
int rawValue = input.readEnum();
ruleType_ = rawValue;
break;
}
case 16: {
int rawValue = input.readEnum();
metricType_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
metricName_ = s;
break;
}
case 33: {
target_ = input.readDouble();
break;
}
case 42: {
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 50: {
java.lang.String s = input.readStringRequireUtf8();
folderId_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
service_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CustomRule_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CustomRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType}
*/
public enum RuleType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* RULE_TYPE_UNSPECIFIED = 0;
*/
RULE_TYPE_UNSPECIFIED(0),
/**
*
* This type means that the metric applies to one instance.
* First, Instance Groups calculates the average metric value for each instance,
* then averages the values for instances in one availability zone or in whole group depends on autoscaling type.
* This type of metric must have the `instance_id` label.
*
*
* UTILIZATION = 1;
*/
UTILIZATION(1),
/**
*
* This type means that the metric applies to instances in one availability zone or to whole group depends on autoscaling type.
* This type of metric must have the `zone_id` label if ZONAL autoscaling type is chosen.
*
*
* WORKLOAD = 2;
*/
WORKLOAD(2),
UNRECOGNIZED(-1),
;
/**
* RULE_TYPE_UNSPECIFIED = 0;
*/
public static final int RULE_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* This type means that the metric applies to one instance.
* First, Instance Groups calculates the average metric value for each instance,
* then averages the values for instances in one availability zone or in whole group depends on autoscaling type.
* This type of metric must have the `instance_id` label.
*
*
* UTILIZATION = 1;
*/
public static final int UTILIZATION_VALUE = 1;
/**
*
* This type means that the metric applies to instances in one availability zone or to whole group depends on autoscaling type.
* This type of metric must have the `zone_id` label if ZONAL autoscaling type is chosen.
*
*
* WORKLOAD = 2;
*/
public static final int WORKLOAD_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 RuleType 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 RuleType forNumber(int value) {
switch (value) {
case 0: return RULE_TYPE_UNSPECIFIED;
case 1: return UTILIZATION;
case 2: return WORKLOAD;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
RuleType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public RuleType findValueByNumber(int number) {
return RuleType.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.getDescriptor().getEnumTypes().get(0);
}
private static final RuleType[] VALUES = values();
public static RuleType 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 RuleType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType)
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType}
*/
public enum MetricType
implements com.google.protobuf.ProtocolMessageEnum {
/**
* METRIC_TYPE_UNSPECIFIED = 0;
*/
METRIC_TYPE_UNSPECIFIED(0),
/**
*
* This type is used for metrics that show the metric value at a certain point in time,
* such as requests per second to the server on an instance.
* Instance Groups calculates the average metric value for the period
* specified in the [AutoScale.measurement_duration] field.
*
*
* GAUGE = 1;
*/
GAUGE(1),
/**
*
* This type is used for metrics that monotonically increase over time,
* such as the total number of requests to the server on an instance.
* Instance Groups calculates the average value increase for the period
* specified in the [AutoScale.measurement_duration] field.
*
*
* COUNTER = 2;
*/
COUNTER(2),
UNRECOGNIZED(-1),
;
/**
* METRIC_TYPE_UNSPECIFIED = 0;
*/
public static final int METRIC_TYPE_UNSPECIFIED_VALUE = 0;
/**
*
* This type is used for metrics that show the metric value at a certain point in time,
* such as requests per second to the server on an instance.
* Instance Groups calculates the average metric value for the period
* specified in the [AutoScale.measurement_duration] field.
*
*
* GAUGE = 1;
*/
public static final int GAUGE_VALUE = 1;
/**
*
* This type is used for metrics that monotonically increase over time,
* such as the total number of requests to the server on an instance.
* Instance Groups calculates the average value increase for the period
* specified in the [AutoScale.measurement_duration] field.
*
*
* COUNTER = 2;
*/
public static final int COUNTER_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 MetricType 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 MetricType forNumber(int value) {
switch (value) {
case 0: return METRIC_TYPE_UNSPECIFIED;
case 1: return GAUGE;
case 2: return COUNTER;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MetricType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MetricType findValueByNumber(int number) {
return MetricType.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.getDescriptor().getEnumTypes().get(1);
}
private static final MetricType[] VALUES = values();
public static MetricType 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 MetricType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType)
}
public static final int RULE_TYPE_FIELD_NUMBER = 1;
private int ruleType_;
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for ruleType.
*/
@java.lang.Override public int getRuleTypeValue() {
return ruleType_;
}
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return The ruleType.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType getRuleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.valueOf(ruleType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.UNRECOGNIZED : result;
}
public static final int METRIC_TYPE_FIELD_NUMBER = 2;
private int metricType_;
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for metricType.
*/
@java.lang.Override public int getMetricTypeValue() {
return metricType_;
}
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @return The metricType.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType getMetricType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.valueOf(metricType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.UNRECOGNIZED : result;
}
public static final int METRIC_NAME_FIELD_NUMBER = 3;
private volatile java.lang.Object metricName_;
/**
*
* Name of custom metric in Monitoring that should be used for scaling.
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @return The bytes for service.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = 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 (ruleType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.RULE_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, ruleType_);
}
if (metricType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(2, metricType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, metricName_);
}
if (java.lang.Double.doubleToRawLongBits(target_) != 0) {
output.writeDouble(4, target_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
5);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, folderId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 7, service_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (ruleType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.RULE_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, ruleType_);
}
if (metricType_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.METRIC_TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, metricType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(metricName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, metricName_);
}
if (java.lang.Double.doubleToRawLongBits(target_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, target_);
}
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(5, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(folderId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, folderId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(service_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, service_);
}
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule) obj;
if (ruleType_ != other.ruleType_) return false;
if (metricType_ != other.metricType_) return false;
if (!getMetricName()
.equals(other.getMetricName())) return false;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (java.lang.Double.doubleToLongBits(getTarget())
!= java.lang.Double.doubleToLongBits(
other.getTarget())) return false;
if (!getFolderId()
.equals(other.getFolderId())) return false;
if (!getService()
.equals(other.getService())) 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) + RULE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + ruleType_;
hash = (37 * hash) + METRIC_TYPE_FIELD_NUMBER;
hash = (53 * hash) + metricType_;
hash = (37 * hash) + METRIC_NAME_FIELD_NUMBER;
hash = (53 * hash) + getMetricName().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + TARGET_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTarget()));
hash = (37 * hash) + FOLDER_ID_FIELD_NUMBER;
hash = (53 * hash) + getFolderId().hashCode();
hash = (37 * hash) + SERVICE_FIELD_NUMBER;
hash = (53 * hash) + getService().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule 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.instancegroup.ScalePolicy.CustomRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CustomRule_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 5:
return internalGetLabels();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 5:
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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CustomRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.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();
ruleType_ = 0;
metricType_ = 0;
metricName_ = "";
internalGetMutableLabels().clear();
target_ = 0D;
folderId_ = "";
service_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_CustomRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule(this);
int from_bitField0_ = bitField0_;
result.ruleType_ = ruleType_;
result.metricType_ = metricType_;
result.metricName_ = metricName_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.target_ = target_;
result.folderId_ = folderId_;
result.service_ = service_;
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.getDefaultInstance()) return this;
if (other.ruleType_ != 0) {
setRuleTypeValue(other.getRuleTypeValue());
}
if (other.metricType_ != 0) {
setMetricTypeValue(other.getMetricTypeValue());
}
if (!other.getMetricName().isEmpty()) {
metricName_ = other.metricName_;
onChanged();
}
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (other.getTarget() != 0D) {
setTarget(other.getTarget());
}
if (!other.getFolderId().isEmpty()) {
folderId_ = other.folderId_;
onChanged();
}
if (!other.getService().isEmpty()) {
service_ = other.service_;
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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int ruleType_ = 0;
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for ruleType.
*/
@java.lang.Override public int getRuleTypeValue() {
return ruleType_;
}
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for ruleType to set.
* @return This builder for chaining.
*/
public Builder setRuleTypeValue(int value) {
ruleType_ = value;
onChanged();
return this;
}
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return The ruleType.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType getRuleType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.valueOf(ruleType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType.UNRECOGNIZED : result;
}
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @param value The ruleType to set.
* @return This builder for chaining.
*/
public Builder setRuleType(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.RuleType value) {
if (value == null) {
throw new NullPointerException();
}
ruleType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Custom metric rule type. This field affects which label from
* the custom metric should be used: `zone_id` or `instance_id`.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.RuleType rule_type = 1 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearRuleType() {
ruleType_ = 0;
onChanged();
return this;
}
private int metricType_ = 0;
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for metricType.
*/
@java.lang.Override public int getMetricTypeValue() {
return metricType_;
}
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @param value The enum numeric value on the wire for metricType to set.
* @return This builder for chaining.
*/
public Builder setMetricTypeValue(int value) {
metricType_ = value;
onChanged();
return this;
}
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @return The metricType.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType getMetricType() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.valueOf(metricType_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType.UNRECOGNIZED : result;
}
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule.MetricType metric_type = 2 [(.yandex.cloud.required) = true];
* @param value The metricType to set.
* @return This builder for chaining.
*/
public Builder setMetricType(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule.MetricType value) {
if (value == null) {
throw new NullPointerException();
}
metricType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of custom metric. This field affects how Instance Groups calculates the average metric value.
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @return The bytes for service.
*/
public com.google.protobuf.ByteString
getServiceBytes() {
java.lang.Object ref = service_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
service_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @param value The service to set.
* @return This builder for chaining.
*/
public Builder setService(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
service_ = value;
onChanged();
return this;
}
/**
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @return This builder for chaining.
*/
public Builder clearService() {
service_ = getDefaultInstance().getService();
onChanged();
return this;
}
/**
*
* Service of custom metric in Monitoring that should be used for scaling.
*
*
* string service = 7 [(.yandex.cloud.length) = "<=200"];
* @param value The bytes for service to set.
* @return This builder for chaining.
*/
public Builder setServiceBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
service_ = 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.instancegroup.ScalePolicy.CustomRule)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.CustomRule)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CustomRule parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CustomRule(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.instancegroup.InstanceGroupOuterClass.ScalePolicy.CustomRule getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface FixedScaleOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale)
com.google.protobuf.MessageOrBuilder {
/**
*
* Number of instances in the instance group.
*
*
* int64 size = 1 [(.yandex.cloud.value) = "1-100"];
* @return The size.
*/
long getSize();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale}
*/
public static final class FixedScale extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_FixedScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.Builder.class);
}
public static final int SIZE_FIELD_NUMBER = 1;
private long size_;
/**
*
* Number of instances in the instance group.
*
*
* int64 size = 1 [(.yandex.cloud.value) = "1-100"];
* @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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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.instancegroup.ScalePolicy.FixedScale}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScaleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_FixedScale_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ScalePolicy_FixedScale_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long size_ ;
/**
*
* Number of instances in the instance group.
*
*
* int64 size = 1 [(.yandex.cloud.value) = "1-100"];
* @return The size.
*/
@java.lang.Override
public long getSize() {
return size_;
}
/**
*
* Number of instances in the instance group.
*
*
* int64 size = 1 [(.yandex.cloud.value) = "1-100"];
* @param value The size to set.
* @return This builder for chaining.
*/
public Builder setSize(long value) {
size_ = value;
onChanged();
return this;
}
/**
*
* Number of instances in the instance group.
*
*
* int64 size = 1 [(.yandex.cloud.value) = "1-100"];
* @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.instancegroup.ScalePolicy.FixedScale)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.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),
AUTO_SCALE(2),
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 2: return AUTO_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;
/**
*
* [Manual scaling policy](/docs/compute/concepts/instance-groups/scale#fixed-policy) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale fixed_scale = 1;
* @return Whether the fixedScale field is set.
*/
@java.lang.Override
public boolean hasFixedScale() {
return scaleTypeCase_ == 1;
}
/**
*
* [Manual scaling policy](/docs/compute/concepts/instance-groups/scale#fixed-policy) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale fixed_scale = 1;
* @return The fixedScale.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale getFixedScale() {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
/**
*
* [Manual scaling policy](/docs/compute/concepts/instance-groups/scale#fixed-policy) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.FixedScale fixed_scale = 1;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScaleOrBuilder getFixedScaleOrBuilder() {
if (scaleTypeCase_ == 1) {
return (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale) scaleType_;
}
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.FixedScale.getDefaultInstance();
}
public static final int AUTO_SCALE_FIELD_NUMBER = 2;
/**
*
* [Automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale auto_scale = 2;
* @return Whether the autoScale field is set.
*/
@java.lang.Override
public boolean hasAutoScale() {
return scaleTypeCase_ == 2;
}
/**
*
* [Automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale auto_scale = 2;
* @return The autoScale.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale getAutoScale() {
if (scaleTypeCase_ == 2) {
return (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale) scaleType_;
}
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.getDefaultInstance();
}
/**
*
* [Automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale auto_scale = 2;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScaleOrBuilder getAutoScaleOrBuilder() {
if (scaleTypeCase_ == 2) {
return (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale) scaleType_;
}
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.getDefaultInstance();
}
public static final int TEST_AUTO_SCALE_FIELD_NUMBER = 3;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale testAutoScale_;
/**
*
* Test spec for [automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale test_auto_scale = 3;
* @return Whether the testAutoScale field is set.
*/
@java.lang.Override
public boolean hasTestAutoScale() {
return testAutoScale_ != null;
}
/**
*
* Test spec for [automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
* Test spec for [automatic scaling policy](/docs/compute/concepts/instance-groups/scale#auto-scale) of the instance group.
*
*
* .yandex.cloud.compute.v1.instancegroup.ScalePolicy.AutoScale test_auto_scale = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScaleOrBuilder>
getTestAutoScaleFieldBuilder() {
if (testAutoScaleBuilder_ == null) {
testAutoScaleBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScale.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy.AutoScaleOrBuilder>(
getTestAutoScale(),
getParentForChildren(),
isClean());
testAutoScale_ = null;
}
return testAutoScaleBuilder_;
}
@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.instancegroup.ScalePolicy)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ScalePolicy)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ScalePolicy();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.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.instancegroup.InstanceGroupOuterClass.ScalePolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DeployPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.DeployPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time
* during the update process.
* If [max_expansion] is not specified or set to zero, [max_unavailable] must be set to a non-zero value.
*
*
* int64 max_unavailable = 1 [(.yandex.cloud.value) = "0-100"];
* @return The maxUnavailable.
*/
long getMaxUnavailable();
/**
*
* The maximum number of instances that can be deleted at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_deleting = 2 [(.yandex.cloud.value) = "0-100"];
* @return The maxDeleting.
*/
long getMaxDeleting();
/**
*
* The maximum number of instances that can be created at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_creating = 3 [(.yandex.cloud.value) = "0-100"];
* @return The maxCreating.
*/
long getMaxCreating();
/**
*
* The maximum number of instances that can be temporarily allocated above the group's target size
* during the update process.
* If [max_unavailable] is not specified or set to zero, [max_expansion] must be set to a non-zero value.
*
*
* int64 max_expansion = 6 [(.yandex.cloud.value) = "0-100"];
* @return The maxExpansion.
*/
long getMaxExpansion();
/**
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
*
* .google.protobuf.Duration startup_duration = 7 [(.yandex.cloud.value) = "0m-1h"];
* @return Whether the startupDuration field is set.
*/
boolean hasStartupDuration();
/**
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return The enum numeric value on the wire for strategy.
*/
int getStrategyValue();
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return The strategy.
*/
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy getStrategy();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.DeployPolicy}
*/
public static final class DeployPolicy extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.DeployPolicy)
DeployPolicyOrBuilder {
private static final long serialVersionUID = 0L;
// Use DeployPolicy.newBuilder() to construct.
private DeployPolicy(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DeployPolicy() {
strategy_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DeployPolicy();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private DeployPolicy(
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: {
maxUnavailable_ = input.readInt64();
break;
}
case 16: {
maxDeleting_ = input.readInt64();
break;
}
case 24: {
maxCreating_ = input.readInt64();
break;
}
case 48: {
maxExpansion_ = input.readInt64();
break;
}
case 58: {
com.google.protobuf.Duration.Builder subBuilder = null;
if (startupDuration_ != null) {
subBuilder = startupDuration_.toBuilder();
}
startupDuration_ = input.readMessage(com.google.protobuf.Duration.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(startupDuration_);
startupDuration_ = subBuilder.buildPartial();
}
break;
}
case 64: {
int rawValue = input.readEnum();
strategy_ = rawValue;
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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_DeployPolicy_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_DeployPolicy_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy}
*/
public enum Strategy
implements com.google.protobuf.ProtocolMessageEnum {
/**
* STRATEGY_UNSPECIFIED = 0;
*/
STRATEGY_UNSPECIFIED(0),
/**
*
* Instance Groups can forcefully stop a running instance. This is the default.
*
*
* PROACTIVE = 1;
*/
PROACTIVE(1),
/**
*
* Instance Groups does not stop a running instance.
* Instead, it will wait until the instance stops itself or becomes unhealthy.
*
*
* OPPORTUNISTIC = 2;
*/
OPPORTUNISTIC(2),
UNRECOGNIZED(-1),
;
/**
* STRATEGY_UNSPECIFIED = 0;
*/
public static final int STRATEGY_UNSPECIFIED_VALUE = 0;
/**
*
* Instance Groups can forcefully stop a running instance. This is the default.
*
*
* PROACTIVE = 1;
*/
public static final int PROACTIVE_VALUE = 1;
/**
*
* Instance Groups does not stop a running instance.
* Instead, it will wait until the instance stops itself or becomes unhealthy.
*
*
* OPPORTUNISTIC = 2;
*/
public static final int OPPORTUNISTIC_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 Strategy 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 Strategy forNumber(int value) {
switch (value) {
case 0: return STRATEGY_UNSPECIFIED;
case 1: return PROACTIVE;
case 2: return OPPORTUNISTIC;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Strategy> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Strategy findValueByNumber(int number) {
return Strategy.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.instancegroup.InstanceGroupOuterClass.DeployPolicy.getDescriptor().getEnumTypes().get(0);
}
private static final Strategy[] VALUES = values();
public static Strategy 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 Strategy(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy)
}
public static final int MAX_UNAVAILABLE_FIELD_NUMBER = 1;
private long maxUnavailable_;
/**
*
* The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time
* during the update process.
* If [max_expansion] is not specified or set to zero, [max_unavailable] must be set to a non-zero value.
*
*
* int64 max_unavailable = 1 [(.yandex.cloud.value) = "0-100"];
* @return The maxUnavailable.
*/
@java.lang.Override
public long getMaxUnavailable() {
return maxUnavailable_;
}
public static final int MAX_DELETING_FIELD_NUMBER = 2;
private long maxDeleting_;
/**
*
* The maximum number of instances that can be deleted at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_deleting = 2 [(.yandex.cloud.value) = "0-100"];
* @return The maxDeleting.
*/
@java.lang.Override
public long getMaxDeleting() {
return maxDeleting_;
}
public static final int MAX_CREATING_FIELD_NUMBER = 3;
private long maxCreating_;
/**
*
* The maximum number of instances that can be created at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_creating = 3 [(.yandex.cloud.value) = "0-100"];
* @return The maxCreating.
*/
@java.lang.Override
public long getMaxCreating() {
return maxCreating_;
}
public static final int MAX_EXPANSION_FIELD_NUMBER = 6;
private long maxExpansion_;
/**
*
* The maximum number of instances that can be temporarily allocated above the group's target size
* during the update process.
* If [max_unavailable] is not specified or set to zero, [max_expansion] must be set to a non-zero value.
*
*
* int64 max_expansion = 6 [(.yandex.cloud.value) = "0-100"];
* @return The maxExpansion.
*/
@java.lang.Override
public long getMaxExpansion() {
return maxExpansion_;
}
public static final int STARTUP_DURATION_FIELD_NUMBER = 7;
private com.google.protobuf.Duration startupDuration_;
/**
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
*
* .google.protobuf.Duration startup_duration = 7 [(.yandex.cloud.value) = "0m-1h"];
* @return Whether the startupDuration field is set.
*/
@java.lang.Override
public boolean hasStartupDuration() {
return startupDuration_ != null;
}
/**
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
*
* .google.protobuf.Duration startup_duration = 7 [(.yandex.cloud.value) = "0m-1h"];
*/
@java.lang.Override
public com.google.protobuf.DurationOrBuilder getStartupDurationOrBuilder() {
return getStartupDuration();
}
public static final int STRATEGY_FIELD_NUMBER = 8;
private int strategy_;
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return The enum numeric value on the wire for strategy.
*/
@java.lang.Override public int getStrategyValue() {
return strategy_;
}
/**
*
* Affects the lifecycle of the instance during deployment.
*
* The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time
* during the update process.
* If [max_expansion] is not specified or set to zero, [max_unavailable] must be set to a non-zero value.
*
*
* int64 max_unavailable = 1 [(.yandex.cloud.value) = "0-100"];
* @return The maxUnavailable.
*/
@java.lang.Override
public long getMaxUnavailable() {
return maxUnavailable_;
}
/**
*
* The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time
* during the update process.
* If [max_expansion] is not specified or set to zero, [max_unavailable] must be set to a non-zero value.
*
*
* int64 max_unavailable = 1 [(.yandex.cloud.value) = "0-100"];
* @param value The maxUnavailable to set.
* @return This builder for chaining.
*/
public Builder setMaxUnavailable(long value) {
maxUnavailable_ = value;
onChanged();
return this;
}
/**
*
* The maximum number of running instances that can be taken offline (i.e., stopped or deleted) at the same time
* during the update process.
* If [max_expansion] is not specified or set to zero, [max_unavailable] must be set to a non-zero value.
*
*
* int64 max_unavailable = 1 [(.yandex.cloud.value) = "0-100"];
* @return This builder for chaining.
*/
public Builder clearMaxUnavailable() {
maxUnavailable_ = 0L;
onChanged();
return this;
}
private long maxDeleting_ ;
/**
*
* The maximum number of instances that can be deleted at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_deleting = 2 [(.yandex.cloud.value) = "0-100"];
* @return The maxDeleting.
*/
@java.lang.Override
public long getMaxDeleting() {
return maxDeleting_;
}
/**
*
* The maximum number of instances that can be deleted at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_deleting = 2 [(.yandex.cloud.value) = "0-100"];
* @param value The maxDeleting to set.
* @return This builder for chaining.
*/
public Builder setMaxDeleting(long value) {
maxDeleting_ = value;
onChanged();
return this;
}
/**
*
* The maximum number of instances that can be deleted at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_deleting = 2 [(.yandex.cloud.value) = "0-100"];
* @return This builder for chaining.
*/
public Builder clearMaxDeleting() {
maxDeleting_ = 0L;
onChanged();
return this;
}
private long maxCreating_ ;
/**
*
* The maximum number of instances that can be created at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_creating = 3 [(.yandex.cloud.value) = "0-100"];
* @return The maxCreating.
*/
@java.lang.Override
public long getMaxCreating() {
return maxCreating_;
}
/**
*
* The maximum number of instances that can be created at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_creating = 3 [(.yandex.cloud.value) = "0-100"];
* @param value The maxCreating to set.
* @return This builder for chaining.
*/
public Builder setMaxCreating(long value) {
maxCreating_ = value;
onChanged();
return this;
}
/**
*
* The maximum number of instances that can be created at the same time.
*The value 0 is any number of virtual machines within the allowed values.
*
*
* int64 max_creating = 3 [(.yandex.cloud.value) = "0-100"];
* @return This builder for chaining.
*/
public Builder clearMaxCreating() {
maxCreating_ = 0L;
onChanged();
return this;
}
private long maxExpansion_ ;
/**
*
* The maximum number of instances that can be temporarily allocated above the group's target size
* during the update process.
* If [max_unavailable] is not specified or set to zero, [max_expansion] must be set to a non-zero value.
*
*
* int64 max_expansion = 6 [(.yandex.cloud.value) = "0-100"];
* @return The maxExpansion.
*/
@java.lang.Override
public long getMaxExpansion() {
return maxExpansion_;
}
/**
*
* The maximum number of instances that can be temporarily allocated above the group's target size
* during the update process.
* If [max_unavailable] is not specified or set to zero, [max_expansion] must be set to a non-zero value.
*
*
* int64 max_expansion = 6 [(.yandex.cloud.value) = "0-100"];
* @param value The maxExpansion to set.
* @return This builder for chaining.
*/
public Builder setMaxExpansion(long value) {
maxExpansion_ = value;
onChanged();
return this;
}
/**
*
* The maximum number of instances that can be temporarily allocated above the group's target size
* during the update process.
* If [max_unavailable] is not specified or set to zero, [max_expansion] must be set to a non-zero value.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
*
* .google.protobuf.Duration startup_duration = 7 [(.yandex.cloud.value) = "0m-1h"];
* @return Whether the startupDuration field is set.
*/
public boolean hasStartupDuration() {
return startupDurationBuilder_ != null || startupDuration_ != null;
}
/**
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Instance startup duration.
* Instance will be considered up and running (and start receiving traffic) only after startup_duration
* has elapsed and all health checks are passed.
* See [yandex.cloud.compute.v1.instancegroup.ManagedInstance.Status] for more information.
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return The enum numeric value on the wire for strategy.
*/
@java.lang.Override public int getStrategyValue() {
return strategy_;
}
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @param value The enum numeric value on the wire for strategy to set.
* @return This builder for chaining.
*/
public Builder setStrategyValue(int value) {
strategy_ = value;
onChanged();
return this;
}
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return The strategy.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy getStrategy() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy.valueOf(strategy_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy.UNRECOGNIZED : result;
}
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @param value The strategy to set.
* @return This builder for chaining.
*/
public Builder setStrategy(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy.Strategy value) {
if (value == null) {
throw new NullPointerException();
}
strategy_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Affects the lifecycle of the instance during deployment.
*
*
* .yandex.cloud.compute.v1.instancegroup.DeployPolicy.Strategy strategy = 8;
* @return This builder for chaining.
*/
public Builder clearStrategy() {
strategy_ = 0;
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.instancegroup.DeployPolicy)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.DeployPolicy)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.DeployPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DeployPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new DeployPolicy(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.instancegroup.InstanceGroupOuterClass.DeployPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AllocationPolicyOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.AllocationPolicy)
com.google.protobuf.MessageOrBuilder {
/**
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @return The bytes for platformId.
*/
com.google.protobuf.ByteString
getPlatformIdBytes();
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
*
* .yandex.cloud.compute.v1.instancegroup.ResourcesSpec resources_spec = 4 [(.yandex.cloud.required) = true];
* @return Whether the resourcesSpec field is set.
*/
boolean hasResourcesSpec();
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @return The name.
*/
java.lang.String getName();
/**
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @return The bytes for hostname.
*/
com.google.protobuf.ByteString
getHostnameBytes();
/**
*
* Placement Group
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy placement_policy = 14;
* @return Whether the placementPolicy field is set.
*/
boolean hasPlacementPolicy();
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpecOrBuilder getFilesystemSpecsOrBuilder(
int index);
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.InstanceTemplate}
*/
public static final class InstanceTemplate extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.InstanceTemplate)
InstanceTemplateOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstanceTemplate.newBuilder() to construct.
private InstanceTemplate(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InstanceTemplate() {
description_ = "";
platformId_ = "";
secondaryDiskSpecs_ = java.util.Collections.emptyList();
networkInterfaceSpecs_ = java.util.Collections.emptyList();
serviceAccountId_ = "";
name_ = "";
hostname_ = "";
filesystemSpecs_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new InstanceTemplate();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private InstanceTemplate(
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();
description_ = s;
break;
}
case 18: {
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 26: {
java.lang.String s = input.readStringRequireUtf8();
platformId_ = s;
break;
}
case 34: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.Builder subBuilder = null;
if (resourcesSpec_ != null) {
subBuilder = resourcesSpec_.toBuilder();
}
resourcesSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(resourcesSpec_);
resourcesSpec_ = subBuilder.buildPartial();
}
break;
}
case 42: {
if (!((mutable_bitField0_ & 0x00000002) != 0)) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000002;
}
com.google.protobuf.MapEntry
metadata__ = input.readMessage(
MetadataDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
metadata_.getMutableMap().put(
metadata__.getKey(), metadata__.getValue());
break;
}
case 50: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.Builder subBuilder = null;
if (bootDiskSpec_ != null) {
subBuilder = bootDiskSpec_.toBuilder();
}
bootDiskSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(bootDiskSpec_);
bootDiskSpec_ = subBuilder.buildPartial();
}
break;
}
case 58: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
secondaryDiskSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
secondaryDiskSpecs_.add(
input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.parser(), extensionRegistry));
break;
}
case 66: {
if (!((mutable_bitField0_ & 0x00000008) != 0)) {
networkInterfaceSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000008;
}
networkInterfaceSpecs_.add(
input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.NetworkInterfaceSpec.parser(), extensionRegistry));
break;
}
case 74: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.SchedulingPolicy.Builder subBuilder = null;
if (schedulingPolicy_ != null) {
subBuilder = schedulingPolicy_.toBuilder();
}
schedulingPolicy_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.SchedulingPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(schedulingPolicy_);
schedulingPolicy_ = subBuilder.buildPartial();
}
break;
}
case 82: {
java.lang.String s = input.readStringRequireUtf8();
serviceAccountId_ = s;
break;
}
case 90: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.NetworkSettings.Builder subBuilder = null;
if (networkSettings_ != null) {
subBuilder = networkSettings_.toBuilder();
}
networkSettings_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.NetworkSettings.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(networkSettings_);
networkSettings_ = subBuilder.buildPartial();
}
break;
}
case 98: {
java.lang.String s = input.readStringRequireUtf8();
name_ = s;
break;
}
case 106: {
java.lang.String s = input.readStringRequireUtf8();
hostname_ = s;
break;
}
case 114: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.Builder subBuilder = null;
if (placementPolicy_ != null) {
subBuilder = placementPolicy_.toBuilder();
}
placementPolicy_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(placementPolicy_);
placementPolicy_ = subBuilder.buildPartial();
}
break;
}
case 122: {
if (!((mutable_bitField0_ & 0x00000010) != 0)) {
filesystemSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000010;
}
filesystemSpecs_.add(
input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.parser(), extensionRegistry));
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) != 0)) {
secondaryDiskSpecs_ = java.util.Collections.unmodifiableList(secondaryDiskSpecs_);
}
if (((mutable_bitField0_ & 0x00000008) != 0)) {
networkInterfaceSpecs_ = java.util.Collections.unmodifiableList(networkInterfaceSpecs_);
}
if (((mutable_bitField0_ & 0x00000010) != 0)) {
filesystemSpecs_ = java.util.Collections.unmodifiableList(filesystemSpecs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_InstanceTemplate_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 2:
return internalGetLabels();
case 5:
return internalGetMetadata();
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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_InstanceTemplate_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate.Builder.class);
}
public static final int DESCRIPTION_FIELD_NUMBER = 1;
private volatile java.lang.Object description_;
/**
*
*
* map<string, string> labels = 2 [(.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=128", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int PLATFORM_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object platformId_;
/**
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @return The bytes for platformId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getPlatformIdBytes() {
java.lang.Object ref = platformId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
platformId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCES_SPEC_FIELD_NUMBER = 4;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec resourcesSpec_;
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
*
* .yandex.cloud.compute.v1.instancegroup.ResourcesSpec resources_spec = 4 [(.yandex.cloud.required) = true];
* @return Whether the resourcesSpec field is set.
*/
@java.lang.Override
public boolean hasResourcesSpec() {
return resourcesSpec_ != null;
}
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
*
* .yandex.cloud.compute.v1.instancegroup.ResourcesSpec resources_spec = 4 [(.yandex.cloud.required) = true];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpecOrBuilder getResourcesSpecOrBuilder() {
return getResourcesSpec();
}
public static final int METADATA_FIELD_NUMBER = 5;
private static final class MetadataDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_InstanceTemplate_MetadataEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> metadata_;
private com.google.protobuf.MapField
internalGetMetadata() {
if (metadata_ == null) {
return com.google.protobuf.MapField.emptyMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
*
* map<string, string> metadata = 5 [(.yandex.cloud.size) = "<=128", (.yandex.cloud.length) = "<=262144", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getMetadataOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int BOOT_DISK_SPEC_FIELD_NUMBER = 6;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec bootDiskSpec_;
/**
*
* Boot disk specification that will be attached to the instance.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec boot_disk_spec = 6 [(.yandex.cloud.required) = true];
* @return Whether the bootDiskSpec field is set.
*/
@java.lang.Override
public boolean hasBootDiskSpec() {
return bootDiskSpec_ != null;
}
/**
*
* Boot disk specification that will be attached to the instance.
*
*
* .yandex.cloud.compute.v1.instancegroup.NetworkSettings network_settings = 11;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.NetworkSettingsOrBuilder getNetworkSettingsOrBuilder() {
return getNetworkSettings();
}
public static final int NAME_FIELD_NUMBER = 12;
private volatile java.lang.Object name_;
/**
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @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 HOSTNAME_FIELD_NUMBER = 13;
private volatile java.lang.Object hostname_;
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @return The bytes for hostname.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getHostnameBytes() {
java.lang.Object ref = hostname_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int PLACEMENT_POLICY_FIELD_NUMBER = 14;
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy placementPolicy_;
/**
*
* Placement Group
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy placement_policy = 14;
* @return Whether the placementPolicy field is set.
*/
@java.lang.Override
public boolean hasPlacementPolicy() {
return placementPolicy_ != null;
}
/**
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy placement_policy = 14;
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicyOrBuilder getPlacementPolicyOrBuilder() {
return getPlacementPolicy();
}
public static final int FILESYSTEM_SPECS_FIELD_NUMBER = 15;
private java.util.List filesystemSpecs_;
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
@java.lang.Override
public int getFilesystemSpecsCount() {
return filesystemSpecs_.size();
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @return The bytes for platformId.
*/
public com.google.protobuf.ByteString
getPlatformIdBytes() {
java.lang.Object ref = platformId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
platformId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @param value The platformId to set.
* @return This builder for chaining.
*/
public Builder setPlatformId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
platformId_ = value;
onChanged();
return this;
}
/**
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @return This builder for chaining.
*/
public Builder clearPlatformId() {
platformId_ = getDefaultInstance().getPlatformId();
onChanged();
return this;
}
/**
*
* ID of the hardware platform configuration for the instance.
* Platforms allows you to create various types of instances: with a large amount of memory,
* with a large number of cores, with a burstable performance.
* For more information, see [Platforms](/docs/compute/concepts/vm-platforms).
*
*
* string platform_id = 3 [(.yandex.cloud.required) = true];
* @param value The bytes for platformId to set.
* @return This builder for chaining.
*/
public Builder setPlatformIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
platformId_ = value;
onChanged();
return this;
}
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec resourcesSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpecOrBuilder> resourcesSpecBuilder_;
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
*
* .yandex.cloud.compute.v1.instancegroup.ResourcesSpec resources_spec = 4 [(.yandex.cloud.required) = true];
* @return Whether the resourcesSpec field is set.
*/
public boolean hasResourcesSpec() {
return resourcesSpecBuilder_ != null || resourcesSpec_ != null;
}
/**
*
* Computing resources of the instance such as the amount of memory and number of cores.
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* The metadata `key:value` pairs assigned to this instance template. This includes custom metadata and predefined keys.
* Metadata values may contain one of the supported placeholders:
* {instance_group.id}
* {instance.short_id}
* {instance.index}
* {instance.index_in_zone}
* {instance.zone_id}
* InstanceGroup and Instance labels may be copied to metadata following way:
* {instance_group.labels.some_label_key}
* {instance.labels.another_label_key}
* These placeholders will be substituted for each created instance anywhere in the value text.
* In the rare case the value requires to contain this placeholder explicitly,
* it must be escaped with double brackets, in example {instance.index}.
* For example, you may use the metadata in order to provide your public SSH key to the instance.
* For more information, see [Metadata](/docs/compute/concepts/vm-metadata).
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @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 instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @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 instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
onChanged();
return this;
}
/**
*
* Name of the instance.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, default is used: {instance_group.id}-{instance.short_id}
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string name = 12 [(.yandex.cloud.length) = "<=128"];
* @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 hostname_ = "";
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @return The bytes for hostname.
*/
public com.google.protobuf.ByteString
getHostnameBytes() {
java.lang.Object ref = hostname_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
hostname_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @param value The hostname to set.
* @return This builder for chaining.
*/
public Builder setHostname(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
hostname_ = value;
onChanged();
return this;
}
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @return This builder for chaining.
*/
public Builder clearHostname() {
hostname_ = getDefaultInstance().getHostname();
onChanged();
return this;
}
/**
*
* Host name for the instance.
* This field is used to generate the [yandex.cloud.compute.v1.Instance.fqdn] value.
* The host name must be unique within the network and region.
* If not specified, the host name will be equal to [yandex.cloud.compute.v1.Instance.id] of the instance
* and FQDN will be `<id>.auto.internal`. Otherwise FQDN will be `<hostname>.<region_id>.internal`.
* In order to be unique it must contain at least on of instance unique placeholders:
* {instance.short_id}
* {instance.index}
* combination of {instance.zone_id} and {instance.index_in_zone}
* Example: my-instance-{instance.index}
* If not set, `name` value will be used
* It may also contain another placeholders, see metadata doc for full list.
*
*
* string hostname = 13 [(.yandex.cloud.length) = "<=128"];
* @param value The bytes for hostname to set.
* @return This builder for chaining.
*/
public Builder setHostnameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
hostname_ = value;
onChanged();
return this;
}
private yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy placementPolicy_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicyOrBuilder> placementPolicyBuilder_;
/**
*
* Placement Group
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy placement_policy = 14;
* @return Whether the placementPolicy field is set.
*/
public boolean hasPlacementPolicy() {
return placementPolicyBuilder_ != null || placementPolicy_ != null;
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public int getFilesystemSpecsCount() {
if (filesystemSpecsBuilder_ == null) {
return filesystemSpecs_.size();
} else {
return filesystemSpecsBuilder_.getCount();
}
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public Builder setFilesystemSpecs(
int index, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec value) {
if (filesystemSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilesystemSpecsIsMutable();
filesystemSpecs_.set(index, value);
onChanged();
} else {
filesystemSpecsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public Builder addFilesystemSpecs(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec value) {
if (filesystemSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilesystemSpecsIsMutable();
filesystemSpecs_.add(value);
onChanged();
} else {
filesystemSpecsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public Builder addFilesystemSpecs(
int index, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec value) {
if (filesystemSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFilesystemSpecsIsMutable();
filesystemSpecs_.add(index, value);
onChanged();
} else {
filesystemSpecsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Builder getFilesystemSpecsBuilder(
int index) {
return getFilesystemSpecsFieldBuilder().getBuilder(index);
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpecOrBuilder getFilesystemSpecsOrBuilder(
int index) {
if (filesystemSpecsBuilder_ == null) {
return filesystemSpecs_.get(index); } else {
return filesystemSpecsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
* Array of filesystems to attach to the instance.
* The filesystems must reside in the same availability zone as the instance.
* To use the instance with an attached filesystem, the latter must be mounted.
* For details, see [documentation](/docs/compute/operations/filesystem/attach-to-vm).
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec filesystem_specs = 15;
*/
public java.util.List
getFilesystemSpecsBuilderList() {
return getFilesystemSpecsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpecOrBuilder>
getFilesystemSpecsFieldBuilder() {
if (filesystemSpecsBuilder_ == null) {
filesystemSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpecOrBuilder>(
filesystemSpecs_,
((bitField0_ & 0x00000010) != 0),
getParentForChildren(),
isClean());
filesystemSpecs_ = null;
}
return filesystemSpecsBuilder_;
}
@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.instancegroup.InstanceTemplate)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.InstanceTemplate)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.InstanceTemplate getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstanceTemplate parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new InstanceTemplate(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.instancegroup.InstanceGroupOuterClass.InstanceTemplate getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AttachedFilesystemSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
int getModeValue();
/**
*
* Mode of access to the filesystem that should be attached.
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @return The bytes for deviceName.
*/
com.google.protobuf.ByteString
getDeviceNameBytes();
/**
*
*
* string filesystem_id = 3 [(.yandex.cloud.pattern) = "[-a-zA-Z0-9._{}]*", (.yandex.cloud.length) = "<=128"];
* @return The bytes for filesystemId.
*/
com.google.protobuf.ByteString
getFilesystemIdBytes();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec}
*/
public static final class AttachedFilesystemSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec)
AttachedFilesystemSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttachedFilesystemSpec.newBuilder() to construct.
private AttachedFilesystemSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AttachedFilesystemSpec() {
mode_ = 0;
deviceName_ = "";
filesystemId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AttachedFilesystemSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttachedFilesystemSpec(
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: {
int rawValue = input.readEnum();
mode_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
deviceName_ = s;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
filesystemId_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedFilesystemSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedFilesystemSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode}
*/
public enum Mode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MODE_UNSPECIFIED = 0;
*/
MODE_UNSPECIFIED(0),
/**
*
* Read-only access.
*
*
* READ_ONLY = 1;
*/
READ_ONLY(1),
/**
*
* Read/Write access. Default value.
*
*
* READ_WRITE = 2;
*/
READ_WRITE(2),
UNRECOGNIZED(-1),
;
/**
* MODE_UNSPECIFIED = 0;
*/
public static final int MODE_UNSPECIFIED_VALUE = 0;
/**
*
* Read-only access.
*
*
* READ_ONLY = 1;
*/
public static final int READ_ONLY_VALUE = 1;
/**
*
* Read/Write access. Default value.
*
*
* READ_WRITE = 2;
*/
public static final int READ_WRITE_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 Mode 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 Mode forNumber(int value) {
switch (value) {
case 0: return MODE_UNSPECIFIED;
case 1: return READ_ONLY;
case 2: return READ_WRITE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Mode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Mode findValueByNumber(int number) {
return Mode.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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.getDescriptor().getEnumTypes().get(0);
}
private static final Mode[] VALUES = values();
public static Mode 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 Mode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode)
}
public static final int MODE_FIELD_NUMBER = 1;
private int mode_;
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @return The mode.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode getMode() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.valueOf(mode_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.UNRECOGNIZED : result;
}
public static final int DEVICE_NAME_FIELD_NUMBER = 2;
private volatile java.lang.Object deviceName_;
/**
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @return The bytes for deviceName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getDeviceNameBytes() {
java.lang.Object ref = deviceName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deviceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int FILESYSTEM_ID_FIELD_NUMBER = 3;
private volatile java.lang.Object filesystemId_;
/**
*
*
* string filesystem_id = 3 [(.yandex.cloud.pattern) = "[-a-zA-Z0-9._{}]*", (.yandex.cloud.length) = "<=128"];
* @return The bytes for filesystemId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFilesystemIdBytes() {
java.lang.Object ref = filesystemId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
filesystemId_ = 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 (mode_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.MODE_UNSPECIFIED.getNumber()) {
output.writeEnum(1, mode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, deviceName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filesystemId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, filesystemId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (mode_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.MODE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, mode_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(deviceName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, deviceName_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(filesystemId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, filesystemId_);
}
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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec) obj;
if (mode_ != other.mode_) return false;
if (!getDeviceName()
.equals(other.getDeviceName())) return false;
if (!getFilesystemId()
.equals(other.getFilesystemId())) 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) + MODE_FIELD_NUMBER;
hash = (53 * hash) + mode_;
hash = (37 * hash) + DEVICE_NAME_FIELD_NUMBER;
hash = (53 * hash) + getDeviceName().hashCode();
hash = (37 * hash) + FILESYSTEM_ID_FIELD_NUMBER;
hash = (53 * hash) + getFilesystemId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec 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.instancegroup.AttachedFilesystemSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedFilesystemSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedFilesystemSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.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();
mode_ = 0;
deviceName_ = "";
filesystemId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedFilesystemSpec_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec(this);
result.mode_ = mode_;
result.deviceName_ = deviceName_;
result.filesystemId_ = filesystemId_;
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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.getDefaultInstance()) return this;
if (other.mode_ != 0) {
setModeValue(other.getModeValue());
}
if (!other.getDeviceName().isEmpty()) {
deviceName_ = other.deviceName_;
onChanged();
}
if (!other.getFilesystemId().isEmpty()) {
filesystemId_ = other.filesystemId_;
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.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int mode_ = 0;
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @return The enum numeric value on the wire for mode.
*/
@java.lang.Override public int getModeValue() {
return mode_;
}
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @param value The enum numeric value on the wire for mode to set.
* @return This builder for chaining.
*/
public Builder setModeValue(int value) {
mode_ = value;
onChanged();
return this;
}
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @return The mode.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode getMode() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.valueOf(mode_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode.UNRECOGNIZED : result;
}
/**
*
* Mode of access to the filesystem that should be attached.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedFilesystemSpec.Mode mode = 1;
* @param value The mode to set.
* @return This builder for chaining.
*/
public Builder setMode(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedFilesystemSpec.Mode value) {
if (value == null) {
throw new NullPointerException();
}
mode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Mode of access to the filesystem that should be attached.
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @return The bytes for deviceName.
*/
public com.google.protobuf.ByteString
getDeviceNameBytes() {
java.lang.Object ref = deviceName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
deviceName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @param value The deviceName to set.
* @return This builder for chaining.
*/
public Builder setDeviceName(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
deviceName_ = value;
onChanged();
return this;
}
/**
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @return This builder for chaining.
*/
public Builder clearDeviceName() {
deviceName_ = getDefaultInstance().getDeviceName();
onChanged();
return this;
}
/**
*
* Name of the device representing the filesystem on the instance.
* The name should be used for referencing the filesystem from within the instance
* when it's being mounted, resized etc.
* If not specified, a random value will be generated.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @param value The bytes for deviceName to set.
* @return This builder for chaining.
*/
public Builder setDeviceNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
deviceName_ = value;
onChanged();
return this;
}
private java.lang.Object filesystemId_ = "";
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @return The bytes for key.
*/
com.google.protobuf.ByteString
getKeyBytes();
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The enum numeric value on the wire for op.
*/
int getOpValue();
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The op.
*/
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator getOp();
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return A list containing the values.
*/
java.util.List
getValuesList();
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return The count of values.
*/
int getValuesCount();
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the element to return.
* @return The values at the given index.
*/
java.lang.String getValues(int index);
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the value to return.
* @return The bytes of the values at the given index.
*/
com.google.protobuf.ByteString
getValuesBytes(int index);
}
/**
*
* Affinity definition
*
*
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule}
*/
public static final class HostAffinityRule extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule)
HostAffinityRuleOrBuilder {
private static final long serialVersionUID = 0L;
// Use HostAffinityRule.newBuilder() to construct.
private HostAffinityRule(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private HostAffinityRule() {
key_ = "";
op_ = 0;
values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new HostAffinityRule();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private HostAffinityRule(
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();
key_ = s;
break;
}
case 16: {
int rawValue = input.readEnum();
op_ = rawValue;
break;
}
case 26: {
java.lang.String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
values_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000001;
}
values_.add(s);
break;
}
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000001) != 0)) {
values_ = values_.getUnmodifiableView();
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_PlacementPolicy_HostAffinityRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_PlacementPolicy_HostAffinityRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator}
*/
public enum Operator
implements com.google.protobuf.ProtocolMessageEnum {
/**
* OPERATOR_UNSPECIFIED = 0;
*/
OPERATOR_UNSPECIFIED(0),
/**
* IN = 1;
*/
IN(1),
/**
* NOT_IN = 2;
*/
NOT_IN(2),
UNRECOGNIZED(-1),
;
/**
* OPERATOR_UNSPECIFIED = 0;
*/
public static final int OPERATOR_UNSPECIFIED_VALUE = 0;
/**
* IN = 1;
*/
public static final int IN_VALUE = 1;
/**
* NOT_IN = 2;
*/
public static final int NOT_IN_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 Operator 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 Operator forNumber(int value) {
switch (value) {
case 0: return OPERATOR_UNSPECIFIED;
case 1: return IN;
case 2: return NOT_IN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Operator> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Operator findValueByNumber(int number) {
return Operator.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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.getDescriptor().getEnumTypes().get(0);
}
private static final Operator[] VALUES = values();
public static Operator 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 Operator(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator)
}
public static final int KEY_FIELD_NUMBER = 1;
private volatile java.lang.Object key_;
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @return The bytes for key.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OP_FIELD_NUMBER = 2;
private int op_;
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The enum numeric value on the wire for op.
*/
@java.lang.Override public int getOpValue() {
return op_;
}
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The op.
*/
@java.lang.Override public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator getOp() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.valueOf(op_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.UNRECOGNIZED : result;
}
public static final int VALUES_FIELD_NUMBER = 3;
private com.google.protobuf.LazyStringList values_;
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return A list containing the values.
*/
public com.google.protobuf.ProtocolStringList
getValuesList() {
return values_;
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return The count of values.
*/
public int getValuesCount() {
return values_.size();
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the element to return.
* @return The values at the given index.
*/
public java.lang.String getValues(int index) {
return values_.get(index);
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the value to return.
* @return The bytes of the values at the given index.
*/
public com.google.protobuf.ByteString
getValuesBytes(int index) {
return values_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, key_);
}
if (op_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.OPERATOR_UNSPECIFIED.getNumber()) {
output.writeEnum(2, op_);
}
for (int i = 0; i < values_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, values_.getRaw(i));
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(key_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, key_);
}
if (op_ != yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.OPERATOR_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, op_);
}
{
int dataSize = 0;
for (int i = 0; i < values_.size(); i++) {
dataSize += computeStringSizeNoTag(values_.getRaw(i));
}
size += dataSize;
size += 1 * getValuesList().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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule) obj;
if (!getKey()
.equals(other.getKey())) return false;
if (op_ != other.op_) return false;
if (!getValuesList()
.equals(other.getValuesList())) 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) + KEY_FIELD_NUMBER;
hash = (53 * hash) + getKey().hashCode();
hash = (37 * hash) + OP_FIELD_NUMBER;
hash = (53 * hash) + op_;
if (getValuesCount() > 0) {
hash = (37 * hash) + VALUES_FIELD_NUMBER;
hash = (53 * hash) + getValuesList().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule 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;
}
/**
*
* Affinity definition
*
*
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRuleOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_PlacementPolicy_HostAffinityRule_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_PlacementPolicy_HostAffinityRule_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.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();
key_ = "";
op_ = 0;
values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_PlacementPolicy_HostAffinityRule_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule(this);
int from_bitField0_ = bitField0_;
result.key_ = key_;
result.op_ = op_;
if (((bitField0_ & 0x00000001) != 0)) {
values_ = values_.getUnmodifiableView();
bitField0_ = (bitField0_ & ~0x00000001);
}
result.values_ = values_;
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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.getDefaultInstance()) return this;
if (!other.getKey().isEmpty()) {
key_ = other.key_;
onChanged();
}
if (other.op_ != 0) {
setOpValue(other.getOpValue());
}
if (!other.values_.isEmpty()) {
if (values_.isEmpty()) {
values_ = other.values_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureValuesIsMutable();
values_.addAll(other.values_);
}
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.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.lang.Object key_ = "";
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @return The bytes for key.
*/
public com.google.protobuf.ByteString
getKeyBytes() {
java.lang.Object ref = key_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
key_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @param value The key to set.
* @return This builder for chaining.
*/
public Builder setKey(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
key_ = value;
onChanged();
return this;
}
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @return This builder for chaining.
*/
public Builder clearKey() {
key_ = getDefaultInstance().getKey();
onChanged();
return this;
}
/**
*
* Affinity label or one of reserved values - 'yc.hostId', 'yc.hostGroupId'
*
*
* string key = 1;
* @param value The bytes for key to set.
* @return This builder for chaining.
*/
public Builder setKeyBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
key_ = value;
onChanged();
return this;
}
private int op_ = 0;
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The enum numeric value on the wire for op.
*/
@java.lang.Override public int getOpValue() {
return op_;
}
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @param value The enum numeric value on the wire for op to set.
* @return This builder for chaining.
*/
public Builder setOpValue(int value) {
op_ = value;
onChanged();
return this;
}
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return The op.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator getOp() {
@SuppressWarnings("deprecation")
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator result = yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.valueOf(op_);
return result == null ? yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator.UNRECOGNIZED : result;
}
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @param value The op to set.
* @return This builder for chaining.
*/
public Builder setOp(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Operator value) {
if (value == null) {
throw new NullPointerException();
}
op_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Include or exclude action
*
*
* .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule.Operator op = 2;
* @return This builder for chaining.
*/
public Builder clearOp() {
op_ = 0;
onChanged();
return this;
}
private com.google.protobuf.LazyStringList values_ = com.google.protobuf.LazyStringArrayList.EMPTY;
private void ensureValuesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
values_ = new com.google.protobuf.LazyStringArrayList(values_);
bitField0_ |= 0x00000001;
}
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return A list containing the values.
*/
public com.google.protobuf.ProtocolStringList
getValuesList() {
return values_.getUnmodifiableView();
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @return The count of values.
*/
public int getValuesCount() {
return values_.size();
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the element to return.
* @return The values at the given index.
*/
public java.lang.String getValues(int index) {
return values_.get(index);
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index of the value to return.
* @return The bytes of the values at the given index.
*/
public com.google.protobuf.ByteString
getValuesBytes(int index) {
return values_.getByteString(index);
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param index The index to set the value at.
* @param value The values to set.
* @return This builder for chaining.
*/
public Builder setValues(
int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.set(index, value);
onChanged();
return this;
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param value The values to add.
* @return This builder for chaining.
*/
public Builder addValues(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureValuesIsMutable();
values_.add(value);
onChanged();
return this;
}
/**
*
* Affinity value or host ID or host group ID
*
*
* repeated string values = 3;
* @param values The values to add.
* @return This builder for chaining.
*/
public Builder addAllValues(
java.lang.Iterable values) {
ensureValuesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, values_);
onChanged();
return this;
}
/**
*
* List of affinity rules. Scheduler will attempt to allocate instances according to order of rules.
*
*
* repeated .yandex.cloud.compute.v1.instancegroup.PlacementPolicy.HostAffinityRule host_affinity_rules = 2;
*/
public java.util.List
getHostAffinityRulesBuilderList() {
return getHostAffinityRulesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRuleOrBuilder>
getHostAffinityRulesFieldBuilder() {
if (hostAffinityRulesBuilder_ == null) {
hostAffinityRulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRule.Builder, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy.HostAffinityRuleOrBuilder>(
hostAffinityRules_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
hostAffinityRules_ = null;
}
return hostAffinityRulesBuilder_;
}
@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.instancegroup.PlacementPolicy)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.PlacementPolicy)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.PlacementPolicy getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public PlacementPolicy parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new PlacementPolicy(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.instancegroup.InstanceGroupOuterClass.PlacementPolicy getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface ResourcesSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.ResourcesSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* The amount of memory available to the instance, specified in bytes.
*
*
* int64 memory = 1 [(.yandex.cloud.value) = "<=824633720832"];
* @return The memory.
*/
long getMemory();
/**
*
* The number of cores available to the instance.
*
*
* int64 cores = 2 [(.yandex.cloud.value) = "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,52,56,60,64,68,72,76,80"];
* @return The cores.
*/
long getCores();
/**
*
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
*
* int64 core_fraction = 3 [(.yandex.cloud.value) = "0,5,20,50,100"];
* @return The coreFraction.
*/
long getCoreFraction();
/**
*
* The number of GPUs available to the instance.
*
*
* int64 gpus = 4 [(.yandex.cloud.value) = "0,1,2,4"];
* @return The gpus.
*/
long getGpus();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.ResourcesSpec}
*/
public static final class ResourcesSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.ResourcesSpec)
ResourcesSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use ResourcesSpec.newBuilder() to construct.
private ResourcesSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private ResourcesSpec() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new ResourcesSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private ResourcesSpec(
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: {
memory_ = input.readInt64();
break;
}
case 16: {
cores_ = input.readInt64();
break;
}
case 24: {
coreFraction_ = input.readInt64();
break;
}
case 32: {
gpus_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ResourcesSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ResourcesSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.Builder.class);
}
public static final int MEMORY_FIELD_NUMBER = 1;
private long memory_;
/**
*
* The amount of memory available to the instance, specified in bytes.
*
*
* int64 memory = 1 [(.yandex.cloud.value) = "<=824633720832"];
* @return The memory.
*/
@java.lang.Override
public long getMemory() {
return memory_;
}
public static final int CORES_FIELD_NUMBER = 2;
private long cores_;
/**
*
* The number of cores available to the instance.
*
*
* int64 cores = 2 [(.yandex.cloud.value) = "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,52,56,60,64,68,72,76,80"];
* @return The cores.
*/
@java.lang.Override
public long getCores() {
return cores_;
}
public static final int CORE_FRACTION_FIELD_NUMBER = 3;
private long coreFraction_;
/**
*
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
*
* int64 core_fraction = 3 [(.yandex.cloud.value) = "0,5,20,50,100"];
* @return The coreFraction.
*/
@java.lang.Override
public long getCoreFraction() {
return coreFraction_;
}
public static final int GPUS_FIELD_NUMBER = 4;
private long gpus_;
/**
*
* The number of GPUs available to the instance.
*
*
* int64 gpus = 4 [(.yandex.cloud.value) = "0,1,2,4"];
* @return The gpus.
*/
@java.lang.Override
public long getGpus() {
return gpus_;
}
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 (memory_ != 0L) {
output.writeInt64(1, memory_);
}
if (cores_ != 0L) {
output.writeInt64(2, cores_);
}
if (coreFraction_ != 0L) {
output.writeInt64(3, coreFraction_);
}
if (gpus_ != 0L) {
output.writeInt64(4, gpus_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (memory_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(1, memory_);
}
if (cores_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, cores_);
}
if (coreFraction_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, coreFraction_);
}
if (gpus_ != 0L) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(4, gpus_);
}
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.instancegroup.InstanceGroupOuterClass.ResourcesSpec)) {
return super.equals(obj);
}
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec other = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec) obj;
if (getMemory()
!= other.getMemory()) return false;
if (getCores()
!= other.getCores()) return false;
if (getCoreFraction()
!= other.getCoreFraction()) return false;
if (getGpus()
!= other.getGpus()) 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) + MEMORY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getMemory());
hash = (37 * hash) + CORES_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCores());
hash = (37 * hash) + CORE_FRACTION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCoreFraction());
hash = (37 * hash) + GPUS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getGpus());
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.InstanceGroupOuterClass.ResourcesSpec 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.instancegroup.ResourcesSpec}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.compute.v1.instancegroup.ResourcesSpec)
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpecOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ResourcesSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ResourcesSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.Builder.class);
}
// Construct using yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.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();
memory_ = 0L;
cores_ = 0L;
coreFraction_ = 0L;
gpus_ = 0L;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_ResourcesSpec_descriptor;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec getDefaultInstanceForType() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec build() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec buildPartial() {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec result = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec(this);
result.memory_ = memory_;
result.cores_ = cores_;
result.coreFraction_ = coreFraction_;
result.gpus_ = gpus_;
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.instancegroup.InstanceGroupOuterClass.ResourcesSpec) {
return mergeFrom((yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec other) {
if (other == yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec.getDefaultInstance()) return this;
if (other.getMemory() != 0L) {
setMemory(other.getMemory());
}
if (other.getCores() != 0L) {
setCores(other.getCores());
}
if (other.getCoreFraction() != 0L) {
setCoreFraction(other.getCoreFraction());
}
if (other.getGpus() != 0L) {
setGpus(other.getGpus());
}
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.instancegroup.InstanceGroupOuterClass.ResourcesSpec parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private long memory_ ;
/**
*
* The amount of memory available to the instance, specified in bytes.
*
*
* int64 memory = 1 [(.yandex.cloud.value) = "<=824633720832"];
* @return The memory.
*/
@java.lang.Override
public long getMemory() {
return memory_;
}
/**
*
* The amount of memory available to the instance, specified in bytes.
*
*
* int64 memory = 1 [(.yandex.cloud.value) = "<=824633720832"];
* @param value The memory to set.
* @return This builder for chaining.
*/
public Builder setMemory(long value) {
memory_ = value;
onChanged();
return this;
}
/**
*
* The amount of memory available to the instance, specified in bytes.
*
*
* int64 memory = 1 [(.yandex.cloud.value) = "<=824633720832"];
* @return This builder for chaining.
*/
public Builder clearMemory() {
memory_ = 0L;
onChanged();
return this;
}
private long cores_ ;
/**
*
* The number of cores available to the instance.
*
*
* int64 cores = 2 [(.yandex.cloud.value) = "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,52,56,60,64,68,72,76,80"];
* @return The cores.
*/
@java.lang.Override
public long getCores() {
return cores_;
}
/**
*
* The number of cores available to the instance.
*
*
* int64 cores = 2 [(.yandex.cloud.value) = "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,52,56,60,64,68,72,76,80"];
* @param value The cores to set.
* @return This builder for chaining.
*/
public Builder setCores(long value) {
cores_ = value;
onChanged();
return this;
}
/**
*
* The number of cores available to the instance.
*
*
* int64 cores = 2 [(.yandex.cloud.value) = "2,4,6,8,10,12,14,16,18,20,22,24,26,28,30,32,34,36,40,44,48,52,56,60,64,68,72,76,80"];
* @return This builder for chaining.
*/
public Builder clearCores() {
cores_ = 0L;
onChanged();
return this;
}
private long coreFraction_ ;
/**
*
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
*
* int64 core_fraction = 3 [(.yandex.cloud.value) = "0,5,20,50,100"];
* @return The coreFraction.
*/
@java.lang.Override
public long getCoreFraction() {
return coreFraction_;
}
/**
*
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
*
* int64 core_fraction = 3 [(.yandex.cloud.value) = "0,5,20,50,100"];
* @param value The coreFraction to set.
* @return This builder for chaining.
*/
public Builder setCoreFraction(long value) {
coreFraction_ = value;
onChanged();
return this;
}
/**
*
* Baseline level of CPU performance with the ability to burst performance above that baseline level.
* This field sets baseline performance for each core.
*
*
* int64 core_fraction = 3 [(.yandex.cloud.value) = "0,5,20,50,100"];
* @return This builder for chaining.
*/
public Builder clearCoreFraction() {
coreFraction_ = 0L;
onChanged();
return this;
}
private long gpus_ ;
/**
*
* The number of GPUs available to the instance.
*
*
* int64 gpus = 4 [(.yandex.cloud.value) = "0,1,2,4"];
* @return The gpus.
*/
@java.lang.Override
public long getGpus() {
return gpus_;
}
/**
*
* The number of GPUs available to the instance.
*
*
* int64 gpus = 4 [(.yandex.cloud.value) = "0,1,2,4"];
* @param value The gpus to set.
* @return This builder for chaining.
*/
public Builder setGpus(long value) {
gpus_ = value;
onChanged();
return this;
}
/**
*
* The number of GPUs available to the instance.
*
*
* int64 gpus = 4 [(.yandex.cloud.value) = "0,1,2,4"];
* @return This builder for chaining.
*/
public Builder clearGpus() {
gpus_ = 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.instancegroup.ResourcesSpec)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.compute.v1.instancegroup.ResourcesSpec)
private static final yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec();
}
public static yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.ResourcesSpec getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public ResourcesSpec parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new ResourcesSpec(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.instancegroup.InstanceGroupOuterClass.ResourcesSpec getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface AttachedDiskSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec)
com.google.protobuf.MessageOrBuilder {
/**
*
* Access mode to the Disk resource.
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec.Mode mode = 1 [(.yandex.cloud.required) = true];
* @return The enum numeric value on the wire for mode.
*/
int getModeValue();
/**
*
* Serial number that is reflected in the /dev/disk/by-id/ tree
* of a Linux operating system running within the instance.
* This value can be used to reference the device for mounting, resizing, and so on, from within the instance.
*
* Serial number that is reflected in the /dev/disk/by-id/ tree
* of a Linux operating system running within the instance.
* This value can be used to reference the device for mounting, resizing, and so on, from within the instance.
*
*
* string device_name = 2 [(.yandex.cloud.pattern) = "|[a-z][-_0-9a-z]{0,19}"];
* @return The bytes for deviceName.
*/
com.google.protobuf.ByteString
getDeviceNameBytes();
/**
*
*oneof disk_spec or disk_id
* Disk specification that is attached to the instance. For more information, see [Disks](/docs/compute/concepts/disk).
*
*
* .yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec.DiskSpec disk_spec = 3 [(.yandex.cloud.required) = true];
* @return Whether the diskSpec field is set.
*/
boolean hasDiskSpec();
/**
*
*oneof disk_spec or disk_id
* Disk specification that is attached to the instance. For more information, see [Disks](/docs/compute/concepts/disk).
*
* When set can be later used to change DiskSpec of actual disk.
*
*
* string name = 7 [(.yandex.cloud.length) = "<=128"];
* @return The name.
*/
java.lang.String getName();
/**
*
* When set can be later used to change DiskSpec of actual disk.
*
*
* string name = 7 [(.yandex.cloud.length) = "<=128"];
* @return The bytes for name.
*/
com.google.protobuf.ByteString
getNameBytes();
}
/**
* Protobuf type {@code yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec}
*/
public static final class AttachedDiskSpec extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec)
AttachedDiskSpecOrBuilder {
private static final long serialVersionUID = 0L;
// Use AttachedDiskSpec.newBuilder() to construct.
private AttachedDiskSpec(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AttachedDiskSpec() {
mode_ = 0;
deviceName_ = "";
diskId_ = "";
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AttachedDiskSpec();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private AttachedDiskSpec(
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: {
int rawValue = input.readEnum();
mode_ = rawValue;
break;
}
case 18: {
java.lang.String s = input.readStringRequireUtf8();
deviceName_ = s;
break;
}
case 26: {
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.DiskSpec.Builder subBuilder = null;
if (diskSpec_ != null) {
subBuilder = diskSpec_.toBuilder();
}
diskSpec_ = input.readMessage(yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.DiskSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(diskSpec_);
diskSpec_ = subBuilder.buildPartial();
}
break;
}
case 34: {
java.lang.String s = input.readStringRequireUtf8();
diskId_ = s;
break;
}
case 58: {
java.lang.String s = input.readStringRequireUtf8();
name_ = 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.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedDiskSpec_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.internal_static_yandex_cloud_compute_v1_instancegroup_AttachedDiskSpec_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.class, yandex.cloud.api.compute.v1.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.Builder.class);
}
/**
* Protobuf enum {@code yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec.Mode}
*/
public enum Mode
implements com.google.protobuf.ProtocolMessageEnum {
/**
* MODE_UNSPECIFIED = 0;
*/
MODE_UNSPECIFIED(0),
/**
*
* Read-only access.
*
*
* READ_ONLY = 1;
*/
READ_ONLY(1),
/**
*
* Read/Write access.
*
*
* READ_WRITE = 2;
*/
READ_WRITE(2),
UNRECOGNIZED(-1),
;
/**
* MODE_UNSPECIFIED = 0;
*/
public static final int MODE_UNSPECIFIED_VALUE = 0;
/**
*
* Read-only access.
*
*
* READ_ONLY = 1;
*/
public static final int READ_ONLY_VALUE = 1;
/**
*
* Read/Write access.
*
*
* READ_WRITE = 2;
*/
public static final int READ_WRITE_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 Mode 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 Mode forNumber(int value) {
switch (value) {
case 0: return MODE_UNSPECIFIED;
case 1: return READ_ONLY;
case 2: return READ_WRITE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
Mode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public Mode findValueByNumber(int number) {
return Mode.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.instancegroup.InstanceGroupOuterClass.AttachedDiskSpec.getDescriptor().getEnumTypes().get(0);
}
private static final Mode[] VALUES = values();
public static Mode 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 Mode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec.Mode)
}
public interface DiskSpecOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.compute.v1.instancegroup.AttachedDiskSpec.DiskSpec)
com.google.protobuf.MessageOrBuilder {
/**
*