Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
* Copyright 2024 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: google/cloud/baremetalsolution/v2/instance.proto
// Protobuf Java Version: 3.25.3
package com.google.cloud.baremetalsolution.v2;
/**
*
*
*
* A server.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.Instance}
*/
public final class Instance extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.Instance)
InstanceOrBuilder {
private static final long serialVersionUID = 0L;
// Use Instance.newBuilder() to construct.
private Instance(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Instance() {
name_ = "";
id_ = "";
machineType_ = "";
state_ = 0;
luns_ = java.util.Collections.emptyList();
volumes_ = java.util.Collections.emptyList();
networks_ = java.util.Collections.emptyList();
osImage_ = "";
pod_ = "";
networkTemplate_ = "";
logicalInterfaces_ = java.util.Collections.emptyList();
loginInfo_ = "";
workloadProfile_ = 0;
firmwareVersion_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new Instance();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 7:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.Instance.class,
com.google.cloud.baremetalsolution.v2.Instance.Builder.class);
}
/**
*
*
*
* The possible states for this server.
*
*
* Protobuf enum {@code google.cloud.baremetalsolution.v2.Instance.State}
*/
public enum State implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
*
* STATE_UNSPECIFIED = 0;
*/
public static final int STATE_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* The server is being provisioned.
*
*
* PROVISIONING = 1;
*/
public static final int PROVISIONING_VALUE = 1;
/**
*
*
*
* The server is running.
*
*
* RUNNING = 2;
*/
public static final int RUNNING_VALUE = 2;
/**
*
*
*
* The server has been deleted.
*
*
* DELETED = 3;
*/
public static final int DELETED_VALUE = 3;
/**
*
*
*
* The server is being updated.
*
*
* UPDATING = 4;
*/
public static final int UPDATING_VALUE = 4;
/**
*
*
*
* The server is starting.
*
*
* STARTING = 5;
*/
public static final int STARTING_VALUE = 5;
/**
*
*
*
* The server is stopping.
*
*
* STOPPING = 6;
*/
public static final int STOPPING_VALUE = 6;
/**
*
*
*
* The server is shutdown.
*
*
* SHUTDOWN = 7;
*/
public static final int SHUTDOWN_VALUE = 7;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static State valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static State forNumber(int value) {
switch (value) {
case 0:
return STATE_UNSPECIFIED;
case 1:
return PROVISIONING;
case 2:
return RUNNING;
case 3:
return DELETED;
case 4:
return UPDATING;
case 5:
return STARTING;
case 6:
return STOPPING;
case 7:
return SHUTDOWN;
default:
return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public State findValueByNumber(int number) {
return State.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.Instance.getDescriptor().getEnumTypes().get(0);
}
private static final State[] VALUES = values();
public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private State(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Instance.State)
}
private int bitField0_;
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for name.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ID_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* Output only. An identifier for the `Instance`, generated by the backend.
*
* Immutable. The server type.
* [Available server
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for machineType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getMachineTypeBytes() {
java.lang.Object ref = machineType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
machineType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STATE_FIELD_NUMBER = 5;
private int state_ = 0;
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Instance.State getState() {
com.google.cloud.baremetalsolution.v2.Instance.State result =
com.google.cloud.baremetalsolution.v2.Instance.State.forNumber(state_);
return result == null
? com.google.cloud.baremetalsolution.v2.Instance.State.UNRECOGNIZED
: result;
}
public static final int HYPERTHREADING_ENABLED_FIELD_NUMBER = 6;
private boolean hyperthreadingEnabled_ = false;
/**
*
*
*
* True if you enable hyperthreading for the server, otherwise false.
* The default value is false.
*
*
* bool hyperthreading_enabled = 6;
*
* @return The hyperthreadingEnabled.
*/
@java.lang.Override
public boolean getHyperthreadingEnabled() {
return hyperthreadingEnabled_;
}
public static final int LABELS_FIELD_NUMBER = 7;
private static final class LabelsDefaultEntryHolder {
static final com.google.protobuf.MapEntry defaultEntry =
com.google.protobuf.MapEntry.newDefaultInstance(
com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_LabelsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.STRING,
"");
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField 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();
}
/**
*
*
*
* Labels as key value pairs.
*
*
* map<string, string> labels = 7;
*/
@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();
}
/**
*
*
*
* The OS image currently installed on the server.
*
*
* string os_image = 12;
*
* @return The bytes for osImage.
*/
@java.lang.Override
public com.google.protobuf.ByteString getOsImageBytes() {
java.lang.Object ref = osImage_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
osImage_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int POD_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private volatile java.lang.Object pod_ = "";
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The pod.
*/
@java.lang.Override
public java.lang.String getPod() {
java.lang.Object ref = pod_;
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();
pod_ = s;
return s;
}
}
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for pod.
*/
@java.lang.Override
public com.google.protobuf.ByteString getPodBytes() {
java.lang.Object ref = pod_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
pod_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int NETWORK_TEMPLATE_FIELD_NUMBER = 14;
@SuppressWarnings("serial")
private volatile java.lang.Object networkTemplate_ = "";
/**
*
*
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
*
* string network_template = 14 [(.google.api.resource_reference) = { ... }
*
* @return The bytes for networkTemplate.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNetworkTemplateBytes() {
java.lang.Object ref = networkTemplate_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
networkTemplate_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int LOGICAL_INTERFACES_FIELD_NUMBER = 15;
@SuppressWarnings("serial")
private java.util.List logicalInterfaces_;
/**
*
*
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder
getLogicalInterfacesOrBuilder(int index) {
return logicalInterfaces_.get(index);
}
public static final int LOGIN_INFO_FIELD_NUMBER = 17;
@SuppressWarnings("serial")
private volatile java.lang.Object loginInfo_ = "";
/**
*
*
*
* Output only. Text field about info for logging in.
*
* Output only. Text field about info for logging in.
*
*
* string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for loginInfo.
*/
@java.lang.Override
public com.google.protobuf.ByteString getLoginInfoBytes() {
java.lang.Object ref = loginInfo_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
loginInfo_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int WORKLOAD_PROFILE_FIELD_NUMBER = 18;
private int workloadProfile_ = 0;
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @return The enum numeric value on the wire for workloadProfile.
*/
@java.lang.Override
public int getWorkloadProfileValue() {
return workloadProfile_;
}
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @return The workloadProfile.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.WorkloadProfile getWorkloadProfile() {
com.google.cloud.baremetalsolution.v2.WorkloadProfile result =
com.google.cloud.baremetalsolution.v2.WorkloadProfile.forNumber(workloadProfile_);
return result == null
? com.google.cloud.baremetalsolution.v2.WorkloadProfile.UNRECOGNIZED
: result;
}
public static final int FIRMWARE_VERSION_FIELD_NUMBER = 19;
@SuppressWarnings("serial")
private volatile java.lang.Object firmwareVersion_ = "";
/**
*
*
*
* Output only. The firmware version for the instance.
*
* Output only. The firmware version for the instance.
*
*
* string firmware_version = 19 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @return The bytes for firmwareVersion.
*/
@java.lang.Override
public com.google.protobuf.ByteString getFirmwareVersionBytes() {
java.lang.Object ref = firmwareVersion_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
firmwareVersion_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(2, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(3, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, machineType_);
}
if (state_
!= com.google.cloud.baremetalsolution.v2.Instance.State.STATE_UNSPECIFIED.getNumber()) {
output.writeEnum(5, state_);
}
if (hyperthreadingEnabled_ != false) {
output.writeBool(6, hyperthreadingEnabled_);
}
com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 7);
for (int i = 0; i < luns_.size(); i++) {
output.writeMessage(8, luns_.get(i));
}
for (int i = 0; i < networks_.size(); i++) {
output.writeMessage(9, networks_.get(i));
}
if (interactiveSerialConsoleEnabled_ != false) {
output.writeBool(10, interactiveSerialConsoleEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, osImage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, pod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 14, networkTemplate_);
}
for (int i = 0; i < logicalInterfaces_.size(); i++) {
output.writeMessage(15, logicalInterfaces_.get(i));
}
for (int i = 0; i < volumes_.size(); i++) {
output.writeMessage(16, volumes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(loginInfo_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, loginInfo_);
}
if (workloadProfile_
!= com.google.cloud.baremetalsolution.v2.WorkloadProfile.WORKLOAD_PROFILE_UNSPECIFIED
.getNumber()) {
output.writeEnum(18, workloadProfile_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firmwareVersion_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 19, firmwareVersion_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(3, getUpdateTime());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(machineType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, machineType_);
}
if (state_
!= com.google.cloud.baremetalsolution.v2.Instance.State.STATE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(5, state_);
}
if (hyperthreadingEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(6, hyperthreadingEnabled_);
}
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(7, labels__);
}
for (int i = 0; i < luns_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(8, luns_.get(i));
}
for (int i = 0; i < networks_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, networks_.get(i));
}
if (interactiveSerialConsoleEnabled_ != false) {
size +=
com.google.protobuf.CodedOutputStream.computeBoolSize(
10, interactiveSerialConsoleEnabled_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, osImage_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(pod_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(13, pod_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(14, networkTemplate_);
}
for (int i = 0; i < logicalInterfaces_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(15, logicalInterfaces_.get(i));
}
for (int i = 0; i < volumes_.size(); i++) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(16, volumes_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(loginInfo_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, loginInfo_);
}
if (workloadProfile_
!= com.google.cloud.baremetalsolution.v2.WorkloadProfile.WORKLOAD_PROFILE_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(18, workloadProfile_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(firmwareVersion_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(19, firmwareVersion_);
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.google.cloud.baremetalsolution.v2.Instance)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.Instance other =
(com.google.cloud.baremetalsolution.v2.Instance) obj;
if (!getName().equals(other.getName())) return false;
if (!getId().equals(other.getId())) return false;
if (hasCreateTime() != other.hasCreateTime()) return false;
if (hasCreateTime()) {
if (!getCreateTime().equals(other.getCreateTime())) return false;
}
if (hasUpdateTime() != other.hasUpdateTime()) return false;
if (hasUpdateTime()) {
if (!getUpdateTime().equals(other.getUpdateTime())) return false;
}
if (!getMachineType().equals(other.getMachineType())) return false;
if (state_ != other.state_) return false;
if (getHyperthreadingEnabled() != other.getHyperthreadingEnabled()) return false;
if (!internalGetLabels().equals(other.internalGetLabels())) return false;
if (!getLunsList().equals(other.getLunsList())) return false;
if (!getVolumesList().equals(other.getVolumesList())) return false;
if (!getNetworksList().equals(other.getNetworksList())) return false;
if (getInteractiveSerialConsoleEnabled() != other.getInteractiveSerialConsoleEnabled())
return false;
if (!getOsImage().equals(other.getOsImage())) return false;
if (!getPod().equals(other.getPod())) return false;
if (!getNetworkTemplate().equals(other.getNetworkTemplate())) return false;
if (!getLogicalInterfacesList().equals(other.getLogicalInterfacesList())) return false;
if (!getLoginInfo().equals(other.getLoginInfo())) return false;
if (workloadProfile_ != other.workloadProfile_) return false;
if (!getFirmwareVersion().equals(other.getFirmwareVersion())) return false;
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
if (hasCreateTime()) {
hash = (37 * hash) + CREATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getCreateTime().hashCode();
}
if (hasUpdateTime()) {
hash = (37 * hash) + UPDATE_TIME_FIELD_NUMBER;
hash = (53 * hash) + getUpdateTime().hashCode();
}
hash = (37 * hash) + MACHINE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getMachineType().hashCode();
hash = (37 * hash) + STATE_FIELD_NUMBER;
hash = (53 * hash) + state_;
hash = (37 * hash) + HYPERTHREADING_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHyperthreadingEnabled());
if (!internalGetLabels().getMap().isEmpty()) {
hash = (37 * hash) + LABELS_FIELD_NUMBER;
hash = (53 * hash) + internalGetLabels().hashCode();
}
if (getLunsCount() > 0) {
hash = (37 * hash) + LUNS_FIELD_NUMBER;
hash = (53 * hash) + getLunsList().hashCode();
}
if (getVolumesCount() > 0) {
hash = (37 * hash) + VOLUMES_FIELD_NUMBER;
hash = (53 * hash) + getVolumesList().hashCode();
}
if (getNetworksCount() > 0) {
hash = (37 * hash) + NETWORKS_FIELD_NUMBER;
hash = (53 * hash) + getNetworksList().hashCode();
}
hash = (37 * hash) + INTERACTIVE_SERIAL_CONSOLE_ENABLED_FIELD_NUMBER;
hash =
(53 * hash)
+ com.google.protobuf.Internal.hashBoolean(getInteractiveSerialConsoleEnabled());
hash = (37 * hash) + OS_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getOsImage().hashCode();
hash = (37 * hash) + POD_FIELD_NUMBER;
hash = (53 * hash) + getPod().hashCode();
hash = (37 * hash) + NETWORK_TEMPLATE_FIELD_NUMBER;
hash = (53 * hash) + getNetworkTemplate().hashCode();
if (getLogicalInterfacesCount() > 0) {
hash = (37 * hash) + LOGICAL_INTERFACES_FIELD_NUMBER;
hash = (53 * hash) + getLogicalInterfacesList().hashCode();
}
hash = (37 * hash) + LOGIN_INFO_FIELD_NUMBER;
hash = (53 * hash) + getLoginInfo().hashCode();
hash = (37 * hash) + WORKLOAD_PROFILE_FIELD_NUMBER;
hash = (53 * hash) + workloadProfile_;
hash = (37 * hash) + FIRMWARE_VERSION_FIELD_NUMBER;
hash = (53 * hash) + getFirmwareVersion().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(
java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(
byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.google.cloud.baremetalsolution.v2.Instance parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.Instance 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 com.google.cloud.baremetalsolution.v2.Instance parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.Instance 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 com.google.cloud.baremetalsolution.v2.Instance parseFrom(
com.google.protobuf.CodedInputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.Instance 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(com.google.cloud.baremetalsolution.v2.Instance 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;
}
/**
*
*
*
* A server.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.Instance}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Instance)
com.google.cloud.baremetalsolution.v2.InstanceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 7:
return internalGetLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 7:
return internalGetMutableLabels();
default:
throw new RuntimeException("Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.Instance.class,
com.google.cloud.baremetalsolution.v2.Instance.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.Instance.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders) {
getCreateTimeFieldBuilder();
getUpdateTimeFieldBuilder();
getLunsFieldBuilder();
getVolumesFieldBuilder();
getNetworksFieldBuilder();
getLogicalInterfacesFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
name_ = "";
id_ = "";
createTime_ = null;
if (createTimeBuilder_ != null) {
createTimeBuilder_.dispose();
createTimeBuilder_ = null;
}
updateTime_ = null;
if (updateTimeBuilder_ != null) {
updateTimeBuilder_.dispose();
updateTimeBuilder_ = null;
}
machineType_ = "";
state_ = 0;
hyperthreadingEnabled_ = false;
internalGetMutableLabels().clear();
if (lunsBuilder_ == null) {
luns_ = java.util.Collections.emptyList();
} else {
luns_ = null;
lunsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000100);
if (volumesBuilder_ == null) {
volumes_ = java.util.Collections.emptyList();
} else {
volumes_ = null;
volumesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000200);
if (networksBuilder_ == null) {
networks_ = java.util.Collections.emptyList();
} else {
networks_ = null;
networksBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000400);
interactiveSerialConsoleEnabled_ = false;
osImage_ = "";
pod_ = "";
networkTemplate_ = "";
if (logicalInterfacesBuilder_ == null) {
logicalInterfaces_ = java.util.Collections.emptyList();
} else {
logicalInterfaces_ = null;
logicalInterfacesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00008000);
loginInfo_ = "";
workloadProfile_ = 0;
firmwareVersion_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.InstanceProto
.internal_static_google_cloud_baremetalsolution_v2_Instance_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Instance getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.Instance.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Instance build() {
com.google.cloud.baremetalsolution.v2.Instance result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Instance buildPartial() {
com.google.cloud.baremetalsolution.v2.Instance result =
new com.google.cloud.baremetalsolution.v2.Instance(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.google.cloud.baremetalsolution.v2.Instance result) {
if (lunsBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0)) {
luns_ = java.util.Collections.unmodifiableList(luns_);
bitField0_ = (bitField0_ & ~0x00000100);
}
result.luns_ = luns_;
} else {
result.luns_ = lunsBuilder_.build();
}
if (volumesBuilder_ == null) {
if (((bitField0_ & 0x00000200) != 0)) {
volumes_ = java.util.Collections.unmodifiableList(volumes_);
bitField0_ = (bitField0_ & ~0x00000200);
}
result.volumes_ = volumes_;
} else {
result.volumes_ = volumesBuilder_.build();
}
if (networksBuilder_ == null) {
if (((bitField0_ & 0x00000400) != 0)) {
networks_ = java.util.Collections.unmodifiableList(networks_);
bitField0_ = (bitField0_ & ~0x00000400);
}
result.networks_ = networks_;
} else {
result.networks_ = networksBuilder_.build();
}
if (logicalInterfacesBuilder_ == null) {
if (((bitField0_ & 0x00008000) != 0)) {
logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_);
bitField0_ = (bitField0_ & ~0x00008000);
}
result.logicalInterfaces_ = logicalInterfaces_;
} else {
result.logicalInterfaces_ = logicalInterfacesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.baremetalsolution.v2.Instance result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.id_ = id_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000004) != 0)) {
result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.machineType_ = machineType_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.state_ = state_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.hyperthreadingEnabled_ = hyperthreadingEnabled_;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.labels_ = internalGetLabels();
result.labels_.makeImmutable();
}
if (((from_bitField0_ & 0x00000800) != 0)) {
result.interactiveSerialConsoleEnabled_ = interactiveSerialConsoleEnabled_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.osImage_ = osImage_;
}
if (((from_bitField0_ & 0x00002000) != 0)) {
result.pod_ = pod_;
}
if (((from_bitField0_ & 0x00004000) != 0)) {
result.networkTemplate_ = networkTemplate_;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.loginInfo_ = loginInfo_;
}
if (((from_bitField0_ & 0x00020000) != 0)) {
result.workloadProfile_ = workloadProfile_;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
result.firmwareVersion_ = firmwareVersion_;
}
result.bitField0_ |= to_bitField0_;
}
@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 com.google.cloud.baremetalsolution.v2.Instance) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.Instance) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Instance other) {
if (other == com.google.cloud.baremetalsolution.v2.Instance.getDefaultInstance()) return this;
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.hasCreateTime()) {
mergeCreateTime(other.getCreateTime());
}
if (other.hasUpdateTime()) {
mergeUpdateTime(other.getUpdateTime());
}
if (!other.getMachineType().isEmpty()) {
machineType_ = other.machineType_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.state_ != 0) {
setStateValue(other.getStateValue());
}
if (other.getHyperthreadingEnabled() != false) {
setHyperthreadingEnabled(other.getHyperthreadingEnabled());
}
internalGetMutableLabels().mergeFrom(other.internalGetLabels());
bitField0_ |= 0x00000080;
if (lunsBuilder_ == null) {
if (!other.luns_.isEmpty()) {
if (luns_.isEmpty()) {
luns_ = other.luns_;
bitField0_ = (bitField0_ & ~0x00000100);
} else {
ensureLunsIsMutable();
luns_.addAll(other.luns_);
}
onChanged();
}
} else {
if (!other.luns_.isEmpty()) {
if (lunsBuilder_.isEmpty()) {
lunsBuilder_.dispose();
lunsBuilder_ = null;
luns_ = other.luns_;
bitField0_ = (bitField0_ & ~0x00000100);
lunsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getLunsFieldBuilder()
: null;
} else {
lunsBuilder_.addAllMessages(other.luns_);
}
}
}
if (volumesBuilder_ == null) {
if (!other.volumes_.isEmpty()) {
if (volumes_.isEmpty()) {
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00000200);
} else {
ensureVolumesIsMutable();
volumes_.addAll(other.volumes_);
}
onChanged();
}
} else {
if (!other.volumes_.isEmpty()) {
if (volumesBuilder_.isEmpty()) {
volumesBuilder_.dispose();
volumesBuilder_ = null;
volumes_ = other.volumes_;
bitField0_ = (bitField0_ & ~0x00000200);
volumesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getVolumesFieldBuilder()
: null;
} else {
volumesBuilder_.addAllMessages(other.volumes_);
}
}
}
if (networksBuilder_ == null) {
if (!other.networks_.isEmpty()) {
if (networks_.isEmpty()) {
networks_ = other.networks_;
bitField0_ = (bitField0_ & ~0x00000400);
} else {
ensureNetworksIsMutable();
networks_.addAll(other.networks_);
}
onChanged();
}
} else {
if (!other.networks_.isEmpty()) {
if (networksBuilder_.isEmpty()) {
networksBuilder_.dispose();
networksBuilder_ = null;
networks_ = other.networks_;
bitField0_ = (bitField0_ & ~0x00000400);
networksBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getNetworksFieldBuilder()
: null;
} else {
networksBuilder_.addAllMessages(other.networks_);
}
}
}
if (other.getInteractiveSerialConsoleEnabled() != false) {
setInteractiveSerialConsoleEnabled(other.getInteractiveSerialConsoleEnabled());
}
if (!other.getOsImage().isEmpty()) {
osImage_ = other.osImage_;
bitField0_ |= 0x00001000;
onChanged();
}
if (!other.getPod().isEmpty()) {
pod_ = other.pod_;
bitField0_ |= 0x00002000;
onChanged();
}
if (!other.getNetworkTemplate().isEmpty()) {
networkTemplate_ = other.networkTemplate_;
bitField0_ |= 0x00004000;
onChanged();
}
if (logicalInterfacesBuilder_ == null) {
if (!other.logicalInterfaces_.isEmpty()) {
if (logicalInterfaces_.isEmpty()) {
logicalInterfaces_ = other.logicalInterfaces_;
bitField0_ = (bitField0_ & ~0x00008000);
} else {
ensureLogicalInterfacesIsMutable();
logicalInterfaces_.addAll(other.logicalInterfaces_);
}
onChanged();
}
} else {
if (!other.logicalInterfaces_.isEmpty()) {
if (logicalInterfacesBuilder_.isEmpty()) {
logicalInterfacesBuilder_.dispose();
logicalInterfacesBuilder_ = null;
logicalInterfaces_ = other.logicalInterfaces_;
bitField0_ = (bitField0_ & ~0x00008000);
logicalInterfacesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getLogicalInterfacesFieldBuilder()
: null;
} else {
logicalInterfacesBuilder_.addAllMessages(other.logicalInterfaces_);
}
}
}
if (!other.getLoginInfo().isEmpty()) {
loginInfo_ = other.loginInfo_;
bitField0_ |= 0x00010000;
onChanged();
}
if (other.workloadProfile_ != 0) {
setWorkloadProfileValue(other.getWorkloadProfileValue());
}
if (!other.getFirmwareVersion().isEmpty()) {
firmwareVersion_ = other.firmwareVersion_;
bitField0_ |= 0x00040000;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
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 {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
input.readMessage(getCreateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000004;
break;
} // case 18
case 26:
{
input.readMessage(getUpdateTimeFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000008;
break;
} // case 26
case 34:
{
machineType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 34
case 40:
{
state_ = input.readEnum();
bitField0_ |= 0x00000020;
break;
} // case 40
case 48:
{
hyperthreadingEnabled_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 48
case 58:
{
com.google.protobuf.MapEntry labels__ =
input.readMessage(
LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
extensionRegistry);
internalGetMutableLabels()
.getMutableMap()
.put(labels__.getKey(), labels__.getValue());
bitField0_ |= 0x00000080;
break;
} // case 58
case 66:
{
com.google.cloud.baremetalsolution.v2.Lun m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.Lun.parser(), extensionRegistry);
if (lunsBuilder_ == null) {
ensureLunsIsMutable();
luns_.add(m);
} else {
lunsBuilder_.addMessage(m);
}
break;
} // case 66
case 74:
{
com.google.cloud.baremetalsolution.v2.Network m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.Network.parser(), extensionRegistry);
if (networksBuilder_ == null) {
ensureNetworksIsMutable();
networks_.add(m);
} else {
networksBuilder_.addMessage(m);
}
break;
} // case 74
case 80:
{
interactiveSerialConsoleEnabled_ = input.readBool();
bitField0_ |= 0x00000800;
break;
} // case 80
case 90:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 90
case 98:
{
osImage_ = input.readStringRequireUtf8();
bitField0_ |= 0x00001000;
break;
} // case 98
case 106:
{
pod_ = input.readStringRequireUtf8();
bitField0_ |= 0x00002000;
break;
} // case 106
case 114:
{
networkTemplate_ = input.readStringRequireUtf8();
bitField0_ |= 0x00004000;
break;
} // case 114
case 122:
{
com.google.cloud.baremetalsolution.v2.LogicalInterface m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.LogicalInterface.parser(),
extensionRegistry);
if (logicalInterfacesBuilder_ == null) {
ensureLogicalInterfacesIsMutable();
logicalInterfaces_.add(m);
} else {
logicalInterfacesBuilder_.addMessage(m);
}
break;
} // case 122
case 130:
{
com.google.cloud.baremetalsolution.v2.Volume m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.Volume.parser(), extensionRegistry);
if (volumesBuilder_ == null) {
ensureVolumesIsMutable();
volumes_.add(m);
} else {
volumesBuilder_.addMessage(m);
}
break;
} // case 130
case 138:
{
loginInfo_ = input.readStringRequireUtf8();
bitField0_ |= 0x00010000;
break;
} // case 138
case 144:
{
workloadProfile_ = input.readEnum();
bitField0_ |= 0x00020000;
break;
} // case 144
case 154:
{
firmwareVersion_ = input.readStringRequireUtf8();
bitField0_ |= 0x00040000;
break;
} // case 154
default:
{
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int bitField0_;
private java.lang.Object name_ = "";
/**
*
*
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for name.
*/
public com.google.protobuf.ByteString getNameBytes() {
java.lang.Object ref = name_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
name_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The name to set.
* @return This builder for chaining.
*/
public Builder setName(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Immutable. The resource name of this `Instance`.
* Resource names are schemeless URIs that follow the conventions in
* https://cloud.google.com/apis/design/resource_names.
* Format:
* `projects/{project}/locations/{location}/instances/{instance}`
*
*
* string name = 1 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for name to set.
* @return This builder for chaining.
*/
public Builder setNameBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
name_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
*
*
* Output only. An identifier for the `Instance`, generated by the backend.
*
* Immutable. The server type.
* [Available server
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string machine_type = 4 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for machineType to set.
* @return This builder for chaining.
*/
public Builder setMachineTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
machineType_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private int state_ = 0;
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The enum numeric value on the wire for state.
*/
@java.lang.Override
public int getStateValue() {
return state_;
}
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The enum numeric value on the wire for state to set.
* @return This builder for chaining.
*/
public Builder setStateValue(int value) {
state_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @return The state.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Instance.State getState() {
com.google.cloud.baremetalsolution.v2.Instance.State result =
com.google.cloud.baremetalsolution.v2.Instance.State.forNumber(state_);
return result == null
? com.google.cloud.baremetalsolution.v2.Instance.State.UNRECOGNIZED
: result;
}
/**
*
*
*
* Output only. The state of the server.
*
*
*
* .google.cloud.baremetalsolution.v2.Instance.State state = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
*
* @param value The state to set.
* @return This builder for chaining.
*/
public Builder setState(com.google.cloud.baremetalsolution.v2.Instance.State value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000020;
state_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The OS image currently installed on the server.
*
*
* string os_image = 12;
*
* @param value The bytes for osImage to set.
* @return This builder for chaining.
*/
public Builder setOsImageBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
osImage_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
private java.lang.Object pod_ = "";
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The pod.
*/
public java.lang.String getPod() {
java.lang.Object ref = pod_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
pod_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return The bytes for pod.
*/
public com.google.protobuf.ByteString getPodBytes() {
java.lang.Object ref = pod_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
pod_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The pod to set.
* @return This builder for chaining.
*/
public Builder setPod(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
pod_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @return This builder for chaining.
*/
public Builder clearPod() {
pod_ = getDefaultInstance().getPod();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
return this;
}
/**
*
*
*
* Immutable. Pod name.
* Pod is an independent part of infrastructure.
* Instance can be connected to the assets (networks, volumes) allocated
* in the same pod only.
*
*
* string pod = 13 [(.google.api.field_behavior) = IMMUTABLE];
*
* @param value The bytes for pod to set.
* @return This builder for chaining.
*/
public Builder setPodBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
pod_ = value;
bitField0_ |= 0x00002000;
onChanged();
return this;
}
private java.lang.Object networkTemplate_ = "";
/**
*
*
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
*
* string network_template = 14 [(.google.api.resource_reference) = { ... }
*
* @param value The networkTemplate to set.
* @return This builder for chaining.
*/
public Builder setNetworkTemplate(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
networkTemplate_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
/**
*
*
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
* Instance network template name. For eg, bondaa-bondaa, bondab-nic, etc.
* Generally, the template name follows the syntax of
* "bond<bond_mode>" or "nic".
*
*
* string network_template = 14 [(.google.api.resource_reference) = { ... }
*
* @param value The bytes for networkTemplate to set.
* @return This builder for chaining.
*/
public Builder setNetworkTemplateBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
networkTemplate_ = value;
bitField0_ |= 0x00004000;
onChanged();
return this;
}
private java.util.List
logicalInterfaces_ = java.util.Collections.emptyList();
private void ensureLogicalInterfacesIsMutable() {
if (!((bitField0_ & 0x00008000) != 0)) {
logicalInterfaces_ =
new java.util.ArrayList(
logicalInterfaces_);
bitField0_ |= 0x00008000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.LogicalInterface,
com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder,
com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder>
logicalInterfacesBuilder_;
/**
*
*
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15;
*
*/
public Builder setLogicalInterfaces(
int index, com.google.cloud.baremetalsolution.v2.LogicalInterface value) {
if (logicalInterfacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogicalInterfacesIsMutable();
logicalInterfaces_.set(index, value);
onChanged();
} else {
logicalInterfacesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15;
*
*/
public Builder addLogicalInterfaces(
int index, com.google.cloud.baremetalsolution.v2.LogicalInterface value) {
if (logicalInterfacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogicalInterfacesIsMutable();
logicalInterfaces_.add(index, value);
onChanged();
} else {
logicalInterfacesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* List of logical interfaces for the instance. The number of logical
* interfaces will be the same as number of hardware bond/nic on the chosen
* network template. For the non-multivlan configurations (for eg, existing
* servers) that use existing default network template (bondaa-bondaa), both
* the Instance.networks field and the Instance.logical_interfaces fields will
* be filled to ensure backward compatibility. For the others, only
* Instance.logical_interfaces will be filled.
*
* Output only. Text field about info for logging in.
*
*
* string login_info = 17 [(.google.api.field_behavior) = OUTPUT_ONLY];
*
* @param value The bytes for loginInfo to set.
* @return This builder for chaining.
*/
public Builder setLoginInfoBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
loginInfo_ = value;
bitField0_ |= 0x00010000;
onChanged();
return this;
}
private int workloadProfile_ = 0;
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @return The enum numeric value on the wire for workloadProfile.
*/
@java.lang.Override
public int getWorkloadProfileValue() {
return workloadProfile_;
}
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @param value The enum numeric value on the wire for workloadProfile to set.
* @return This builder for chaining.
*/
public Builder setWorkloadProfileValue(int value) {
workloadProfile_ = value;
bitField0_ |= 0x00020000;
onChanged();
return this;
}
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @return The workloadProfile.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.WorkloadProfile getWorkloadProfile() {
com.google.cloud.baremetalsolution.v2.WorkloadProfile result =
com.google.cloud.baremetalsolution.v2.WorkloadProfile.forNumber(workloadProfile_);
return result == null
? com.google.cloud.baremetalsolution.v2.WorkloadProfile.UNRECOGNIZED
: result;
}
/**
*
*
*
* The workload profile for the instance.
*
*
* .google.cloud.baremetalsolution.v2.WorkloadProfile workload_profile = 18;
*
* @param value The workloadProfile to set.
* @return This builder for chaining.
*/
public Builder setWorkloadProfile(com.google.cloud.baremetalsolution.v2.WorkloadProfile value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00020000;
workloadProfile_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*