All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.google.cloud.baremetalsolution.v2.Instance Maven / Gradle / Ivy

There is a newer version: 0.54.0
Show newest version
/*
 * Copyright 2023 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

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(); networks_ = java.util.Collections.emptyList(); osImage_ = ""; pod_ = ""; networkTemplate_ = ""; logicalInterfaces_ = java.util.Collections.emptyList(); } @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.MapField internalGetMapField(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 { /** * * *
     * The server is in an unknown state.
     * 
* * STATE_UNSPECIFIED = 0; */ STATE_UNSPECIFIED(0), /** * * *
     * The server is being provisioned.
     * 
* * PROVISIONING = 1; */ PROVISIONING(1), /** * * *
     * The server is running.
     * 
* * RUNNING = 2; */ RUNNING(2), /** * * *
     * The server has been deleted.
     * 
* * DELETED = 3; */ DELETED(3), UNRECOGNIZED(-1), ; /** * * *
     * The server is in an unknown state.
     * 
* * 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; 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; 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) } public static final int NAME_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object name_ = ""; /** * * *
   * Output only. 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) = OUTPUT_ONLY]; * * @return The name. */ @java.lang.Override public java.lang.String getName() { java.lang.Object ref = name_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } } /** * * *
   * Output only. 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) = OUTPUT_ONLY]; * * @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_ = ""; /** * * *
   * An identifier for the `Instance`, generated by the backend.
   * 
* * string id = 11; * * @return The id. */ @java.lang.Override public java.lang.String getId() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { return (java.lang.String) ref; } else { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } } /** * * *
   * An identifier for the `Instance`, generated by the backend.
   * 
* * string id = 11; * * @return The bytes for id. */ @java.lang.Override public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int CREATE_TIME_FIELD_NUMBER = 2; private com.google.protobuf.Timestamp createTime_; /** * * *
   * Output only. Create a time stamp.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ @java.lang.Override public boolean hasCreateTime() { return createTime_ != null; } /** * * *
   * Output only. Create a time stamp.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ @java.lang.Override public com.google.protobuf.Timestamp getCreateTime() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } /** * * *
   * Output only. Create a time stamp.
   * 
* * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } public static final int UPDATE_TIME_FIELD_NUMBER = 3; private com.google.protobuf.Timestamp updateTime_; /** * * *
   * Output only. Update a time stamp.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ @java.lang.Override public boolean hasUpdateTime() { return updateTime_ != null; } /** * * *
   * Output only. Update a time stamp.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ @java.lang.Override public com.google.protobuf.Timestamp getUpdateTime() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } /** * * *
   * Output only. Update a time stamp.
   * 
* * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ @java.lang.Override public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } public static final int MACHINE_TYPE_FIELD_NUMBER = 4; @SuppressWarnings("serial") private volatile java.lang.Object machineType_ = ""; /** * * *
   * The server type.
   * [Available server
   * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
   * 
* * string machine_type = 4; * * @return The machineType. */ @java.lang.Override public java.lang.String getMachineType() { java.lang.Object ref = machineType_; 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(); machineType_ = s; return s; } } /** * * *
   * The server type.
   * [Available server
   * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
   * 
* * string machine_type = 4; * * @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; /** * * *
   * The state of the server.
   * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
   * The state of the server.
   * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @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(); } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 7; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 7; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ 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; } /** * * *
   * Labels as key value pairs.
   * 
* * map<string, string> labels = 7; */ @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 LUNS_FIELD_NUMBER = 8; @SuppressWarnings("serial") private java.util.List luns_; /** * * *
   * List of LUNs associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ @java.lang.Override public java.util.List getLunsList() { return luns_; } /** * * *
   * List of LUNs associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ @java.lang.Override public java.util.List getLunsOrBuilderList() { return luns_; } /** * * *
   * List of LUNs associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ @java.lang.Override public int getLunsCount() { return luns_.size(); } /** * * *
   * List of LUNs associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Lun getLuns(int index) { return luns_.get(index); } /** * * *
   * List of LUNs associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.LunOrBuilder getLunsOrBuilder(int index) { return luns_.get(index); } public static final int NETWORKS_FIELD_NUMBER = 9; @SuppressWarnings("serial") private java.util.List networks_; /** * * *
   * List of networks associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ @java.lang.Override public java.util.List getNetworksList() { return networks_; } /** * * *
   * List of networks associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ @java.lang.Override public java.util.List getNetworksOrBuilderList() { return networks_; } /** * * *
   * List of networks associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ @java.lang.Override public int getNetworksCount() { return networks_.size(); } /** * * *
   * List of networks associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.Network getNetworks(int index) { return networks_.get(index); } /** * * *
   * List of networks associated with this server.
   * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ @java.lang.Override public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworksOrBuilder(int index) { return networks_.get(index); } public static final int INTERACTIVE_SERIAL_CONSOLE_ENABLED_FIELD_NUMBER = 10; private boolean interactiveSerialConsoleEnabled_ = false; /** * * *
   * True if the interactive serial console feature is enabled for the instance,
   * false otherwise.
   * The default value is false.
   * 
* * bool interactive_serial_console_enabled = 10; * * @return The interactiveSerialConsoleEnabled. */ @java.lang.Override public boolean getInteractiveSerialConsoleEnabled() { return interactiveSerialConsoleEnabled_; } public static final int OS_IMAGE_FIELD_NUMBER = 12; @SuppressWarnings("serial") private volatile java.lang.Object osImage_ = ""; /** * * *
   * The OS image currently installed on the server.
   * 
* * string os_image = 12; * * @return The osImage. */ @java.lang.Override public java.lang.String getOsImage() { java.lang.Object ref = osImage_; 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(); osImage_ = s; return s; } } /** * * *
   * 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".
   * 
* * string network_template = 14 [(.google.api.resource_reference) = { ... } * * @return The networkTemplate. */ @java.lang.Override public java.lang.String getNetworkTemplate() { java.lang.Object ref = networkTemplate_; 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(); networkTemplate_ = s; return s; } } /** * * *
   * 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.
   * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ @java.lang.Override public java.util.List getLogicalInterfacesList() { return 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.
   * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ @java.lang.Override public java.util.List getLogicalInterfacesOrBuilderList() { return 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.
   * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ @java.lang.Override public int getLogicalInterfacesCount() { return logicalInterfaces_.size(); } /** * * *
   * 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.LogicalInterface getLogicalInterfaces(int index) { return logicalInterfaces_.get(index); } /** * * *
   * 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); } 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 (createTime_ != null) { output.writeMessage(2, getCreateTime()); } if (updateTime_ != null) { 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)); } 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 (createTime_ != null) { size += com.google.protobuf.CodedOutputStream.computeMessageSize(2, getCreateTime()); } if (updateTime_ != null) { 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)); } 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 (!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 (!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 (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 = (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.MapField internalGetMapField(int number) { switch (number) { case 7: return internalGetLabels(); default: throw new RuntimeException("Invalid map field number: " + number); } } @SuppressWarnings({"rawtypes"}) protected com.google.protobuf.MapField internalGetMutableMapField(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() {} private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); } @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 (networksBuilder_ == null) { networks_ = java.util.Collections.emptyList(); } else { networks_ = null; networksBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00000200); interactiveSerialConsoleEnabled_ = false; osImage_ = ""; pod_ = ""; networkTemplate_ = ""; if (logicalInterfacesBuilder_ == null) { logicalInterfaces_ = java.util.Collections.emptyList(); } else { logicalInterfaces_ = null; logicalInterfacesBuilder_.clear(); } bitField0_ = (bitField0_ & ~0x00004000); 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 (networksBuilder_ == null) { if (((bitField0_ & 0x00000200) != 0)) { networks_ = java.util.Collections.unmodifiableList(networks_); bitField0_ = (bitField0_ & ~0x00000200); } result.networks_ = networks_; } else { result.networks_ = networksBuilder_.build(); } if (logicalInterfacesBuilder_ == null) { if (((bitField0_ & 0x00004000) != 0)) { logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_); bitField0_ = (bitField0_ & ~0x00004000); } 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_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.createTime_ = createTimeBuilder_ == null ? createTime_ : createTimeBuilder_.build(); } if (((from_bitField0_ & 0x00000008) != 0)) { result.updateTime_ = updateTimeBuilder_ == null ? updateTime_ : updateTimeBuilder_.build(); } 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_ & 0x00000400) != 0)) { result.interactiveSerialConsoleEnabled_ = interactiveSerialConsoleEnabled_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.osImage_ = osImage_; } if (((from_bitField0_ & 0x00001000) != 0)) { result.pod_ = pod_; } if (((from_bitField0_ & 0x00002000) != 0)) { result.networkTemplate_ = networkTemplate_; } } @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 (networksBuilder_ == null) { if (!other.networks_.isEmpty()) { if (networks_.isEmpty()) { networks_ = other.networks_; bitField0_ = (bitField0_ & ~0x00000200); } else { ensureNetworksIsMutable(); networks_.addAll(other.networks_); } onChanged(); } } else { if (!other.networks_.isEmpty()) { if (networksBuilder_.isEmpty()) { networksBuilder_.dispose(); networksBuilder_ = null; networks_ = other.networks_; bitField0_ = (bitField0_ & ~0x00000200); 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_ |= 0x00000800; onChanged(); } if (!other.getPod().isEmpty()) { pod_ = other.pod_; bitField0_ |= 0x00001000; onChanged(); } if (!other.getNetworkTemplate().isEmpty()) { networkTemplate_ = other.networkTemplate_; bitField0_ |= 0x00002000; onChanged(); } if (logicalInterfacesBuilder_ == null) { if (!other.logicalInterfaces_.isEmpty()) { if (logicalInterfaces_.isEmpty()) { logicalInterfaces_ = other.logicalInterfaces_; bitField0_ = (bitField0_ & ~0x00004000); } else { ensureLogicalInterfacesIsMutable(); logicalInterfaces_.addAll(other.logicalInterfaces_); } onChanged(); } } else { if (!other.logicalInterfaces_.isEmpty()) { if (logicalInterfacesBuilder_.isEmpty()) { logicalInterfacesBuilder_.dispose(); logicalInterfacesBuilder_ = null; logicalInterfaces_ = other.logicalInterfaces_; bitField0_ = (bitField0_ & ~0x00004000); logicalInterfacesBuilder_ = com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ? getLogicalInterfacesFieldBuilder() : null; } else { logicalInterfacesBuilder_.addAllMessages(other.logicalInterfaces_); } } } 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_ |= 0x00000400; break; } // case 80 case 90: { id_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 90 case 98: { osImage_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000800; break; } // case 98 case 106: { pod_ = input.readStringRequireUtf8(); bitField0_ |= 0x00001000; break; } // case 106 case 114: { networkTemplate_ = input.readStringRequireUtf8(); bitField0_ |= 0x00002000; 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 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_ = ""; /** * * *
     * Output only. 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) = OUTPUT_ONLY]; * * @return The name. */ public java.lang.String getName() { java.lang.Object ref = name_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); name_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * Output only. 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) = OUTPUT_ONLY]; * * @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; } } /** * * *
     * Output only. 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) = OUTPUT_ONLY]; * * @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; } /** * * *
     * Output only. 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) = OUTPUT_ONLY]; * * @return This builder for chaining. */ public Builder clearName() { name_ = getDefaultInstance().getName(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** * * *
     * Output only. 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) = OUTPUT_ONLY]; * * @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_ = ""; /** * * *
     * An identifier for the `Instance`, generated by the backend.
     * 
* * string id = 11; * * @return The id. */ public java.lang.String getId() { java.lang.Object ref = id_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); id_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * An identifier for the `Instance`, generated by the backend.
     * 
