yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yandex/cloud/loadtesting/api/v1/agent/create_compute_instance.proto
package yandex.cloud.api.loadtesting.api.v1.agent;
public final class CreateComputeInstanceOuterClass {
private CreateComputeInstanceOuterClass() {}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistryLite registry) {
}
public static void registerAllExtensions(
com.google.protobuf.ExtensionRegistry registry) {
registerAllExtensions(
(com.google.protobuf.ExtensionRegistryLite) registry);
}
public interface CreateComputeInstanceOrBuilder extends
// @@protoc_insertion_point(interface_extends:yandex.cloud.loadtesting.api.v1.agent.CreateComputeInstance)
com.google.protobuf.MessageOrBuilder {
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
int getLabelsCount();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
boolean containsLabels(
java.lang.String key);
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getLabels();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
java.util.Map
getLabelsMap();
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
java.lang.String getLabelsOrThrow(
java.lang.String key);
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The zoneId.
*/
java.lang.String getZoneId();
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for zoneId.
*/
com.google.protobuf.ByteString
getZoneIdBytes();
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.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.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
* @return The resourcesSpec.
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec getResourcesSpec();
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder getResourcesSpecOrBuilder();
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
int getMetadataCount();
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
boolean containsMetadata(
java.lang.String key);
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Deprecated
java.util.Map
getMetadata();
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
java.util.Map
getMetadataMap();
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
java.lang.String getMetadataOrDefault(
java.lang.String key,
java.lang.String defaultValue);
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
java.lang.String getMetadataOrThrow(
java.lang.String key);
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return Whether the bootDiskSpec field is set.
*/
boolean hasBootDiskSpec();
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return The bootDiskSpec.
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec getBootDiskSpec();
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder getBootDiskSpecOrBuilder();
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
java.util.List
getNetworkInterfaceSpecsList();
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec getNetworkInterfaceSpecs(int index);
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
int getNetworkInterfaceSpecsCount();
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
java.util.List extends yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder>
getNetworkInterfaceSpecsOrBuilderList();
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder getNetworkInterfaceSpecsOrBuilder(
int index);
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @return The serviceAccountId.
*/
java.lang.String getServiceAccountId();
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @return The bytes for serviceAccountId.
*/
com.google.protobuf.ByteString
getServiceAccountIdBytes();
}
/**
* Protobuf type {@code yandex.cloud.loadtesting.api.v1.agent.CreateComputeInstance}
*/
public static final class CreateComputeInstance extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:yandex.cloud.loadtesting.api.v1.agent.CreateComputeInstance)
CreateComputeInstanceOrBuilder {
private static final long serialVersionUID = 0L;
// Use CreateComputeInstance.newBuilder() to construct.
private CreateComputeInstance(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private CreateComputeInstance() {
zoneId_ = "";
networkInterfaceSpecs_ = java.util.Collections.emptyList();
serviceAccountId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new CreateComputeInstance();
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private CreateComputeInstance(
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 34: {
if (!((mutable_bitField0_ & 0x00000001) != 0)) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
mutable_bitField0_ |= 0x00000001;
}
com.google.protobuf.MapEntry
labels__ = input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
labels_.getMutableMap().put(
labels__.getKey(), labels__.getValue());
break;
}
case 42: {
java.lang.String s = input.readStringRequireUtf8();
zoneId_ = s;
break;
}
case 58: {
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder subBuilder = null;
if (resourcesSpec_ != null) {
subBuilder = resourcesSpec_.toBuilder();
}
resourcesSpec_ = input.readMessage(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(resourcesSpec_);
resourcesSpec_ = subBuilder.buildPartial();
}
break;
}
case 66: {
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 74: {
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder subBuilder = null;
if (bootDiskSpec_ != null) {
subBuilder = bootDiskSpec_.toBuilder();
}
bootDiskSpec_ = input.readMessage(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.parser(), extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(bootDiskSpec_);
bootDiskSpec_ = subBuilder.buildPartial();
}
break;
}
case 90: {
if (!((mutable_bitField0_ & 0x00000004) != 0)) {
networkInterfaceSpecs_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
networkInterfaceSpecs_.add(
input.readMessage(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.parser(), extensionRegistry));
break;
}
case 114: {
java.lang.String s = input.readStringRequireUtf8();
serviceAccountId_ = 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_ & 0x00000004) != 0)) {
networkInterfaceSpecs_ = java.util.Collections.unmodifiableList(networkInterfaceSpecs_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
case 8:
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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.class, yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.Builder.class);
}
public static final int LABELS_FIELD_NUMBER = 4;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.String> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int ZONE_ID_FIELD_NUMBER = 5;
private volatile java.lang.Object zoneId_;
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The zoneId.
*/
@java.lang.Override
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zoneId_ = s;
return s;
}
}
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for zoneId.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESOURCES_SPEC_FIELD_NUMBER = 7;
private yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec resourcesSpec_;
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.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.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
* @return The resourcesSpec.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec getResourcesSpec() {
return resourcesSpec_ == null ? yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.getDefaultInstance() : resourcesSpec_;
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder getResourcesSpecOrBuilder() {
return getResourcesSpec();
}
public static final int METADATA_FIELD_NUMBER = 8;
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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_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 that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@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 = 9;
private yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec bootDiskSpec_;
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return Whether the bootDiskSpec field is set.
*/
@java.lang.Override
public boolean hasBootDiskSpec() {
return bootDiskSpec_ != null;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return The bootDiskSpec.
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec getBootDiskSpec() {
return bootDiskSpec_ == null ? yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.getDefaultInstance() : bootDiskSpec_;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder getBootDiskSpecOrBuilder() {
return getBootDiskSpec();
}
public static final int NETWORK_INTERFACE_SPECS_FIELD_NUMBER = 11;
private java.util.List networkInterfaceSpecs_;
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
@java.lang.Override
public java.util.List getNetworkInterfaceSpecsList() {
return networkInterfaceSpecs_;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
@java.lang.Override
public java.util.List extends yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder>
getNetworkInterfaceSpecsOrBuilderList() {
return networkInterfaceSpecs_;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
@java.lang.Override
public int getNetworkInterfaceSpecsCount() {
return networkInterfaceSpecs_.size();
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec getNetworkInterfaceSpecs(int index) {
return networkInterfaceSpecs_.get(index);
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
@java.lang.Override
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder getNetworkInterfaceSpecsOrBuilder(
int index) {
return networkInterfaceSpecs_.get(index);
}
public static final int SERVICE_ACCOUNT_ID_FIELD_NUMBER = 14;
private volatile java.lang.Object serviceAccountId_;
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @return The serviceAccountId.
*/
@java.lang.Override
public java.lang.String getServiceAccountId() {
java.lang.Object ref = serviceAccountId_;
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();
serviceAccountId_ = s;
return s;
}
}
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @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;
}
}
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 {
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetLabels(),
LabelsDefaultEntryHolder.defaultEntry,
4);
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, zoneId_);
}
if (resourcesSpec_ != null) {
output.writeMessage(7, getResourcesSpec());
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetMetadata(),
MetadataDefaultEntryHolder.defaultEntry,
8);
if (bootDiskSpec_ != null) {
output.writeMessage(9, getBootDiskSpec());
}
for (int i = 0; i < networkInterfaceSpecs_.size(); i++) {
output.writeMessage(11, networkInterfaceSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, serviceAccountId_);
}
unknownFields.writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (java.util.Map.Entry entry
: internalGetLabels().getMap().entrySet()) {
com.google.protobuf.MapEntry
labels__ = LabelsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, labels__);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(zoneId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, zoneId_);
}
if (resourcesSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getResourcesSpec());
}
for (java.util.Map.Entry entry
: internalGetMetadata().getMap().entrySet()) {
com.google.protobuf.MapEntry
metadata__ = MetadataDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, metadata__);
}
if (bootDiskSpec_ != null) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getBootDiskSpec());
}
for (int i = 0; i < networkInterfaceSpecs_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(11, networkInterfaceSpecs_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(serviceAccountId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, serviceAccountId_);
}
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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance)) {
return super.equals(obj);
}
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance other = (yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance) obj;
if (!internalGetLabels().equals(
other.internalGetLabels())) return false;
if (!getZoneId()
.equals(other.getZoneId())) return false;
if (hasResourcesSpec() != other.hasResourcesSpec()) return false;
if (hasResourcesSpec()) {
if (!getResourcesSpec()
.equals(other.getResourcesSpec())) return false;
}
if (!internalGetMetadata().equals(
other.internalGetMetadata())) return false;
if (hasBootDiskSpec() != other.hasBootDiskSpec()) return false;
if (hasBootDiskSpec()) {
if (!getBootDiskSpec()
.equals(other.getBootDiskSpec())) return false;
}
if (!getNetworkInterfaceSpecsList()
.equals(other.getNetworkInterfaceSpecsList())) return false;
if (!getServiceAccountId()
.equals(other.getServiceAccountId())) return false;
if (!unknownFields.equals(other.unknownFields)) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
hash = (37 * hash) + ZONE_ID_FIELD_NUMBER;
hash = (53 * hash) + getZoneId().hashCode();
if (hasResourcesSpec()) {
hash = (37 * hash) + RESOURCES_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getResourcesSpec().hashCode();
}
if (!internalGetMetadata().getMap().isEmpty()) {
hash = (37 * hash) + METADATA_FIELD_NUMBER;
hash = (53 * hash) + internalGetMetadata().hashCode();
}
if (hasBootDiskSpec()) {
hash = (37 * hash) + BOOT_DISK_SPEC_FIELD_NUMBER;
hash = (53 * hash) + getBootDiskSpec().hashCode();
}
if (getNetworkInterfaceSpecsCount() > 0) {
hash = (37 * hash) + NETWORK_INTERFACE_SPECS_FIELD_NUMBER;
hash = (53 * hash) + getNetworkInterfaceSpecsList().hashCode();
}
hash = (37 * hash) + SERVICE_ACCOUNT_ID_FIELD_NUMBER;
hash = (53 * hash) + getServiceAccountId().hashCode();
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance 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.loadtesting.api.v1.agent.CreateComputeInstance}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:yandex.cloud.loadtesting.api.v1.agent.CreateComputeInstance)
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstanceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMapField(
int number) {
switch (number) {
case 4:
return internalGetLabels();
case 8:
return internalGetMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapField internalGetMutableMapField(
int number) {
switch (number) {
case 4:
return internalGetMutableLabels();
case 8:
return internalGetMutableMetadata();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.class, yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.Builder.class);
}
// Construct using yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getNetworkInterfaceSpecsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
internalGetMutableLabels().clear();
zoneId_ = "";
if (resourcesSpecBuilder_ == null) {
resourcesSpec_ = null;
} else {
resourcesSpec_ = null;
resourcesSpecBuilder_ = null;
}
internalGetMutableMetadata().clear();
if (bootDiskSpecBuilder_ == null) {
bootDiskSpec_ = null;
} else {
bootDiskSpec_ = null;
bootDiskSpecBuilder_ = null;
}
if (networkInterfaceSpecsBuilder_ == null) {
networkInterfaceSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
networkInterfaceSpecsBuilder_.clear();
}
serviceAccountId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor;
}
@java.lang.Override
public yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance getDefaultInstanceForType() {
return yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.getDefaultInstance();
}
@java.lang.Override
public yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance build() {
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance buildPartial() {
yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance result = new yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance(this);
int from_bitField0_ = bitField0_;
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
result.zoneId_ = zoneId_;
if (resourcesSpecBuilder_ == null) {
result.resourcesSpec_ = resourcesSpec_;
} else {
result.resourcesSpec_ = resourcesSpecBuilder_.build();
}
result.metadata_ = internalGetMetadata();
result.metadata_.makeImmutable();
if (bootDiskSpecBuilder_ == null) {
result.bootDiskSpec_ = bootDiskSpec_;
} else {
result.bootDiskSpec_ = bootDiskSpecBuilder_.build();
}
if (networkInterfaceSpecsBuilder_ == null) {
if (((bitField0_ & 0x00000004) != 0)) {
networkInterfaceSpecs_ = java.util.Collections.unmodifiableList(networkInterfaceSpecs_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.networkInterfaceSpecs_ = networkInterfaceSpecs_;
} else {
result.networkInterfaceSpecs_ = networkInterfaceSpecsBuilder_.build();
}
result.serviceAccountId_ = serviceAccountId_;
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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance) {
return mergeFrom((yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance other) {
if (other == yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance.getDefaultInstance()) return this;
internalGetMutableLabels().mergeFrom(
other.internalGetLabels());
if (!other.getZoneId().isEmpty()) {
zoneId_ = other.zoneId_;
onChanged();
}
if (other.hasResourcesSpec()) {
mergeResourcesSpec(other.getResourcesSpec());
}
internalGetMutableMetadata().mergeFrom(
other.internalGetMetadata());
if (other.hasBootDiskSpec()) {
mergeBootDiskSpec(other.getBootDiskSpec());
}
if (networkInterfaceSpecsBuilder_ == null) {
if (!other.networkInterfaceSpecs_.isEmpty()) {
if (networkInterfaceSpecs_.isEmpty()) {
networkInterfaceSpecs_ = other.networkInterfaceSpecs_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.addAll(other.networkInterfaceSpecs_);
}
onChanged();
}
} else {
if (!other.networkInterfaceSpecs_.isEmpty()) {
if (networkInterfaceSpecsBuilder_.isEmpty()) {
networkInterfaceSpecsBuilder_.dispose();
networkInterfaceSpecsBuilder_ = null;
networkInterfaceSpecs_ = other.networkInterfaceSpecs_;
bitField0_ = (bitField0_ & ~0x00000004);
networkInterfaceSpecsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getNetworkInterfaceSpecsFieldBuilder() : null;
} else {
networkInterfaceSpecsBuilder_.addAllMessages(other.networkInterfaceSpecs_);
}
}
}
if (!other.getServiceAccountId().isEmpty()) {
serviceAccountId_ = other.serviceAccountId_;
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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private com.google.protobuf.MapField<
java.lang.String, java.lang.String> labels_;
private com.google.protobuf.MapField
internalGetLabels() {
if (labels_ == null) {
return com.google.protobuf.MapField.emptyMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
return labels_;
}
private com.google.protobuf.MapField
internalGetMutableLabels() {
onChanged();;
if (labels_ == null) {
labels_ = com.google.protobuf.MapField.newMapField(
LabelsDefaultEntryHolder.defaultEntry);
}
if (!labels_.isMutable()) {
labels_ = labels_.copy();
}
return labels_;
}
public int getLabelsCount() {
return internalGetLabels().getMap().size();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public boolean containsLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetLabels().getMap().containsKey(key);
}
/**
* Use {@link #getLabelsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getLabels() {
return getLabelsMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.util.Map getLabelsMap() {
return internalGetLabels().getMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
@java.lang.Override
public java.lang.String getLabelsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetLabels().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearLabels() {
internalGetMutableLabels().getMutableMap()
.clear();
return this;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
public Builder removeLabels(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableLabels().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableLabels() {
return internalGetMutableLabels().getMutableMap();
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
public Builder putLabels(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableLabels().getMutableMap()
.put(key, value);
return this;
}
/**
*
* Resource labels as `key:value` pairs.
*
*
* map<string, string> labels = 4 [(.yandex.cloud.pattern) = "[-_./\\@0-9a-z]*", (.yandex.cloud.size) = "<=64", (.yandex.cloud.length) = "<=63", (.yandex.cloud.map_key) = { ... }
*/
public Builder putAllLabels(
java.util.Map values) {
internalGetMutableLabels().getMutableMap()
.putAll(values);
return this;
}
private java.lang.Object zoneId_ = "";
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The zoneId.
*/
public java.lang.String getZoneId() {
java.lang.Object ref = zoneId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
zoneId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return The bytes for zoneId.
*/
public com.google.protobuf.ByteString
getZoneIdBytes() {
java.lang.Object ref = zoneId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
zoneId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @param value The zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneId(
java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
zoneId_ = value;
onChanged();
return this;
}
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @return This builder for chaining.
*/
public Builder clearZoneId() {
zoneId_ = getDefaultInstance().getZoneId();
onChanged();
return this;
}
/**
*
* ID of the availability zone where the instance resides.
* To get a list of available zones, use the [yandex.cloud.compute.v1.ZoneService.List] request
*
*
* string zone_id = 5 [(.yandex.cloud.required) = true, (.yandex.cloud.length) = "<=50"];
* @param value The bytes for zoneId to set.
* @return This builder for chaining.
*/
public Builder setZoneIdBytes(
com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
zoneId_ = value;
onChanged();
return this;
}
private yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec resourcesSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder> resourcesSpecBuilder_;
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.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.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
* @return The resourcesSpec.
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec getResourcesSpec() {
if (resourcesSpecBuilder_ == null) {
return resourcesSpec_ == null ? yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.getDefaultInstance() : resourcesSpec_;
} else {
return resourcesSpecBuilder_.getMessage();
}
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public Builder setResourcesSpec(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec value) {
if (resourcesSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
resourcesSpec_ = value;
onChanged();
} else {
resourcesSpecBuilder_.setMessage(value);
}
return this;
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public Builder setResourcesSpec(
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder builderForValue) {
if (resourcesSpecBuilder_ == null) {
resourcesSpec_ = builderForValue.build();
onChanged();
} else {
resourcesSpecBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public Builder mergeResourcesSpec(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec value) {
if (resourcesSpecBuilder_ == null) {
if (resourcesSpec_ != null) {
resourcesSpec_ =
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.newBuilder(resourcesSpec_).mergeFrom(value).buildPartial();
} else {
resourcesSpec_ = value;
}
onChanged();
} else {
resourcesSpecBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public Builder clearResourcesSpec() {
if (resourcesSpecBuilder_ == null) {
resourcesSpec_ = null;
onChanged();
} else {
resourcesSpec_ = null;
resourcesSpecBuilder_ = null;
}
return this;
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder getResourcesSpecBuilder() {
onChanged();
return getResourcesSpecFieldBuilder().getBuilder();
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder getResourcesSpecOrBuilder() {
if (resourcesSpecBuilder_ != null) {
return resourcesSpecBuilder_.getMessageOrBuilder();
} else {
return resourcesSpec_ == null ?
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.getDefaultInstance() : resourcesSpec_;
}
}
/**
*
* Computing resources of the instance, such as the amount of memory and number of cores.
* To get a list of available values, see [Levels of core performance](/docs/compute/concepts/performance-levels).
*
*
* .yandex.cloud.compute.v1.ResourcesSpec resources_spec = 7 [(.yandex.cloud.required) = true];
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder>
getResourcesSpecFieldBuilder() {
if (resourcesSpecBuilder_ == null) {
resourcesSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.ResourcesSpecOrBuilder>(
getResourcesSpec(),
getParentForChildren(),
isClean());
resourcesSpec_ = null;
}
return resourcesSpecBuilder_;
}
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_;
}
private com.google.protobuf.MapField
internalGetMutableMetadata() {
onChanged();;
if (metadata_ == null) {
metadata_ = com.google.protobuf.MapField.newMapField(
MetadataDefaultEntryHolder.defaultEntry);
}
if (!metadata_.isMutable()) {
metadata_ = metadata_.copy();
}
return metadata_;
}
public int getMetadataCount() {
return internalGetMetadata().getMap().size();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public boolean containsMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetMetadata().getMap().containsKey(key);
}
/**
* Use {@link #getMetadataMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getMetadata() {
return getMetadataMap();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public java.util.Map getMetadataMap() {
return internalGetMetadata().getMap();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@java.lang.Override
public java.lang.String getMetadataOrDefault(
java.lang.String key,
java.lang.String defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetMetadata().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
@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 Builder clearMetadata() {
internalGetMutableMetadata().getMutableMap()
.clear();
return this;
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
public Builder removeMetadata(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableMetadata().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableMetadata() {
return internalGetMutableMetadata().getMutableMap();
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
public Builder putMetadata(
java.lang.String key,
java.lang.String value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) {
throw new NullPointerException("map value");
}
internalGetMutableMetadata().getMutableMap()
.put(key, value);
return this;
}
/**
*
* The metadata `key:value` pairs that will be assigned to this instance. This includes custom metadata and predefined keys.
* The total size of all keys and values must be less than 512 KB.
* Values are free-form strings, and only have meaning as interpreted by the programs which configure the instance.
* The values must be 256 KB or less.
* 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 = 8;
*/
public Builder putAllMetadata(
java.util.Map values) {
internalGetMutableMetadata().getMutableMap()
.putAll(values);
return this;
}
private yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec bootDiskSpec_;
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder> bootDiskSpecBuilder_;
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return Whether the bootDiskSpec field is set.
*/
public boolean hasBootDiskSpec() {
return bootDiskSpecBuilder_ != null || bootDiskSpec_ != null;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
* @return The bootDiskSpec.
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec getBootDiskSpec() {
if (bootDiskSpecBuilder_ == null) {
return bootDiskSpec_ == null ? yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.getDefaultInstance() : bootDiskSpec_;
} else {
return bootDiskSpecBuilder_.getMessage();
}
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public Builder setBootDiskSpec(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec value) {
if (bootDiskSpecBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
bootDiskSpec_ = value;
onChanged();
} else {
bootDiskSpecBuilder_.setMessage(value);
}
return this;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public Builder setBootDiskSpec(
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder builderForValue) {
if (bootDiskSpecBuilder_ == null) {
bootDiskSpec_ = builderForValue.build();
onChanged();
} else {
bootDiskSpecBuilder_.setMessage(builderForValue.build());
}
return this;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public Builder mergeBootDiskSpec(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec value) {
if (bootDiskSpecBuilder_ == null) {
if (bootDiskSpec_ != null) {
bootDiskSpec_ =
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.newBuilder(bootDiskSpec_).mergeFrom(value).buildPartial();
} else {
bootDiskSpec_ = value;
}
onChanged();
} else {
bootDiskSpecBuilder_.mergeFrom(value);
}
return this;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public Builder clearBootDiskSpec() {
if (bootDiskSpecBuilder_ == null) {
bootDiskSpec_ = null;
onChanged();
} else {
bootDiskSpec_ = null;
bootDiskSpecBuilder_ = null;
}
return this;
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder getBootDiskSpecBuilder() {
onChanged();
return getBootDiskSpecFieldBuilder().getBuilder();
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder getBootDiskSpecOrBuilder() {
if (bootDiskSpecBuilder_ != null) {
return bootDiskSpecBuilder_.getMessageOrBuilder();
} else {
return bootDiskSpec_ == null ?
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.getDefaultInstance() : bootDiskSpec_;
}
}
/**
*
* Boot disk to attach to the instance.
*
*
* .yandex.cloud.compute.v1.AttachedDiskSpec boot_disk_spec = 9 [(.yandex.cloud.required) = true];
*/
private com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder>
getBootDiskSpecFieldBuilder() {
if (bootDiskSpecBuilder_ == null) {
bootDiskSpecBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.AttachedDiskSpecOrBuilder>(
getBootDiskSpec(),
getParentForChildren(),
isClean());
bootDiskSpec_ = null;
}
return bootDiskSpecBuilder_;
}
private java.util.List networkInterfaceSpecs_ =
java.util.Collections.emptyList();
private void ensureNetworkInterfaceSpecsIsMutable() {
if (!((bitField0_ & 0x00000004) != 0)) {
networkInterfaceSpecs_ = new java.util.ArrayList(networkInterfaceSpecs_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder> networkInterfaceSpecsBuilder_;
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public java.util.List getNetworkInterfaceSpecsList() {
if (networkInterfaceSpecsBuilder_ == null) {
return java.util.Collections.unmodifiableList(networkInterfaceSpecs_);
} else {
return networkInterfaceSpecsBuilder_.getMessageList();
}
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public int getNetworkInterfaceSpecsCount() {
if (networkInterfaceSpecsBuilder_ == null) {
return networkInterfaceSpecs_.size();
} else {
return networkInterfaceSpecsBuilder_.getCount();
}
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec getNetworkInterfaceSpecs(int index) {
if (networkInterfaceSpecsBuilder_ == null) {
return networkInterfaceSpecs_.get(index);
} else {
return networkInterfaceSpecsBuilder_.getMessage(index);
}
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder setNetworkInterfaceSpecs(
int index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec value) {
if (networkInterfaceSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.set(index, value);
onChanged();
} else {
networkInterfaceSpecsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder setNetworkInterfaceSpecs(
int index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder builderForValue) {
if (networkInterfaceSpecsBuilder_ == null) {
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.set(index, builderForValue.build());
onChanged();
} else {
networkInterfaceSpecsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder addNetworkInterfaceSpecs(yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec value) {
if (networkInterfaceSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.add(value);
onChanged();
} else {
networkInterfaceSpecsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder addNetworkInterfaceSpecs(
int index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec value) {
if (networkInterfaceSpecsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.add(index, value);
onChanged();
} else {
networkInterfaceSpecsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder addNetworkInterfaceSpecs(
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder builderForValue) {
if (networkInterfaceSpecsBuilder_ == null) {
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.add(builderForValue.build());
onChanged();
} else {
networkInterfaceSpecsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder addNetworkInterfaceSpecs(
int index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder builderForValue) {
if (networkInterfaceSpecsBuilder_ == null) {
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.add(index, builderForValue.build());
onChanged();
} else {
networkInterfaceSpecsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder addAllNetworkInterfaceSpecs(
java.lang.Iterable extends yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec> values) {
if (networkInterfaceSpecsBuilder_ == null) {
ensureNetworkInterfaceSpecsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, networkInterfaceSpecs_);
onChanged();
} else {
networkInterfaceSpecsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder clearNetworkInterfaceSpecs() {
if (networkInterfaceSpecsBuilder_ == null) {
networkInterfaceSpecs_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
networkInterfaceSpecsBuilder_.clear();
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public Builder removeNetworkInterfaceSpecs(int index) {
if (networkInterfaceSpecsBuilder_ == null) {
ensureNetworkInterfaceSpecsIsMutable();
networkInterfaceSpecs_.remove(index);
onChanged();
} else {
networkInterfaceSpecsBuilder_.remove(index);
}
return this;
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder getNetworkInterfaceSpecsBuilder(
int index) {
return getNetworkInterfaceSpecsFieldBuilder().getBuilder(index);
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder getNetworkInterfaceSpecsOrBuilder(
int index) {
if (networkInterfaceSpecsBuilder_ == null) {
return networkInterfaceSpecs_.get(index); } else {
return networkInterfaceSpecsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public java.util.List extends yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder>
getNetworkInterfaceSpecsOrBuilderList() {
if (networkInterfaceSpecsBuilder_ != null) {
return networkInterfaceSpecsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(networkInterfaceSpecs_);
}
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder addNetworkInterfaceSpecsBuilder() {
return getNetworkInterfaceSpecsFieldBuilder().addBuilder(
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.getDefaultInstance());
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder addNetworkInterfaceSpecsBuilder(
int index) {
return getNetworkInterfaceSpecsFieldBuilder().addBuilder(
index, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.getDefaultInstance());
}
/**
*
* Network configuration for the instance. Specifies how the network interface is configured
* to interact with other services on the internal network and on the internet.
* Currently only one network interface is supported per instance.
*
*
* repeated .yandex.cloud.compute.v1.NetworkInterfaceSpec network_interface_specs = 11 [(.yandex.cloud.size) = "1"];
*/
public java.util.List
getNetworkInterfaceSpecsBuilderList() {
return getNetworkInterfaceSpecsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder>
getNetworkInterfaceSpecsFieldBuilder() {
if (networkInterfaceSpecsBuilder_ == null) {
networkInterfaceSpecsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpec.Builder, yandex.cloud.api.compute.v1.InstanceServiceOuterClass.NetworkInterfaceSpecOrBuilder>(
networkInterfaceSpecs_,
((bitField0_ & 0x00000004) != 0),
getParentForChildren(),
isClean());
networkInterfaceSpecs_ = null;
}
return networkInterfaceSpecsBuilder_;
}
private java.lang.Object serviceAccountId_ = "";
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @return The serviceAccountId.
*/
public java.lang.String getServiceAccountId() {
java.lang.Object ref = serviceAccountId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
serviceAccountId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @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 to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @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 to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @return This builder for chaining.
*/
public Builder clearServiceAccountId() {
serviceAccountId_ = getDefaultInstance().getServiceAccountId();
onChanged();
return this;
}
/**
*
* ID of the service account to use for [authentication inside the instance](/docs/compute/operations/vm-connect/auth-inside-vm).
* To get the service account ID, use a [yandex.cloud.iam.v1.ServiceAccountService.List] request.
*
*
* string service_account_id = 14;
* @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;
}
@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.loadtesting.api.v1.agent.CreateComputeInstance)
}
// @@protoc_insertion_point(class_scope:yandex.cloud.loadtesting.api.v1.agent.CreateComputeInstance)
private static final yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance();
}
public static yandex.cloud.api.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public CreateComputeInstance parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new CreateComputeInstance(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.loadtesting.api.v1.agent.CreateComputeInstanceOuterClass.CreateComputeInstance getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_fieldAccessorTable;
private static final com.google.protobuf.Descriptors.Descriptor
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_MetadataEntry_descriptor;
private static final
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_MetadataEntry_fieldAccessorTable;
public static com.google.protobuf.Descriptors.FileDescriptor
getDescriptor() {
return descriptor;
}
private static com.google.protobuf.Descriptors.FileDescriptor
descriptor;
static {
java.lang.String[] descriptorData = {
"\nCyandex/cloud/loadtesting/api/v1/agent/" +
"create_compute_instance.proto\022%yandex.cl" +
"oud.loadtesting.api.v1.agent\032.yandex/clo" +
"ud/compute/v1/instance_service.proto\032\035ya" +
"ndex/cloud/validation.proto\"\232\005\n\025CreateCo" +
"mputeInstance\022\241\001\n\006labels\030\004 \003(\0132H.yandex." +
"cloud.loadtesting.api.v1.agent.CreateCom" +
"puteInstance.LabelsEntryBG\202\3101\004<=64\212\3101\004<=" +
"63\362\3071\017[-_./\\@0-9a-z]*\262\3101\006\032\0041-63\262\3101\026\022\024[a-" +
"z][-_./\\@0-9a-z]*\022\035\n\007zone_id\030\005 \001(\tB\014\350\3071\001" +
"\212\3101\004<=50\022D\n\016resources_spec\030\007 \001(\0132&.yande" +
"x.cloud.compute.v1.ResourcesSpecB\004\350\3071\001\022\\" +
"\n\010metadata\030\010 \003(\0132J.yandex.cloud.loadtest" +
"ing.api.v1.agent.CreateComputeInstance.M" +
"etadataEntry\022G\n\016boot_disk_spec\030\t \001(\0132).y" +
"andex.cloud.compute.v1.AttachedDiskSpecB" +
"\004\350\3071\001\022U\n\027network_interface_specs\030\013 \003(\0132-" +
".yandex.cloud.compute.v1.NetworkInterfac" +
"eSpecB\005\202\3101\0011\022\032\n\022service_account_id\030\016 \001(\t" +
"\032-\n\013LabelsEntry\022\013\n\003key\030\001 \001(\t\022\r\n\005value\030\002 " +
"\001(\t:\0028\001\032/\n\rMetadataEntry\022\013\n\003key\030\001 \001(\t\022\r\n" +
"\005value\030\002 \001(\t:\0028\001B|\n)yandex.cloud.api.loa" +
"dtesting.api.v1.agentZOgithub.com/yandex" +
"-cloud/go-genproto/yandex/cloud/loadtest" +
"ing/api/v1/agent;agentb\006proto3"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
new com.google.protobuf.Descriptors.FileDescriptor[] {
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.getDescriptor(),
yandex.cloud.api.Validation.getDescriptor(),
});
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor =
getDescriptor().getMessageTypes().get(0);
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor,
new java.lang.String[] { "Labels", "ZoneId", "ResourcesSpec", "Metadata", "BootDiskSpec", "NetworkInterfaceSpecs", "ServiceAccountId", });
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_descriptor =
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor.getNestedTypes().get(0);
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_LabelsEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_MetadataEntry_descriptor =
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_descriptor.getNestedTypes().get(1);
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_MetadataEntry_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_yandex_cloud_loadtesting_api_v1_agent_CreateComputeInstance_MetadataEntry_descriptor,
new java.lang.String[] { "Key", "Value", });
com.google.protobuf.ExtensionRegistry registry =
com.google.protobuf.ExtensionRegistry.newInstance();
registry.add(yandex.cloud.api.Validation.length);
registry.add(yandex.cloud.api.Validation.mapKey);
registry.add(yandex.cloud.api.Validation.pattern);
registry.add(yandex.cloud.api.Validation.required);
registry.add(yandex.cloud.api.Validation.size);
com.google.protobuf.Descriptors.FileDescriptor
.internalUpdateFileDescriptor(descriptor, registry);
yandex.cloud.api.compute.v1.InstanceServiceOuterClass.getDescriptor();
yandex.cloud.api.Validation.getDescriptor();
}
// @@protoc_insertion_point(outer_class_scope)
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy