com.google.cloud.baremetalsolution.v2.InstanceConfig Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Show all versions of proto-google-cloud-bare-metal-solution-v2 Show documentation
Proto library for google-cloud-bare-metal-solution
/*
* 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/provisioning.proto
package com.google.cloud.baremetalsolution.v2;
/**
*
*
*
* Configuration parameters for a new instance.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.InstanceConfig}
*/
public final class InstanceConfig extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.InstanceConfig)
InstanceConfigOrBuilder {
private static final long serialVersionUID = 0L;
// Use InstanceConfig.newBuilder() to construct.
private InstanceConfig(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private InstanceConfig() {
name_ = "";
id_ = "";
instanceType_ = "";
osImage_ = "";
userNote_ = "";
networkConfig_ = 0;
networkTemplate_ = "";
logicalInterfaces_ = java.util.Collections.emptyList();
sshKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new InstanceConfig();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.InstanceConfig.class,
com.google.cloud.baremetalsolution.v2.InstanceConfig.Builder.class);
}
/**
*
*
*
* The network configuration of the instance.
*
*
* Protobuf enum {@code google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig}
*/
public enum NetworkConfig implements com.google.protobuf.ProtocolMessageEnum {
/**
*
*
*
* The unspecified network configuration.
*
*
* NETWORKCONFIG_UNSPECIFIED = 0;
*/
NETWORKCONFIG_UNSPECIFIED(0),
/**
*
*
*
* Instance part of single client network and single private network.
*
*
* SINGLE_VLAN = 1;
*/
SINGLE_VLAN(1),
/**
*
*
*
* Instance part of multiple (or single) client networks and private
* networks.
*
*
* MULTI_VLAN = 2;
*/
MULTI_VLAN(2),
UNRECOGNIZED(-1),
;
/**
*
*
*
* The unspecified network configuration.
*
*
* NETWORKCONFIG_UNSPECIFIED = 0;
*/
public static final int NETWORKCONFIG_UNSPECIFIED_VALUE = 0;
/**
*
*
*
* Instance part of single client network and single private network.
*
*
* SINGLE_VLAN = 1;
*/
public static final int SINGLE_VLAN_VALUE = 1;
/**
*
*
*
* Instance part of multiple (or single) client networks and private
* networks.
*
*
* MULTI_VLAN = 2;
*/
public static final int MULTI_VLAN_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static NetworkConfig 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 NetworkConfig forNumber(int value) {
switch (value) {
case 0:
return NETWORKCONFIG_UNSPECIFIED;
case 1:
return SINGLE_VLAN;
case 2:
return MULTI_VLAN;
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 NetworkConfig findValueByNumber(int number) {
return NetworkConfig.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.InstanceConfig.getDescriptor()
.getEnumTypes()
.get(0);
}
private static final NetworkConfig[] VALUES = values();
public static NetworkConfig 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 NetworkConfig(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig)
}
public interface NetworkAddressOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The networkId.
*/
java.lang.String getNetworkId();
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The bytes for networkId.
*/
com.google.protobuf.ByteString getNetworkIdBytes();
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The address.
*/
java.lang.String getAddress();
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The bytes for address.
*/
com.google.protobuf.ByteString getAddressBytes();
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The existingNetworkId.
*/
java.lang.String getExistingNetworkId();
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The bytes for existingNetworkId.
*/
com.google.protobuf.ByteString getExistingNetworkIdBytes();
}
/**
*
*
*
* A network.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress}
*/
public static final class NetworkAddress extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress)
NetworkAddressOrBuilder {
private static final long serialVersionUID = 0L;
// Use NetworkAddress.newBuilder() to construct.
private NetworkAddress(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private NetworkAddress() {
networkId_ = "";
address_ = "";
existingNetworkId_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new NetworkAddress();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_NetworkAddress_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_NetworkAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.class,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder.class);
}
public static final int NETWORK_ID_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object networkId_ = "";
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The networkId.
*/
@java.lang.Override
public java.lang.String getNetworkId() {
java.lang.Object ref = networkId_;
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();
networkId_ = s;
return s;
}
}
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The bytes for networkId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNetworkIdBytes() {
java.lang.Object ref = networkId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
networkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ADDRESS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object address_ = "";
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The address.
*/
@java.lang.Override
public java.lang.String getAddress() {
java.lang.Object ref = address_;
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();
address_ = s;
return s;
}
}
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The bytes for address.
*/
@java.lang.Override
public com.google.protobuf.ByteString getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int EXISTING_NETWORK_ID_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object existingNetworkId_ = "";
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The existingNetworkId.
*/
@java.lang.Override
public java.lang.String getExistingNetworkId() {
java.lang.Object ref = existingNetworkId_;
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();
existingNetworkId_ = s;
return s;
}
}
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The bytes for existingNetworkId.
*/
@java.lang.Override
public com.google.protobuf.ByteString getExistingNetworkIdBytes() {
java.lang.Object ref = existingNetworkId_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
existingNetworkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, networkId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, address_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingNetworkId_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, existingNetworkId_);
}
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(networkId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, networkId_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(address_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, address_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(existingNetworkId_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, existingNetworkId_);
}
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.InstanceConfig.NetworkAddress)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress other =
(com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress) obj;
if (!getNetworkId().equals(other.getNetworkId())) return false;
if (!getAddress().equals(other.getAddress())) return false;
if (!getExistingNetworkId().equals(other.getExistingNetworkId())) 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) + NETWORK_ID_FIELD_NUMBER;
hash = (53 * hash) + getNetworkId().hashCode();
hash = (37 * hash) + ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getAddress().hashCode();
hash = (37 * hash) + EXISTING_NETWORK_ID_FIELD_NUMBER;
hash = (53 * hash) + getExistingNetworkId().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress parseFrom(
byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
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.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress 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.InstanceConfig.NetworkAddress 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 network.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress)
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_NetworkAddress_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_NetworkAddress_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.class,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder.class);
}
// Construct using
// com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
networkId_ = "";
address_ = "";
existingNetworkId_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_NetworkAddress_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress build() {
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress buildPartial() {
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress result =
new com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress(this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.networkId_ = networkId_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.address_ = address_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.existingNetworkId_ = existingNetworkId_;
}
}
@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.InstanceConfig.NetworkAddress) {
return mergeFrom(
(com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress other) {
if (other
== com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()) return this;
if (!other.getNetworkId().isEmpty()) {
networkId_ = other.networkId_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getAddress().isEmpty()) {
address_ = other.address_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getExistingNetworkId().isEmpty()) {
existingNetworkId_ = other.existingNetworkId_;
bitField0_ |= 0x00000004;
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
networkId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
address_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
existingNetworkId_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
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 networkId_ = "";
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The networkId.
*/
public java.lang.String getNetworkId() {
java.lang.Object ref = networkId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
networkId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return The bytes for networkId.
*/
public com.google.protobuf.ByteString getNetworkIdBytes() {
java.lang.Object ref = networkId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
networkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @param value The networkId to set.
* @return This builder for chaining.
*/
public Builder setNetworkId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
networkId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @return This builder for chaining.
*/
public Builder clearNetworkId() {
networkId_ = getDefaultInstance().getNetworkId();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Id of the network to use, within the same ProvisioningConfig request.
*
*
* string network_id = 1;
*
* @param value The bytes for networkId to set.
* @return This builder for chaining.
*/
public Builder setNetworkIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
networkId_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object address_ = "";
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The address.
*/
public java.lang.String getAddress() {
java.lang.Object ref = address_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
address_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return The bytes for address.
*/
public com.google.protobuf.ByteString getAddressBytes() {
java.lang.Object ref = address_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
address_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @param value The address to set.
* @return This builder for chaining.
*/
public Builder setAddress(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
address_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @return This builder for chaining.
*/
public Builder clearAddress() {
address_ = getDefaultInstance().getAddress();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* IPv4 address to be assigned to the server.
*
*
* string address = 2;
*
* @param value The bytes for address to set.
* @return This builder for chaining.
*/
public Builder setAddressBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
address_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object existingNetworkId_ = "";
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The existingNetworkId.
*/
public java.lang.String getExistingNetworkId() {
java.lang.Object ref = existingNetworkId_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
existingNetworkId_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return The bytes for existingNetworkId.
*/
public com.google.protobuf.ByteString getExistingNetworkIdBytes() {
java.lang.Object ref = existingNetworkId_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
existingNetworkId_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @param value The existingNetworkId to set.
* @return This builder for chaining.
*/
public Builder setExistingNetworkId(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
existingNetworkId_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @return This builder for chaining.
*/
public Builder clearExistingNetworkId() {
existingNetworkId_ = getDefaultInstance().getExistingNetworkId();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Name of the existing network to use.
*
*
* string existing_network_id = 3;
*
* @param value The bytes for existingNetworkId to set.
* @return This builder for chaining.
*/
public Builder setExistingNetworkIdBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
existingNetworkId_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress)
private static final com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress();
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public NetworkAddress 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.InstanceConfig.NetworkAddress
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int NAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Output only. The name of the instance config.
*
*
* 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 name of the instance config.
*
*
* 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 = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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;
}
}
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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 INSTANCE_TYPE_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object instanceType_ = "";
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @return The instanceType.
*/
@java.lang.Override
public java.lang.String getInstanceType() {
java.lang.Object ref = instanceType_;
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();
instanceType_ = s;
return s;
}
}
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @return The bytes for instanceType.
*/
@java.lang.Override
public com.google.protobuf.ByteString getInstanceTypeBytes() {
java.lang.Object ref = instanceType_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
instanceType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HYPERTHREADING_FIELD_NUMBER = 4;
private boolean hyperthreading_ = false;
/**
*
*
*
* Whether the instance should be provisioned with Hyperthreading enabled.
*
*
* bool hyperthreading = 4;
*
* @return The hyperthreading.
*/
@java.lang.Override
public boolean getHyperthreading() {
return hyperthreading_;
}
public static final int OS_IMAGE_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object osImage_ = "";
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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;
}
}
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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 CLIENT_NETWORK_FIELD_NUMBER = 6;
private com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress clientNetwork_;
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.client_network is deprecated. See
* google/cloud/baremetalsolution/v2/provisioning.proto;l=283
* @return Whether the clientNetwork field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasClientNetwork() {
return clientNetwork_ != null;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.client_network is deprecated. See
* google/cloud/baremetalsolution/v2/provisioning.proto;l=283
* @return The clientNetwork.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress getClientNetwork() {
return clientNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.getDefaultInstance()
: clientNetwork_;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder
getClientNetworkOrBuilder() {
return clientNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.getDefaultInstance()
: clientNetwork_;
}
public static final int PRIVATE_NETWORK_FIELD_NUMBER = 7;
private com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress privateNetwork_;
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.private_network is deprecated. See
* google/cloud/baremetalsolution/v2/provisioning.proto;l=287
* @return Whether the privateNetwork field is set.
*/
@java.lang.Override
@java.lang.Deprecated
public boolean hasPrivateNetwork() {
return privateNetwork_ != null;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.private_network is deprecated. See
* google/cloud/baremetalsolution/v2/provisioning.proto;l=287
* @return The privateNetwork.
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress getPrivateNetwork() {
return privateNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.getDefaultInstance()
: privateNetwork_;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Override
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder
getPrivateNetworkOrBuilder() {
return privateNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.getDefaultInstance()
: privateNetwork_;
}
public static final int USER_NOTE_FIELD_NUMBER = 8;
@SuppressWarnings("serial")
private volatile java.lang.Object userNote_ = "";
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @return The userNote.
*/
@java.lang.Override
public java.lang.String getUserNote() {
java.lang.Object ref = userNote_;
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();
userNote_ = s;
return s;
}
}
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @return The bytes for userNote.
*/
@java.lang.Override
public com.google.protobuf.ByteString getUserNoteBytes() {
java.lang.Object ref = userNote_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
userNote_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int ACCOUNT_NETWORKS_ENABLED_FIELD_NUMBER = 9;
private boolean accountNetworksEnabled_ = false;
/**
*
*
*
* If true networks can be from different projects of the same vendor account.
*
*
* bool account_networks_enabled = 9;
*
* @return The accountNetworksEnabled.
*/
@java.lang.Override
public boolean getAccountNetworksEnabled() {
return accountNetworksEnabled_;
}
public static final int NETWORK_CONFIG_FIELD_NUMBER = 10;
private int networkConfig_ = 0;
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @return The enum numeric value on the wire for networkConfig.
*/
@java.lang.Override
public int getNetworkConfigValue() {
return networkConfig_;
}
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @return The networkConfig.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig getNetworkConfig() {
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig result =
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig.forNumber(
networkConfig_);
return result == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig.UNRECOGNIZED
: result;
}
public static final int NETWORK_TEMPLATE_FIELD_NUMBER = 11;
@SuppressWarnings("serial")
private volatile java.lang.Object networkTemplate_ = "";
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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;
}
}
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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 = 12;
@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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
@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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
@java.lang.Override
public java.util.List extends com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder>
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
@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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
@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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder
getLogicalInterfacesOrBuilder(int index) {
return logicalInterfaces_.get(index);
}
public static final int SSH_KEY_NAMES_FIELD_NUMBER = 13;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList sshKeyNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @return A list containing the sshKeyNames.
*/
public com.google.protobuf.ProtocolStringList getSshKeyNamesList() {
return sshKeyNames_;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @return The count of sshKeyNames.
*/
public int getSshKeyNamesCount() {
return sshKeyNames_.size();
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param index The index of the element to return.
* @return The sshKeyNames at the given index.
*/
public java.lang.String getSshKeyNames(int index) {
return sshKeyNames_.get(index);
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param index The index of the value to return.
* @return The bytes of the sshKeyNames at the given index.
*/
public com.google.protobuf.ByteString getSshKeyNamesBytes(int index) {
return sshKeyNames_.getByteString(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, instanceType_);
}
if (hyperthreading_ != false) {
output.writeBool(4, hyperthreading_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, osImage_);
}
if (clientNetwork_ != null) {
output.writeMessage(6, getClientNetwork());
}
if (privateNetwork_ != null) {
output.writeMessage(7, getPrivateNetwork());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userNote_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 8, userNote_);
}
if (accountNetworksEnabled_ != false) {
output.writeBool(9, accountNetworksEnabled_);
}
if (networkConfig_
!= com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig
.NETWORKCONFIG_UNSPECIFIED
.getNumber()) {
output.writeEnum(10, networkConfig_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 11, networkTemplate_);
}
for (int i = 0; i < logicalInterfaces_.size(); i++) {
output.writeMessage(12, logicalInterfaces_.get(i));
}
for (int i = 0; i < sshKeyNames_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 13, sshKeyNames_.getRaw(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 (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, id_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(instanceType_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, instanceType_);
}
if (hyperthreading_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(4, hyperthreading_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(osImage_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, osImage_);
}
if (clientNetwork_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(6, getClientNetwork());
}
if (privateNetwork_ != null) {
size += com.google.protobuf.CodedOutputStream.computeMessageSize(7, getPrivateNetwork());
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(userNote_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, userNote_);
}
if (accountNetworksEnabled_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(9, accountNetworksEnabled_);
}
if (networkConfig_
!= com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig
.NETWORKCONFIG_UNSPECIFIED
.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(10, networkConfig_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(networkTemplate_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(11, networkTemplate_);
}
for (int i = 0; i < logicalInterfaces_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(12, logicalInterfaces_.get(i));
}
{
int dataSize = 0;
for (int i = 0; i < sshKeyNames_.size(); i++) {
dataSize += computeStringSizeNoTag(sshKeyNames_.getRaw(i));
}
size += dataSize;
size += 1 * getSshKeyNamesList().size();
}
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.InstanceConfig)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.InstanceConfig other =
(com.google.cloud.baremetalsolution.v2.InstanceConfig) obj;
if (!getName().equals(other.getName())) return false;
if (!getId().equals(other.getId())) return false;
if (!getInstanceType().equals(other.getInstanceType())) return false;
if (getHyperthreading() != other.getHyperthreading()) return false;
if (!getOsImage().equals(other.getOsImage())) return false;
if (hasClientNetwork() != other.hasClientNetwork()) return false;
if (hasClientNetwork()) {
if (!getClientNetwork().equals(other.getClientNetwork())) return false;
}
if (hasPrivateNetwork() != other.hasPrivateNetwork()) return false;
if (hasPrivateNetwork()) {
if (!getPrivateNetwork().equals(other.getPrivateNetwork())) return false;
}
if (!getUserNote().equals(other.getUserNote())) return false;
if (getAccountNetworksEnabled() != other.getAccountNetworksEnabled()) return false;
if (networkConfig_ != other.networkConfig_) return false;
if (!getNetworkTemplate().equals(other.getNetworkTemplate())) return false;
if (!getLogicalInterfacesList().equals(other.getLogicalInterfacesList())) return false;
if (!getSshKeyNamesList().equals(other.getSshKeyNamesList())) 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();
hash = (37 * hash) + INSTANCE_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getInstanceType().hashCode();
hash = (37 * hash) + HYPERTHREADING_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getHyperthreading());
hash = (37 * hash) + OS_IMAGE_FIELD_NUMBER;
hash = (53 * hash) + getOsImage().hashCode();
if (hasClientNetwork()) {
hash = (37 * hash) + CLIENT_NETWORK_FIELD_NUMBER;
hash = (53 * hash) + getClientNetwork().hashCode();
}
if (hasPrivateNetwork()) {
hash = (37 * hash) + PRIVATE_NETWORK_FIELD_NUMBER;
hash = (53 * hash) + getPrivateNetwork().hashCode();
}
hash = (37 * hash) + USER_NOTE_FIELD_NUMBER;
hash = (53 * hash) + getUserNote().hashCode();
hash = (37 * hash) + ACCOUNT_NETWORKS_ENABLED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getAccountNetworksEnabled());
hash = (37 * hash) + NETWORK_CONFIG_FIELD_NUMBER;
hash = (53 * hash) + networkConfig_;
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();
}
if (getSshKeyNamesCount() > 0) {
hash = (37 * hash) + SSH_KEY_NAMES_FIELD_NUMBER;
hash = (53 * hash) + getSshKeyNamesList().hashCode();
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig 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.InstanceConfig parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig 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.InstanceConfig parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig 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.InstanceConfig parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig 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.InstanceConfig parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig 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.InstanceConfig 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.InstanceConfig 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.InstanceConfig 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;
}
/**
*
*
*
* Configuration parameters for a new instance.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.InstanceConfig}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.InstanceConfig)
com.google.cloud.baremetalsolution.v2.InstanceConfigOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.InstanceConfig.class,
com.google.cloud.baremetalsolution.v2.InstanceConfig.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.InstanceConfig.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_ = "";
instanceType_ = "";
hyperthreading_ = false;
osImage_ = "";
clientNetwork_ = null;
if (clientNetworkBuilder_ != null) {
clientNetworkBuilder_.dispose();
clientNetworkBuilder_ = null;
}
privateNetwork_ = null;
if (privateNetworkBuilder_ != null) {
privateNetworkBuilder_.dispose();
privateNetworkBuilder_ = null;
}
userNote_ = "";
accountNetworksEnabled_ = false;
networkConfig_ = 0;
networkTemplate_ = "";
if (logicalInterfacesBuilder_ == null) {
logicalInterfaces_ = java.util.Collections.emptyList();
} else {
logicalInterfaces_ = null;
logicalInterfacesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000800);
sshKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.ProvisioningProto
.internal_static_google_cloud_baremetalsolution_v2_InstanceConfig_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.InstanceConfig.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig build() {
com.google.cloud.baremetalsolution.v2.InstanceConfig result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig buildPartial() {
com.google.cloud.baremetalsolution.v2.InstanceConfig result =
new com.google.cloud.baremetalsolution.v2.InstanceConfig(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.baremetalsolution.v2.InstanceConfig result) {
if (logicalInterfacesBuilder_ == null) {
if (((bitField0_ & 0x00000800) != 0)) {
logicalInterfaces_ = java.util.Collections.unmodifiableList(logicalInterfaces_);
bitField0_ = (bitField0_ & ~0x00000800);
}
result.logicalInterfaces_ = logicalInterfaces_;
} else {
result.logicalInterfaces_ = logicalInterfacesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.baremetalsolution.v2.InstanceConfig 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.instanceType_ = instanceType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.hyperthreading_ = hyperthreading_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.osImage_ = osImage_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.clientNetwork_ =
clientNetworkBuilder_ == null ? clientNetwork_ : clientNetworkBuilder_.build();
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.privateNetwork_ =
privateNetworkBuilder_ == null ? privateNetwork_ : privateNetworkBuilder_.build();
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.userNote_ = userNote_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.accountNetworksEnabled_ = accountNetworksEnabled_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.networkConfig_ = networkConfig_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.networkTemplate_ = networkTemplate_;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
sshKeyNames_.makeImmutable();
result.sshKeyNames_ = sshKeyNames_;
}
}
@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.InstanceConfig) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.InstanceConfig) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.InstanceConfig other) {
if (other == com.google.cloud.baremetalsolution.v2.InstanceConfig.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.getInstanceType().isEmpty()) {
instanceType_ = other.instanceType_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getHyperthreading() != false) {
setHyperthreading(other.getHyperthreading());
}
if (!other.getOsImage().isEmpty()) {
osImage_ = other.osImage_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.hasClientNetwork()) {
mergeClientNetwork(other.getClientNetwork());
}
if (other.hasPrivateNetwork()) {
mergePrivateNetwork(other.getPrivateNetwork());
}
if (!other.getUserNote().isEmpty()) {
userNote_ = other.userNote_;
bitField0_ |= 0x00000080;
onChanged();
}
if (other.getAccountNetworksEnabled() != false) {
setAccountNetworksEnabled(other.getAccountNetworksEnabled());
}
if (other.networkConfig_ != 0) {
setNetworkConfigValue(other.getNetworkConfigValue());
}
if (!other.getNetworkTemplate().isEmpty()) {
networkTemplate_ = other.networkTemplate_;
bitField0_ |= 0x00000400;
onChanged();
}
if (logicalInterfacesBuilder_ == null) {
if (!other.logicalInterfaces_.isEmpty()) {
if (logicalInterfaces_.isEmpty()) {
logicalInterfaces_ = other.logicalInterfaces_;
bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureLogicalInterfacesIsMutable();
logicalInterfaces_.addAll(other.logicalInterfaces_);
}
onChanged();
}
} else {
if (!other.logicalInterfaces_.isEmpty()) {
if (logicalInterfacesBuilder_.isEmpty()) {
logicalInterfacesBuilder_.dispose();
logicalInterfacesBuilder_ = null;
logicalInterfaces_ = other.logicalInterfaces_;
bitField0_ = (bitField0_ & ~0x00000800);
logicalInterfacesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getLogicalInterfacesFieldBuilder()
: null;
} else {
logicalInterfacesBuilder_.addAllMessages(other.logicalInterfaces_);
}
}
}
if (!other.sshKeyNames_.isEmpty()) {
if (sshKeyNames_.isEmpty()) {
sshKeyNames_ = other.sshKeyNames_;
bitField0_ |= 0x00001000;
} else {
ensureSshKeyNamesIsMutable();
sshKeyNames_.addAll(other.sshKeyNames_);
}
onChanged();
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26:
{
instanceType_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32:
{
hyperthreading_ = input.readBool();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42:
{
osImage_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 50:
{
input.readMessage(getClientNetworkFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58:
{
input.readMessage(getPrivateNetworkFieldBuilder().getBuilder(), extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 66:
{
userNote_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000080;
break;
} // case 66
case 72:
{
accountNetworksEnabled_ = input.readBool();
bitField0_ |= 0x00000100;
break;
} // case 72
case 80:
{
networkConfig_ = input.readEnum();
bitField0_ |= 0x00000200;
break;
} // case 80
case 90:
{
networkTemplate_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000400;
break;
} // case 90
case 98:
{
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 98
case 106:
{
java.lang.String s = input.readStringRequireUtf8();
ensureSshKeyNamesIsMutable();
sshKeyNames_.add(s);
break;
} // case 106
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 name of the instance config.
*
*
* 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 name of the instance config.
*
*
* 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 name of the instance config.
*
*
* 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 name of the instance config.
*
*
* 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 name of the instance config.
*
*
* 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_ = "";
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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;
}
}
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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;
}
}
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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;
}
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* A transient unique identifier to idenfity an instance within an
* ProvisioningConfig request.
*
*
* string id = 2;
*
* @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 java.lang.Object instanceType_ = "";
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @return The instanceType.
*/
public java.lang.String getInstanceType() {
java.lang.Object ref = instanceType_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
instanceType_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @return The bytes for instanceType.
*/
public com.google.protobuf.ByteString getInstanceTypeBytes() {
java.lang.Object ref = instanceType_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
instanceType_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @param value The instanceType to set.
* @return This builder for chaining.
*/
public Builder setInstanceType(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
instanceType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @return This builder for chaining.
*/
public Builder clearInstanceType() {
instanceType_ = getDefaultInstance().getInstanceType();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
*
*
* Instance type.
* [Available
* types](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string instance_type = 3;
*
* @param value The bytes for instanceType to set.
* @return This builder for chaining.
*/
public Builder setInstanceTypeBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
instanceType_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private boolean hyperthreading_;
/**
*
*
*
* Whether the instance should be provisioned with Hyperthreading enabled.
*
*
* bool hyperthreading = 4;
*
* @return The hyperthreading.
*/
@java.lang.Override
public boolean getHyperthreading() {
return hyperthreading_;
}
/**
*
*
*
* Whether the instance should be provisioned with Hyperthreading enabled.
*
*
* bool hyperthreading = 4;
*
* @param value The hyperthreading to set.
* @return This builder for chaining.
*/
public Builder setHyperthreading(boolean value) {
hyperthreading_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Whether the instance should be provisioned with Hyperthreading enabled.
*
*
* bool hyperthreading = 4;
*
* @return This builder for chaining.
*/
public Builder clearHyperthreading() {
bitField0_ = (bitField0_ & ~0x00000008);
hyperthreading_ = false;
onChanged();
return this;
}
private java.lang.Object osImage_ = "";
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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;
}
}
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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;
}
}
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @return This builder for chaining.
*/
public Builder clearOsImage() {
osImage_ = getDefaultInstance().getOsImage();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* OS image to initialize the instance.
* [Available
* images](https://cloud.google.com/bare-metal/docs/bms-planning#server_configurations)
*
*
* string os_image = 5;
*
* @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_ |= 0x00000010;
onChanged();
return this;
}
private com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress clientNetwork_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>
clientNetworkBuilder_;
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.client_network is deprecated.
* See google/cloud/baremetalsolution/v2/provisioning.proto;l=283
* @return Whether the clientNetwork field is set.
*/
@java.lang.Deprecated
public boolean hasClientNetwork() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.client_network is deprecated.
* See google/cloud/baremetalsolution/v2/provisioning.proto;l=283
* @return The clientNetwork.
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress getClientNetwork() {
if (clientNetworkBuilder_ == null) {
return clientNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()
: clientNetwork_;
} else {
return clientNetworkBuilder_.getMessage();
}
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setClientNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress value) {
if (clientNetworkBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
clientNetwork_ = value;
} else {
clientNetworkBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setClientNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder
builderForValue) {
if (clientNetworkBuilder_ == null) {
clientNetwork_ = builderForValue.build();
} else {
clientNetworkBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder mergeClientNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress value) {
if (clientNetworkBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 0)
&& clientNetwork_ != null
&& clientNetwork_
!= com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()) {
getClientNetworkBuilder().mergeFrom(value);
} else {
clientNetwork_ = value;
}
} else {
clientNetworkBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder clearClientNetwork() {
bitField0_ = (bitField0_ & ~0x00000020);
clientNetwork_ = null;
if (clientNetworkBuilder_ != null) {
clientNetworkBuilder_.dispose();
clientNetworkBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder
getClientNetworkBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getClientNetworkFieldBuilder().getBuilder();
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder
getClientNetworkOrBuilder() {
if (clientNetworkBuilder_ != null) {
return clientNetworkBuilder_.getMessageOrBuilder();
} else {
return clientNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()
: clientNetwork_;
}
}
/**
*
*
*
* Client network address. Filled if InstanceConfig.multivlan_config is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress client_network = 6 [deprecated = true];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>
getClientNetworkFieldBuilder() {
if (clientNetworkBuilder_ == null) {
clientNetworkBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>(
getClientNetwork(), getParentForChildren(), isClean());
clientNetwork_ = null;
}
return clientNetworkBuilder_;
}
private com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress privateNetwork_;
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>
privateNetworkBuilder_;
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.private_network is deprecated.
* See google/cloud/baremetalsolution/v2/provisioning.proto;l=287
* @return Whether the privateNetwork field is set.
*/
@java.lang.Deprecated
public boolean hasPrivateNetwork() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*
* @deprecated google.cloud.baremetalsolution.v2.InstanceConfig.private_network is deprecated.
* See google/cloud/baremetalsolution/v2/provisioning.proto;l=287
* @return The privateNetwork.
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress getPrivateNetwork() {
if (privateNetworkBuilder_ == null) {
return privateNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()
: privateNetwork_;
} else {
return privateNetworkBuilder_.getMessage();
}
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setPrivateNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress value) {
if (privateNetworkBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
privateNetwork_ = value;
} else {
privateNetworkBuilder_.setMessage(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder setPrivateNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder
builderForValue) {
if (privateNetworkBuilder_ == null) {
privateNetwork_ = builderForValue.build();
} else {
privateNetworkBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder mergePrivateNetwork(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress value) {
if (privateNetworkBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)
&& privateNetwork_ != null
&& privateNetwork_
!= com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()) {
getPrivateNetworkBuilder().mergeFrom(value);
} else {
privateNetwork_ = value;
}
} else {
privateNetworkBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public Builder clearPrivateNetwork() {
bitField0_ = (bitField0_ & ~0x00000040);
privateNetwork_ = null;
if (privateNetworkBuilder_ != null) {
privateNetworkBuilder_.dispose();
privateNetworkBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder
getPrivateNetworkBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getPrivateNetworkFieldBuilder().getBuilder();
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
@java.lang.Deprecated
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder
getPrivateNetworkOrBuilder() {
if (privateNetworkBuilder_ != null) {
return privateNetworkBuilder_.getMessageOrBuilder();
} else {
return privateNetwork_ == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress
.getDefaultInstance()
: privateNetwork_;
}
}
/**
*
*
*
* Private network address, if any. Filled if InstanceConfig.multivlan_config
* is false.
*
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress private_network = 7 [deprecated = true];
*
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>
getPrivateNetworkFieldBuilder() {
if (privateNetworkBuilder_ == null) {
privateNetworkBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddress.Builder,
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkAddressOrBuilder>(
getPrivateNetwork(), getParentForChildren(), isClean());
privateNetwork_ = null;
}
return privateNetworkBuilder_;
}
private java.lang.Object userNote_ = "";
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @return The userNote.
*/
public java.lang.String getUserNote() {
java.lang.Object ref = userNote_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
userNote_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @return The bytes for userNote.
*/
public com.google.protobuf.ByteString getUserNoteBytes() {
java.lang.Object ref = userNote_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
userNote_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @param value The userNote to set.
* @return This builder for chaining.
*/
public Builder setUserNote(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
userNote_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @return This builder for chaining.
*/
public Builder clearUserNote() {
userNote_ = getDefaultInstance().getUserNote();
bitField0_ = (bitField0_ & ~0x00000080);
onChanged();
return this;
}
/**
*
*
*
* User note field, it can be used by customers to add additional information
* for the BMS Ops team .
*
*
* string user_note = 8;
*
* @param value The bytes for userNote to set.
* @return This builder for chaining.
*/
public Builder setUserNoteBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
userNote_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
private boolean accountNetworksEnabled_;
/**
*
*
*
* If true networks can be from different projects of the same vendor account.
*
*
* bool account_networks_enabled = 9;
*
* @return The accountNetworksEnabled.
*/
@java.lang.Override
public boolean getAccountNetworksEnabled() {
return accountNetworksEnabled_;
}
/**
*
*
*
* If true networks can be from different projects of the same vendor account.
*
*
* bool account_networks_enabled = 9;
*
* @param value The accountNetworksEnabled to set.
* @return This builder for chaining.
*/
public Builder setAccountNetworksEnabled(boolean value) {
accountNetworksEnabled_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*
*
* If true networks can be from different projects of the same vendor account.
*
*
* bool account_networks_enabled = 9;
*
* @return This builder for chaining.
*/
public Builder clearAccountNetworksEnabled() {
bitField0_ = (bitField0_ & ~0x00000100);
accountNetworksEnabled_ = false;
onChanged();
return this;
}
private int networkConfig_ = 0;
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @return The enum numeric value on the wire for networkConfig.
*/
@java.lang.Override
public int getNetworkConfigValue() {
return networkConfig_;
}
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @param value The enum numeric value on the wire for networkConfig to set.
* @return This builder for chaining.
*/
public Builder setNetworkConfigValue(int value) {
networkConfig_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @return The networkConfig.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig getNetworkConfig() {
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig result =
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig.forNumber(
networkConfig_);
return result == null
? com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig.UNRECOGNIZED
: result;
}
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @param value The networkConfig to set.
* @return This builder for chaining.
*/
public Builder setNetworkConfig(
com.google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000200;
networkConfig_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* The type of network configuration on the instance.
*
*
* .google.cloud.baremetalsolution.v2.InstanceConfig.NetworkConfig network_config = 10;
*
*
* @return This builder for chaining.
*/
public Builder clearNetworkConfig() {
bitField0_ = (bitField0_ & ~0x00000200);
networkConfig_ = 0;
onChanged();
return this;
}
private java.lang.Object networkTemplate_ = "";
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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;
}
}
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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;
}
}
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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_ |= 0x00000400;
onChanged();
return this;
}
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @return This builder for chaining.
*/
public Builder clearNetworkTemplate() {
networkTemplate_ = getDefaultInstance().getNetworkTemplate();
bitField0_ = (bitField0_ & ~0x00000400);
onChanged();
return this;
}
/**
*
*
*
* Server network template name. Filled if InstanceConfig.multivlan_config is
* true.
*
*
* string network_template = 11;
*
* @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_ |= 0x00000400;
onChanged();
return this;
}
private java.util.List
logicalInterfaces_ = java.util.Collections.emptyList();
private void ensureLogicalInterfacesIsMutable() {
if (!((bitField0_ & 0x00000800) != 0)) {
logicalInterfaces_ =
new java.util.ArrayList(
logicalInterfaces_);
bitField0_ |= 0x00000800;
}
}
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
public Builder addAllLogicalInterfaces(
java.lang.Iterable extends com.google.cloud.baremetalsolution.v2.LogicalInterface>
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
public Builder clearLogicalInterfaces() {
if (logicalInterfacesBuilder_ == null) {
logicalInterfaces_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000800);
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
public java.util.List extends com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder>
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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. Filled if InstanceConfig.multivlan_config is true.
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface logical_interfaces = 12;
*
*/
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_ & 0x00000800) != 0),
getParentForChildren(),
isClean());
logicalInterfaces_ = null;
}
return logicalInterfacesBuilder_;
}
private com.google.protobuf.LazyStringArrayList sshKeyNames_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureSshKeyNamesIsMutable() {
if (!sshKeyNames_.isModifiable()) {
sshKeyNames_ = new com.google.protobuf.LazyStringArrayList(sshKeyNames_);
}
bitField0_ |= 0x00001000;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @return A list containing the sshKeyNames.
*/
public com.google.protobuf.ProtocolStringList getSshKeyNamesList() {
sshKeyNames_.makeImmutable();
return sshKeyNames_;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @return The count of sshKeyNames.
*/
public int getSshKeyNamesCount() {
return sshKeyNames_.size();
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param index The index of the element to return.
* @return The sshKeyNames at the given index.
*/
public java.lang.String getSshKeyNames(int index) {
return sshKeyNames_.get(index);
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param index The index of the value to return.
* @return The bytes of the sshKeyNames at the given index.
*/
public com.google.protobuf.ByteString getSshKeyNamesBytes(int index) {
return sshKeyNames_.getByteString(index);
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param index The index to set the value at.
* @param value The sshKeyNames to set.
* @return This builder for chaining.
*/
public Builder setSshKeyNames(int index, java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSshKeyNamesIsMutable();
sshKeyNames_.set(index, value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param value The sshKeyNames to add.
* @return This builder for chaining.
*/
public Builder addSshKeyNames(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ensureSshKeyNamesIsMutable();
sshKeyNames_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param values The sshKeyNames to add.
* @return This builder for chaining.
*/
public Builder addAllSshKeyNames(java.lang.Iterable values) {
ensureSshKeyNamesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, sshKeyNames_);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @return This builder for chaining.
*/
public Builder clearSshKeyNames() {
sshKeyNames_ = com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00001000);
;
onChanged();
return this;
}
/**
*
*
*
* List of names of ssh keys used to provision the instance.
*
*
* repeated string ssh_key_names = 13;
*
* @param value The bytes of the sshKeyNames to add.
* @return This builder for chaining.
*/
public Builder addSshKeyNamesBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ensureSshKeyNamesIsMutable();
sshKeyNames_.add(value);
bitField0_ |= 0x00001000;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.InstanceConfig)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.InstanceConfig)
private static final com.google.cloud.baremetalsolution.v2.InstanceConfig DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.InstanceConfig();
}
public static com.google.cloud.baremetalsolution.v2.InstanceConfig getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public InstanceConfig 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.InstanceConfig getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}