* * string id = 11; * * @return The bytes for id. */ public com.google.protobuf.ByteString getIdBytes() { java.lang.Object ref = id_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref); id_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** * * *
     * An identifier for the `Instance`, generated by the backend.
     * 
* * string id = 11; * * @param value The id to set. * @return This builder for chaining. */ public Builder setId(java.lang.String value) { if (value == null) { throw new NullPointerException(); } id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** * * *
     * An identifier for the `Instance`, generated by the backend.
     * 
* * string id = 11; * * @return This builder for chaining. */ public Builder clearId() { id_ = getDefaultInstance().getId(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** * * *
     * An identifier for the `Instance`, generated by the backend.
     * 
* * string id = 11; * * @param value The bytes for id to set. * @return This builder for chaining. */ public Builder setIdBytes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); id_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private com.google.protobuf.Timestamp createTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> createTimeBuilder_; /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the createTime field is set. */ public boolean hasCreateTime() { return ((bitField0_ & 0x00000004) != 0); } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The createTime. */ public com.google.protobuf.Timestamp getCreateTime() { if (createTimeBuilder_ == null) { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } else { return createTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } createTime_ = value; } else { createTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setCreateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (createTimeBuilder_ == null) { createTime_ = builderForValue.build(); } else { createTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeCreateTime(com.google.protobuf.Timestamp value) { if (createTimeBuilder_ == null) { if (((bitField0_ & 0x00000004) != 0) && createTime_ != null && createTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getCreateTimeBuilder().mergeFrom(value); } else { createTime_ = value; } } else { createTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000004; onChanged(); return this; } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearCreateTime() { bitField0_ = (bitField0_ & ~0x00000004); createTime_ = null; if (createTimeBuilder_ != null) { createTimeBuilder_.dispose(); createTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getCreateTimeBuilder() { bitField0_ |= 0x00000004; onChanged(); return getCreateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getCreateTimeOrBuilder() { if (createTimeBuilder_ != null) { return createTimeBuilder_.getMessageOrBuilder(); } else { return createTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : createTime_; } } /** * * *
     * Output only. Create a time stamp.
     * 
* * * .google.protobuf.Timestamp create_time = 2 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getCreateTimeFieldBuilder() { if (createTimeBuilder_ == null) { createTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getCreateTime(), getParentForChildren(), isClean()); createTime_ = null; } return createTimeBuilder_; } private com.google.protobuf.Timestamp updateTime_; private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> updateTimeBuilder_; /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return Whether the updateTime field is set. */ public boolean hasUpdateTime() { return ((bitField0_ & 0x00000008) != 0); } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * * * @return The updateTime. */ public com.google.protobuf.Timestamp getUpdateTime() { if (updateTimeBuilder_ == null) { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } else { return updateTimeBuilder_.getMessage(); } } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (value == null) { throw new NullPointerException(); } updateTime_ = value; } else { updateTimeBuilder_.setMessage(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder setUpdateTime(com.google.protobuf.Timestamp.Builder builderForValue) { if (updateTimeBuilder_ == null) { updateTime_ = builderForValue.build(); } else { updateTimeBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder mergeUpdateTime(com.google.protobuf.Timestamp value) { if (updateTimeBuilder_ == null) { if (((bitField0_ & 0x00000008) != 0) && updateTime_ != null && updateTime_ != com.google.protobuf.Timestamp.getDefaultInstance()) { getUpdateTimeBuilder().mergeFrom(value); } else { updateTime_ = value; } } else { updateTimeBuilder_.mergeFrom(value); } bitField0_ |= 0x00000008; onChanged(); return this; } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public Builder clearUpdateTime() { bitField0_ = (bitField0_ & ~0x00000008); updateTime_ = null; if (updateTimeBuilder_ != null) { updateTimeBuilder_.dispose(); updateTimeBuilder_ = null; } onChanged(); return this; } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.Timestamp.Builder getUpdateTimeBuilder() { bitField0_ |= 0x00000008; onChanged(); return getUpdateTimeFieldBuilder().getBuilder(); } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ public com.google.protobuf.TimestampOrBuilder getUpdateTimeOrBuilder() { if (updateTimeBuilder_ != null) { return updateTimeBuilder_.getMessageOrBuilder(); } else { return updateTime_ == null ? com.google.protobuf.Timestamp.getDefaultInstance() : updateTime_; } } /** * * *
     * Output only. Update a time stamp.
     * 
* * * .google.protobuf.Timestamp update_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY]; * */ private com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder> getUpdateTimeFieldBuilder() { if (updateTimeBuilder_ == null) { updateTimeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.google.protobuf.Timestamp, com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>( getUpdateTime(), getParentForChildren(), isClean()); updateTime_ = null; } return updateTimeBuilder_; } private java.lang.Object machineType_ = ""; /** * * *
     * The server type.
     * [Available server
     * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
     * 
* * string machine_type = 4; * * @return The machineType. */ public java.lang.String getMachineType() { java.lang.Object ref = machineType_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); machineType_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The server type.
     * [Available server
     * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
     * 
* * string machine_type = 4; * * @return The bytes for machineType. */ public com.google.protobuf.ByteString getMachineTypeBytes() { java.lang.Object ref = machineType_; if (ref instanceof 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; } } /** * * *
     * The server type.
     * [Available server
     * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
     * 
* * string machine_type = 4; * * @param value The machineType to set. * @return This builder for chaining. */ public Builder setMachineType(java.lang.String value) { if (value == null) { throw new NullPointerException(); } machineType_ = value; bitField0_ |= 0x00000010; onChanged(); return this; } /** * * *
     * The server type.
     * [Available server
     * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
     * 
* * string machine_type = 4; * * @return This builder for chaining. */ public Builder clearMachineType() { machineType_ = getDefaultInstance().getMachineType(); bitField0_ = (bitField0_ & ~0x00000010); onChanged(); return this; } /** * * *
     * The server type.
     * [Available server
     * types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
     * 
* * string machine_type = 4; * * @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; /** * * *
     * The state of the server.
     * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @return The enum numeric value on the wire for state. */ @java.lang.Override public int getStateValue() { return state_; } /** * * *
     * The state of the server.
     * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @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; } /** * * *
     * The state of the server.
     * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @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; } /** * * *
     * The state of the server.
     * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @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 state of the server.
     * 
* * .google.cloud.baremetalsolution.v2.Instance.State state = 5; * * @return This builder for chaining. */ public Builder clearState() { bitField0_ = (bitField0_ & ~0x00000020); state_ = 0; onChanged(); return this; } private boolean hyperthreadingEnabled_; /** * * *
     * 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_; } /** * * *
     * True if you enable hyperthreading for the server, otherwise false.
     * The default value is false.
     * 
* * bool hyperthreading_enabled = 6; * * @param value The hyperthreadingEnabled to set. * @return This builder for chaining. */ public Builder setHyperthreadingEnabled(boolean value) { hyperthreadingEnabled_ = value; bitField0_ |= 0x00000040; onChanged(); return this; } /** * * *
     * True if you enable hyperthreading for the server, otherwise false.
     * The default value is false.
     * 
* * bool hyperthreading_enabled = 6; * * @return This builder for chaining. */ public Builder clearHyperthreadingEnabled() { bitField0_ = (bitField0_ & ~0x00000040); hyperthreadingEnabled_ = false; onChanged(); return this; } 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_; } private com.google.protobuf.MapField internalGetMutableLabels() { if (labels_ == null) { labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry); } if (!labels_.isMutable()) { labels_ = labels_.copy(); } bitField0_ |= 0x00000080; onChanged(); 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(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ @java.lang.Override public java.util.Map getLabelsMap() { return internalGetLabels().getMap(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ @java.lang.Override public /* nullable */ java.lang.String getLabelsOrDefault( java.lang.String key, /* nullable */ 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; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ @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() { bitField0_ = (bitField0_ & ~0x00000080); internalGetMutableLabels().getMutableMap().clear(); return this; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ 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() { bitField0_ |= 0x00000080; return internalGetMutableLabels().getMutableMap(); } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ 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); bitField0_ |= 0x00000080; return this; } /** * * *
     * Labels as key value pairs.
     * 
* * map<string, string> labels = 7; */ public Builder putAllLabels(java.util.Map values) { internalGetMutableLabels().getMutableMap().putAll(values); bitField0_ |= 0x00000080; return this; } private java.util.List luns_ = java.util.Collections.emptyList(); private void ensureLunsIsMutable() { if (!((bitField0_ & 0x00000100) != 0)) { luns_ = new java.util.ArrayList(luns_); bitField0_ |= 0x00000100; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Lun, com.google.cloud.baremetalsolution.v2.Lun.Builder, com.google.cloud.baremetalsolution.v2.LunOrBuilder> lunsBuilder_; /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public java.util.List getLunsList() { if (lunsBuilder_ == null) { return java.util.Collections.unmodifiableList(luns_); } else { return lunsBuilder_.getMessageList(); } } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public int getLunsCount() { if (lunsBuilder_ == null) { return luns_.size(); } else { return lunsBuilder_.getCount(); } } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public com.google.cloud.baremetalsolution.v2.Lun getLuns(int index) { if (lunsBuilder_ == null) { return luns_.get(index); } else { return lunsBuilder_.getMessage(index); } } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder setLuns(int index, com.google.cloud.baremetalsolution.v2.Lun value) { if (lunsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunsIsMutable(); luns_.set(index, value); onChanged(); } else { lunsBuilder_.setMessage(index, value); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder setLuns( int index, com.google.cloud.baremetalsolution.v2.Lun.Builder builderForValue) { if (lunsBuilder_ == null) { ensureLunsIsMutable(); luns_.set(index, builderForValue.build()); onChanged(); } else { lunsBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder addLuns(com.google.cloud.baremetalsolution.v2.Lun value) { if (lunsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunsIsMutable(); luns_.add(value); onChanged(); } else { lunsBuilder_.addMessage(value); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder addLuns(int index, com.google.cloud.baremetalsolution.v2.Lun value) { if (lunsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLunsIsMutable(); luns_.add(index, value); onChanged(); } else { lunsBuilder_.addMessage(index, value); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder addLuns(com.google.cloud.baremetalsolution.v2.Lun.Builder builderForValue) { if (lunsBuilder_ == null) { ensureLunsIsMutable(); luns_.add(builderForValue.build()); onChanged(); } else { lunsBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder addLuns( int index, com.google.cloud.baremetalsolution.v2.Lun.Builder builderForValue) { if (lunsBuilder_ == null) { ensureLunsIsMutable(); luns_.add(index, builderForValue.build()); onChanged(); } else { lunsBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder addAllLuns( java.lang.Iterable values) { if (lunsBuilder_ == null) { ensureLunsIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, luns_); onChanged(); } else { lunsBuilder_.addAllMessages(values); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder clearLuns() { if (lunsBuilder_ == null) { luns_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000100); onChanged(); } else { lunsBuilder_.clear(); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public Builder removeLuns(int index) { if (lunsBuilder_ == null) { ensureLunsIsMutable(); luns_.remove(index); onChanged(); } else { lunsBuilder_.remove(index); } return this; } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public com.google.cloud.baremetalsolution.v2.Lun.Builder getLunsBuilder(int index) { return getLunsFieldBuilder().getBuilder(index); } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public com.google.cloud.baremetalsolution.v2.LunOrBuilder getLunsOrBuilder(int index) { if (lunsBuilder_ == null) { return luns_.get(index); } else { return lunsBuilder_.getMessageOrBuilder(index); } } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public java.util.List getLunsOrBuilderList() { if (lunsBuilder_ != null) { return lunsBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(luns_); } } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public com.google.cloud.baremetalsolution.v2.Lun.Builder addLunsBuilder() { return getLunsFieldBuilder() .addBuilder(com.google.cloud.baremetalsolution.v2.Lun.getDefaultInstance()); } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public com.google.cloud.baremetalsolution.v2.Lun.Builder addLunsBuilder(int index) { return getLunsFieldBuilder() .addBuilder(index, com.google.cloud.baremetalsolution.v2.Lun.getDefaultInstance()); } /** * * *
     * List of LUNs associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Lun luns = 8; */ public java.util.List getLunsBuilderList() { return getLunsFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Lun, com.google.cloud.baremetalsolution.v2.Lun.Builder, com.google.cloud.baremetalsolution.v2.LunOrBuilder> getLunsFieldBuilder() { if (lunsBuilder_ == null) { lunsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Lun, com.google.cloud.baremetalsolution.v2.Lun.Builder, com.google.cloud.baremetalsolution.v2.LunOrBuilder>( luns_, ((bitField0_ & 0x00000100) != 0), getParentForChildren(), isClean()); luns_ = null; } return lunsBuilder_; } private java.util.List networks_ = java.util.Collections.emptyList(); private void ensureNetworksIsMutable() { if (!((bitField0_ & 0x00000200) != 0)) { networks_ = new java.util.ArrayList(networks_); bitField0_ |= 0x00000200; } } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Network, com.google.cloud.baremetalsolution.v2.Network.Builder, com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> networksBuilder_; /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public java.util.List getNetworksList() { if (networksBuilder_ == null) { return java.util.Collections.unmodifiableList(networks_); } else { return networksBuilder_.getMessageList(); } } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public int getNetworksCount() { if (networksBuilder_ == null) { return networks_.size(); } else { return networksBuilder_.getCount(); } } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public com.google.cloud.baremetalsolution.v2.Network getNetworks(int index) { if (networksBuilder_ == null) { return networks_.get(index); } else { return networksBuilder_.getMessage(index); } } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder setNetworks(int index, com.google.cloud.baremetalsolution.v2.Network value) { if (networksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNetworksIsMutable(); networks_.set(index, value); onChanged(); } else { networksBuilder_.setMessage(index, value); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder setNetworks( int index, com.google.cloud.baremetalsolution.v2.Network.Builder builderForValue) { if (networksBuilder_ == null) { ensureNetworksIsMutable(); networks_.set(index, builderForValue.build()); onChanged(); } else { networksBuilder_.setMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder addNetworks(com.google.cloud.baremetalsolution.v2.Network value) { if (networksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNetworksIsMutable(); networks_.add(value); onChanged(); } else { networksBuilder_.addMessage(value); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder addNetworks(int index, com.google.cloud.baremetalsolution.v2.Network value) { if (networksBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureNetworksIsMutable(); networks_.add(index, value); onChanged(); } else { networksBuilder_.addMessage(index, value); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder addNetworks( com.google.cloud.baremetalsolution.v2.Network.Builder builderForValue) { if (networksBuilder_ == null) { ensureNetworksIsMutable(); networks_.add(builderForValue.build()); onChanged(); } else { networksBuilder_.addMessage(builderForValue.build()); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder addNetworks( int index, com.google.cloud.baremetalsolution.v2.Network.Builder builderForValue) { if (networksBuilder_ == null) { ensureNetworksIsMutable(); networks_.add(index, builderForValue.build()); onChanged(); } else { networksBuilder_.addMessage(index, builderForValue.build()); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder addAllNetworks( java.lang.Iterable values) { if (networksBuilder_ == null) { ensureNetworksIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, networks_); onChanged(); } else { networksBuilder_.addAllMessages(values); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder clearNetworks() { if (networksBuilder_ == null) { networks_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00000200); onChanged(); } else { networksBuilder_.clear(); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public Builder removeNetworks(int index) { if (networksBuilder_ == null) { ensureNetworksIsMutable(); networks_.remove(index); onChanged(); } else { networksBuilder_.remove(index); } return this; } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public com.google.cloud.baremetalsolution.v2.Network.Builder getNetworksBuilder(int index) { return getNetworksFieldBuilder().getBuilder(index); } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public com.google.cloud.baremetalsolution.v2.NetworkOrBuilder getNetworksOrBuilder(int index) { if (networksBuilder_ == null) { return networks_.get(index); } else { return networksBuilder_.getMessageOrBuilder(index); } } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public java.util.List getNetworksOrBuilderList() { if (networksBuilder_ != null) { return networksBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(networks_); } } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public com.google.cloud.baremetalsolution.v2.Network.Builder addNetworksBuilder() { return getNetworksFieldBuilder() .addBuilder(com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance()); } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public com.google.cloud.baremetalsolution.v2.Network.Builder addNetworksBuilder(int index) { return getNetworksFieldBuilder() .addBuilder(index, com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance()); } /** * * *
     * List of networks associated with this server.
     * 
* * repeated .google.cloud.baremetalsolution.v2.Network networks = 9; */ public java.util.List getNetworksBuilderList() { return getNetworksFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Network, com.google.cloud.baremetalsolution.v2.Network.Builder, com.google.cloud.baremetalsolution.v2.NetworkOrBuilder> getNetworksFieldBuilder() { if (networksBuilder_ == null) { networksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.Network, com.google.cloud.baremetalsolution.v2.Network.Builder, com.google.cloud.baremetalsolution.v2.NetworkOrBuilder>( networks_, ((bitField0_ & 0x00000200) != 0), getParentForChildren(), isClean()); networks_ = null; } return networksBuilder_; } private boolean interactiveSerialConsoleEnabled_; /** * * *
     * True if the interactive serial console feature is enabled for the instance,
     * false otherwise.
     * The default value is false.
     * 
* * bool interactive_serial_console_enabled = 10; * * @return The interactiveSerialConsoleEnabled. */ @java.lang.Override public boolean getInteractiveSerialConsoleEnabled() { return interactiveSerialConsoleEnabled_; } /** * * *
     * True if the interactive serial console feature is enabled for the instance,
     * false otherwise.
     * The default value is false.
     * 
* * bool interactive_serial_console_enabled = 10; * * @param value The interactiveSerialConsoleEnabled to set. * @return This builder for chaining. */ public Builder setInteractiveSerialConsoleEnabled(boolean value) { interactiveSerialConsoleEnabled_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** * * *
     * True if the interactive serial console feature is enabled for the instance,
     * false otherwise.
     * The default value is false.
     * 
* * bool interactive_serial_console_enabled = 10; * * @return This builder for chaining. */ public Builder clearInteractiveSerialConsoleEnabled() { bitField0_ = (bitField0_ & ~0x00000400); interactiveSerialConsoleEnabled_ = false; onChanged(); return this; } private java.lang.Object osImage_ = ""; /** * * *
     * The OS image currently installed on the server.
     * 
* * string os_image = 12; * * @return The osImage. */ public java.lang.String getOsImage() { java.lang.Object ref = osImage_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); osImage_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * The OS image currently installed on the server.
     * 
* * string os_image = 12; * * @return The bytes for osImage. */ public com.google.protobuf.ByteString getOsImageBytes() { java.lang.Object ref = osImage_; if (ref instanceof 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; } } /** * * *
     * The OS image currently installed on the server.
     * 
* * string os_image = 12; * * @param value The osImage to set. * @return This builder for chaining. */ public Builder setOsImage(java.lang.String value) { if (value == null) { throw new NullPointerException(); } osImage_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** * * *
     * The OS image currently installed on the server.
     * 
* * string os_image = 12; * * @return This builder for chaining. */ public Builder clearOsImage() { osImage_ = getDefaultInstance().getOsImage(); bitField0_ = (bitField0_ & ~0x00000800); 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_ |= 0x00000800; 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_ |= 0x00001000; 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_ & ~0x00001000); 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_ |= 0x00001000; 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".
     * 
* * string network_template = 14 [(.google.api.resource_reference) = { ... } * * @return The networkTemplate. */ public java.lang.String getNetworkTemplate() { java.lang.Object ref = networkTemplate_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); networkTemplate_ = s; return s; } else { return (java.lang.String) ref; } } /** * * *
     * 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. */ public com.google.protobuf.ByteString getNetworkTemplateBytes() { java.lang.Object ref = networkTemplate_; if (ref instanceof 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; } } /** * * *
     * 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_ |= 0x00002000; 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".
     * 
* * string network_template = 14 [(.google.api.resource_reference) = { ... } * * @return This builder for chaining. */ public Builder clearNetworkTemplate() { networkTemplate_ = getDefaultInstance().getNetworkTemplate(); bitField0_ = (bitField0_ & ~0x00002000); 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".
     * 
* * 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_ |= 0x00002000; onChanged(); return this; } private java.util.List logicalInterfaces_ = java.util.Collections.emptyList(); private void ensureLogicalInterfacesIsMutable() { if (!((bitField0_ & 0x00004000) != 0)) { logicalInterfaces_ = new java.util.ArrayList( logicalInterfaces_); bitField0_ |= 0x00004000; } } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public java.util.List getLogicalInterfacesList() { if (logicalInterfacesBuilder_ == null) { return java.util.Collections.unmodifiableList(logicalInterfaces_); } else { return logicalInterfacesBuilder_.getMessageList(); } } /** * * *
     * 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 int getLogicalInterfacesCount() { if (logicalInterfacesBuilder_ == null) { return logicalInterfaces_.size(); } else { return logicalInterfacesBuilder_.getCount(); } } /** * * *
     * 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 com.google.cloud.baremetalsolution.v2.LogicalInterface getLogicalInterfaces(int index) { if (logicalInterfacesBuilder_ == null) { return logicalInterfaces_.get(index); } else { return logicalInterfacesBuilder_.getMessage(index); } } /** * * *
     * 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder setLogicalInterfaces( int index, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { if (logicalInterfacesBuilder_ == null) { ensureLogicalInterfacesIsMutable(); logicalInterfaces_.set(index, builderForValue.build()); onChanged(); } else { logicalInterfacesBuilder_.setMessage(index, builderForValue.build()); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder addLogicalInterfaces( com.google.cloud.baremetalsolution.v2.LogicalInterface value) { if (logicalInterfacesBuilder_ == null) { if (value == null) { throw new NullPointerException(); } ensureLogicalInterfacesIsMutable(); logicalInterfaces_.add(value); onChanged(); } else { logicalInterfacesBuilder_.addMessage(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.
     * 
* * 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder addLogicalInterfaces( com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { if (logicalInterfacesBuilder_ == null) { ensureLogicalInterfacesIsMutable(); logicalInterfaces_.add(builderForValue.build()); onChanged(); } else { logicalInterfacesBuilder_.addMessage(builderForValue.build()); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder addLogicalInterfaces( int index, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder builderForValue) { if (logicalInterfacesBuilder_ == null) { ensureLogicalInterfacesIsMutable(); logicalInterfaces_.add(index, builderForValue.build()); onChanged(); } else { logicalInterfacesBuilder_.addMessage(index, builderForValue.build()); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder addAllLogicalInterfaces( java.lang.Iterable values) { if (logicalInterfacesBuilder_ == null) { ensureLogicalInterfacesIsMutable(); com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalInterfaces_); onChanged(); } else { logicalInterfacesBuilder_.addAllMessages(values); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder clearLogicalInterfaces() { if (logicalInterfacesBuilder_ == null) { logicalInterfaces_ = java.util.Collections.emptyList(); bitField0_ = (bitField0_ & ~0x00004000); onChanged(); } else { logicalInterfacesBuilder_.clear(); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public Builder removeLogicalInterfaces(int index) { if (logicalInterfacesBuilder_ == null) { ensureLogicalInterfacesIsMutable(); logicalInterfaces_.remove(index); onChanged(); } else { logicalInterfacesBuilder_.remove(index); } 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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder getLogicalInterfacesBuilder(int index) { return getLogicalInterfacesFieldBuilder().getBuilder(index); } /** * * *
     * 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 com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder getLogicalInterfacesOrBuilder(int index) { if (logicalInterfacesBuilder_ == null) { return logicalInterfaces_.get(index); } else { return logicalInterfacesBuilder_.getMessageOrBuilder(index); } } /** * * *
     * 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 java.util.List getLogicalInterfacesOrBuilderList() { if (logicalInterfacesBuilder_ != null) { return logicalInterfacesBuilder_.getMessageOrBuilderList(); } else { return java.util.Collections.unmodifiableList(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.
     * 
* * repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 15; * */ public com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder addLogicalInterfacesBuilder() { return getLogicalInterfacesFieldBuilder() .addBuilder(com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance()); } /** * * *
     * 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 com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder addLogicalInterfacesBuilder(int index) { return getLogicalInterfacesFieldBuilder() .addBuilder( index, com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance()); } /** * * *
     * 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 java.util.List getLogicalInterfacesBuilderList() { return getLogicalInterfacesFieldBuilder().getBuilderList(); } private com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.LogicalInterface, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder, com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder> getLogicalInterfacesFieldBuilder() { if (logicalInterfacesBuilder_ == null) { logicalInterfacesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3< com.google.cloud.baremetalsolution.v2.LogicalInterface, com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder, com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder>( logicalInterfaces_, ((bitField0_ & 0x00004000) != 0), getParentForChildren(), isClean()); logicalInterfaces_ = null; } return logicalInterfacesBuilder_; } @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:google.cloud.baremetalsolution.v2.Instance) } // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.Instance) private static final com.google.cloud.baremetalsolution.v2.Instance DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.Instance(); } public static com.google.cloud.baremetalsolution.v2.Instance getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public Instance parsePartialFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws com.google.protobuf.InvalidProtocolBufferException { Builder builder = newBuilder(); try { builder.mergeFrom(input, extensionRegistry); } catch (com.google.protobuf.InvalidProtocolBufferException e) { throw e.setUnfinishedMessage(builder.buildPartial()); } catch (com.google.protobuf.UninitializedMessageException e) { throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial()); } catch (java.io.IOException e) { throw new com.google.protobuf.InvalidProtocolBufferException(e) .setUnfinishedMessage(builder.buildPartial()); } return builder.buildPartial(); } }; public static com.google.protobuf.Parser parser() { return PARSER; } @java.lang.Override public com.google.protobuf.Parser getParserForType() { return PARSER; } @java.lang.Override public com.google.cloud.baremetalsolution.v2.Instance getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy