com.google.cloud.baremetalsolution.v2.LogicalInterface 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/network.proto
package com.google.cloud.baremetalsolution.v2;
/**
*
*
*
* Each logical interface represents a logical abstraction of the underlying
* physical interface (for eg. bond, nic) of the instance. Each logical
* interface can effectively map to multiple network-IP pairs and still be
* mapped to one underlying physical interface.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.LogicalInterface}
*/
public final class LogicalInterface extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.LogicalInterface)
LogicalInterfaceOrBuilder {
private static final long serialVersionUID = 0L;
// Use LogicalInterface.newBuilder() to construct.
private LogicalInterface(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LogicalInterface() {
logicalNetworkInterfaces_ = java.util.Collections.emptyList();
name_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LogicalInterface();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.LogicalInterface.class,
com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder.class);
}
public interface LogicalNetworkInterfaceOrBuilder
extends
// @@protoc_insertion_point(interface_extends:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)
com.google.protobuf.MessageOrBuilder {
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The network.
*/
java.lang.String getNetwork();
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The bytes for network.
*/
com.google.protobuf.ByteString getNetworkBytes();
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The ipAddress.
*/
java.lang.String getIpAddress();
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The bytes for ipAddress.
*/
com.google.protobuf.ByteString getIpAddressBytes();
/**
*
*
*
* Whether this interface is the default gateway for the instance. Only
* one interface can be the default gateway for the instance.
*
*
* bool default_gateway = 3;
*
* @return The defaultGateway.
*/
boolean getDefaultGateway();
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The enum numeric value on the wire for networkType.
*/
int getNetworkTypeValue();
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The networkType.
*/
com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType();
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return The id.
*/
java.lang.String getId();
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return The bytes for id.
*/
com.google.protobuf.ByteString getIdBytes();
}
/**
*
*
*
* Each logical network interface is effectively a network and IP pair.
*
*
* Protobuf type {@code
* google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface}
*/
public static final class LogicalNetworkInterface extends com.google.protobuf.GeneratedMessageV3
implements
// @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)
LogicalNetworkInterfaceOrBuilder {
private static final long serialVersionUID = 0L;
// Use LogicalNetworkInterface.newBuilder() to construct.
private LogicalNetworkInterface(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private LogicalNetworkInterface() {
network_ = "";
ipAddress_ = "";
networkType_ = 0;
id_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
return new LogicalNetworkInterface();
}
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.class,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
.class);
}
public static final int NETWORK_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object network_ = "";
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The network.
*/
@java.lang.Override
public java.lang.String getNetwork() {
java.lang.Object ref = network_;
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();
network_ = s;
return s;
}
}
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The bytes for network.
*/
@java.lang.Override
public com.google.protobuf.ByteString getNetworkBytes() {
java.lang.Object ref = network_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
network_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int IP_ADDRESS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object ipAddress_ = "";
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The ipAddress.
*/
@java.lang.Override
public java.lang.String getIpAddress() {
java.lang.Object ref = ipAddress_;
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();
ipAddress_ = s;
return s;
}
}
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The bytes for ipAddress.
*/
@java.lang.Override
public com.google.protobuf.ByteString getIpAddressBytes() {
java.lang.Object ref = ipAddress_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DEFAULT_GATEWAY_FIELD_NUMBER = 3;
private boolean defaultGateway_ = false;
/**
*
*
*
* Whether this interface is the default gateway for the instance. Only
* one interface can be the default gateway for the instance.
*
*
* bool default_gateway = 3;
*
* @return The defaultGateway.
*/
@java.lang.Override
public boolean getDefaultGateway() {
return defaultGateway_;
}
public static final int NETWORK_TYPE_FIELD_NUMBER = 4;
private int networkType_ = 0;
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The enum numeric value on the wire for networkType.
*/
@java.lang.Override
public int getNetworkTypeValue() {
return networkType_;
}
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The networkType.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType() {
com.google.cloud.baremetalsolution.v2.Network.Type result =
com.google.cloud.baremetalsolution.v2.Network.Type.forNumber(networkType_);
return result == null
? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED
: result;
}
public static final int ID_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object id_ = "";
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return The id.
*/
@java.lang.Override
public java.lang.String getId() {
java.lang.Object ref = id_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
}
}
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @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;
}
}
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(network_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, network_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, ipAddress_);
}
if (defaultGateway_ != false) {
output.writeBool(3, defaultGateway_);
}
if (networkType_
!= com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) {
output.writeEnum(4, networkType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, id_);
}
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(network_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, network_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, ipAddress_);
}
if (defaultGateway_ != false) {
size += com.google.protobuf.CodedOutputStream.computeBoolSize(3, defaultGateway_);
}
if (networkType_
!= com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) {
size += com.google.protobuf.CodedOutputStream.computeEnumSize(4, networkType_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, id_);
}
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.LogicalInterface.LogicalNetworkInterface)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface other =
(com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface) obj;
if (!getNetwork().equals(other.getNetwork())) return false;
if (!getIpAddress().equals(other.getIpAddress())) return false;
if (getDefaultGateway() != other.getDefaultGateway()) return false;
if (networkType_ != other.networkType_) return false;
if (!getId().equals(other.getId())) 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_FIELD_NUMBER;
hash = (53 * hash) + getNetwork().hashCode();
hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
hash = (53 * hash) + getIpAddress().hashCode();
hash = (37 * hash) + DEFAULT_GATEWAY_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(getDefaultGateway());
hash = (37 * hash) + NETWORK_TYPE_FIELD_NUMBER;
hash = (53 * hash) + networkType_;
hash = (37 * hash) + ID_FIELD_NUMBER;
hash = (53 * hash) + getId().hashCode();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
parseFrom(java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
parseFrom(com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
parseFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface
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.LogicalInterface.LogicalNetworkInterface 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;
}
/**
*
*
*
* Each logical network interface is effectively a network and IP pair.
*
*
* Protobuf type {@code
* google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface}
*/
public static final class Builder
extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.class,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.Builder.class);
}
// Construct using
// com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
network_ = "";
ipAddress_ = "";
defaultGateway_ = false;
networkType_ = 0;
id_ = "";
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_LogicalNetworkInterface_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
build() {
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface result =
buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
buildPartial() {
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface result =
new com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface(
this);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartial0(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.network_ = network_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.ipAddress_ = ipAddress_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.defaultGateway_ = defaultGateway_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.networkType_ = networkType_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.id_ = id_;
}
}
@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.LogicalInterface.LogicalNetworkInterface) {
return mergeFrom(
(com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)
other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface other) {
if (other
== com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.getDefaultInstance()) return this;
if (!other.getNetwork().isEmpty()) {
network_ = other.network_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getIpAddress().isEmpty()) {
ipAddress_ = other.ipAddress_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getDefaultGateway() != false) {
setDefaultGateway(other.getDefaultGateway());
}
if (other.networkType_ != 0) {
setNetworkTypeValue(other.getNetworkTypeValue());
}
if (!other.getId().isEmpty()) {
id_ = other.id_;
bitField0_ |= 0x00000010;
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:
{
network_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18:
{
ipAddress_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
defaultGateway_ = input.readBool();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32:
{
networkType_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 42:
{
id_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
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 network_ = "";
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The network.
*/
public java.lang.String getNetwork() {
java.lang.Object ref = network_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
network_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return The bytes for network.
*/
public com.google.protobuf.ByteString getNetworkBytes() {
java.lang.Object ref = network_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
network_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @param value The network to set.
* @return This builder for chaining.
*/
public Builder setNetwork(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
network_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @return This builder for chaining.
*/
public Builder clearNetwork() {
network_ = getDefaultInstance().getNetwork();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*
*
* Name of the network
*
*
* string network = 1;
*
* @param value The bytes for network to set.
* @return This builder for chaining.
*/
public Builder setNetworkBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
network_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object ipAddress_ = "";
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The ipAddress.
*/
public java.lang.String getIpAddress() {
java.lang.Object ref = ipAddress_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
ipAddress_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return The bytes for ipAddress.
*/
public com.google.protobuf.ByteString getIpAddressBytes() {
java.lang.Object ref = ipAddress_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
ipAddress_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @param value The ipAddress to set.
* @return This builder for chaining.
*/
public Builder setIpAddress(java.lang.String value) {
if (value == null) {
throw new NullPointerException();
}
ipAddress_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @return This builder for chaining.
*/
public Builder clearIpAddress() {
ipAddress_ = getDefaultInstance().getIpAddress();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* IP address in the network
*
*
* string ip_address = 2;
*
* @param value The bytes for ipAddress to set.
* @return This builder for chaining.
*/
public Builder setIpAddressBytes(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
checkByteStringIsUtf8(value);
ipAddress_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private boolean defaultGateway_;
/**
*
*
*
* Whether this interface is the default gateway for the instance. Only
* one interface can be the default gateway for the instance.
*
*
* bool default_gateway = 3;
*
* @return The defaultGateway.
*/
@java.lang.Override
public boolean getDefaultGateway() {
return defaultGateway_;
}
/**
*
*
*
* Whether this interface is the default gateway for the instance. Only
* one interface can be the default gateway for the instance.
*
*
* bool default_gateway = 3;
*
* @param value The defaultGateway to set.
* @return This builder for chaining.
*/
public Builder setDefaultGateway(boolean value) {
defaultGateway_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* Whether this interface is the default gateway for the instance. Only
* one interface can be the default gateway for the instance.
*
*
* bool default_gateway = 3;
*
* @return This builder for chaining.
*/
public Builder clearDefaultGateway() {
bitField0_ = (bitField0_ & ~0x00000004);
defaultGateway_ = false;
onChanged();
return this;
}
private int networkType_ = 0;
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The enum numeric value on the wire for networkType.
*/
@java.lang.Override
public int getNetworkTypeValue() {
return networkType_;
}
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @param value The enum numeric value on the wire for networkType to set.
* @return This builder for chaining.
*/
public Builder setNetworkTypeValue(int value) {
networkType_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return The networkType.
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.Network.Type getNetworkType() {
com.google.cloud.baremetalsolution.v2.Network.Type result =
com.google.cloud.baremetalsolution.v2.Network.Type.forNumber(networkType_);
return result == null
? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED
: result;
}
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @param value The networkType to set.
* @return This builder for chaining.
*/
public Builder setNetworkType(com.google.cloud.baremetalsolution.v2.Network.Type value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
networkType_ = value.getNumber();
onChanged();
return this;
}
/**
*
*
*
* Type of network.
*
*
* .google.cloud.baremetalsolution.v2.Network.Type network_type = 4;
*
* @return This builder for chaining.
*/
public Builder clearNetworkType() {
bitField0_ = (bitField0_ & ~0x00000008);
networkType_ = 0;
onChanged();
return this;
}
private java.lang.Object id_ = "";
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return The id.
*/
public java.lang.String getId() {
java.lang.Object ref = id_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
id_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return The bytes for id.
*/
public com.google.protobuf.ByteString getIdBytes() {
java.lang.Object ref = id_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
id_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @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_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @return This builder for chaining.
*/
public Builder clearId() {
id_ = getDefaultInstance().getId();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
*
*
* An identifier for the `Network`, generated by the backend.
*
*
* string id = 5;
*
* @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_ |= 0x00000010;
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.LogicalInterface.LogicalNetworkInterface)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface)
private static final com.google.cloud.baremetalsolution.v2.LogicalInterface
.LogicalNetworkInterface
DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE =
new com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface();
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LogicalNetworkInterface 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.LogicalInterface.LogicalNetworkInterface
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public static final int LOGICAL_NETWORK_INTERFACES_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private java.util.List<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>
logicalNetworkInterfaces_;
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
@java.lang.Override
public java.util.List<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>
getLogicalNetworkInterfacesList() {
return logicalNetworkInterfaces_;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
@java.lang.Override
public java.util.List<
? extends
com.google.cloud.baremetalsolution.v2.LogicalInterface
.LogicalNetworkInterfaceOrBuilder>
getLogicalNetworkInterfacesOrBuilderList() {
return logicalNetworkInterfaces_;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
@java.lang.Override
public int getLogicalNetworkInterfacesCount() {
return logicalNetworkInterfaces_.size();
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
getLogicalNetworkInterfaces(int index) {
return logicalNetworkInterfaces_.get(index);
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder
getLogicalNetworkInterfacesOrBuilder(int index) {
return logicalNetworkInterfaces_.get(index);
}
public static final int NAME_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object name_ = "";
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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 INTERFACE_INDEX_FIELD_NUMBER = 3;
private int interfaceIndex_ = 0;
/**
*
*
*
* The index of the logical interface mapping to the index of the hardware
* bond or nic on the chosen network template. This field is deprecated.
*
*
* int32 interface_index = 3 [deprecated = true];
*
* @deprecated google.cloud.baremetalsolution.v2.LogicalInterface.interface_index is deprecated.
* See google/cloud/baremetalsolution/v2/network.proto;l=243
* @return The interfaceIndex.
*/
@java.lang.Override
@java.lang.Deprecated
public int getInterfaceIndex() {
return interfaceIndex_;
}
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 {
for (int i = 0; i < logicalNetworkInterfaces_.size(); i++) {
output.writeMessage(1, logicalNetworkInterfaces_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, name_);
}
if (interfaceIndex_ != 0) {
output.writeInt32(3, interfaceIndex_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
for (int i = 0; i < logicalNetworkInterfaces_.size(); i++) {
size +=
com.google.protobuf.CodedOutputStream.computeMessageSize(
1, logicalNetworkInterfaces_.get(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, name_);
}
if (interfaceIndex_ != 0) {
size += com.google.protobuf.CodedOutputStream.computeInt32Size(3, interfaceIndex_);
}
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.LogicalInterface)) {
return super.equals(obj);
}
com.google.cloud.baremetalsolution.v2.LogicalInterface other =
(com.google.cloud.baremetalsolution.v2.LogicalInterface) obj;
if (!getLogicalNetworkInterfacesList().equals(other.getLogicalNetworkInterfacesList()))
return false;
if (!getName().equals(other.getName())) return false;
if (getInterfaceIndex() != other.getInterfaceIndex()) 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();
if (getLogicalNetworkInterfacesCount() > 0) {
hash = (37 * hash) + LOGICAL_NETWORK_INTERFACES_FIELD_NUMBER;
hash = (53 * hash) + getLogicalNetworkInterfacesList().hashCode();
}
hash = (37 * hash) + NAME_FIELD_NUMBER;
hash = (53 * hash) + getName().hashCode();
hash = (37 * hash) + INTERFACE_INDEX_FIELD_NUMBER;
hash = (53 * hash) + getInterfaceIndex();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface parseFrom(
java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface 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.LogicalInterface parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface 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.LogicalInterface parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface 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.LogicalInterface parseFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface 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.LogicalInterface parseDelimitedFrom(
java.io.InputStream input) throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface 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.LogicalInterface 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.LogicalInterface 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.LogicalInterface 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;
}
/**
*
*
*
* Each logical interface represents a logical abstraction of the underlying
* physical interface (for eg. bond, nic) of the instance. Each logical
* interface can effectively map to multiple network-IP pairs and still be
* mapped to one underlying physical interface.
*
*
* Protobuf type {@code google.cloud.baremetalsolution.v2.LogicalInterface}
*/
public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder
implements
// @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.LogicalInterface)
com.google.cloud.baremetalsolution.v2.LogicalInterfaceOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.google.cloud.baremetalsolution.v2.LogicalInterface.class,
com.google.cloud.baremetalsolution.v2.LogicalInterface.Builder.class);
}
// Construct using com.google.cloud.baremetalsolution.v2.LogicalInterface.newBuilder()
private Builder() {}
private Builder(com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
if (logicalNetworkInterfacesBuilder_ == null) {
logicalNetworkInterfaces_ = java.util.Collections.emptyList();
} else {
logicalNetworkInterfaces_ = null;
logicalNetworkInterfacesBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000001);
name_ = "";
interfaceIndex_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() {
return com.google.cloud.baremetalsolution.v2.NetworkProto
.internal_static_google_cloud_baremetalsolution_v2_LogicalInterface_descriptor;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface getDefaultInstanceForType() {
return com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance();
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface build() {
com.google.cloud.baremetalsolution.v2.LogicalInterface result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.google.cloud.baremetalsolution.v2.LogicalInterface buildPartial() {
com.google.cloud.baremetalsolution.v2.LogicalInterface result =
new com.google.cloud.baremetalsolution.v2.LogicalInterface(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) {
buildPartial0(result);
}
onBuilt();
return result;
}
private void buildPartialRepeatedFields(
com.google.cloud.baremetalsolution.v2.LogicalInterface result) {
if (logicalNetworkInterfacesBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0)) {
logicalNetworkInterfaces_ =
java.util.Collections.unmodifiableList(logicalNetworkInterfaces_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.logicalNetworkInterfaces_ = logicalNetworkInterfaces_;
} else {
result.logicalNetworkInterfaces_ = logicalNetworkInterfacesBuilder_.build();
}
}
private void buildPartial0(com.google.cloud.baremetalsolution.v2.LogicalInterface result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.name_ = name_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.interfaceIndex_ = interfaceIndex_;
}
}
@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.LogicalInterface) {
return mergeFrom((com.google.cloud.baremetalsolution.v2.LogicalInterface) other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.LogicalInterface other) {
if (other == com.google.cloud.baremetalsolution.v2.LogicalInterface.getDefaultInstance())
return this;
if (logicalNetworkInterfacesBuilder_ == null) {
if (!other.logicalNetworkInterfaces_.isEmpty()) {
if (logicalNetworkInterfaces_.isEmpty()) {
logicalNetworkInterfaces_ = other.logicalNetworkInterfaces_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.addAll(other.logicalNetworkInterfaces_);
}
onChanged();
}
} else {
if (!other.logicalNetworkInterfaces_.isEmpty()) {
if (logicalNetworkInterfacesBuilder_.isEmpty()) {
logicalNetworkInterfacesBuilder_.dispose();
logicalNetworkInterfacesBuilder_ = null;
logicalNetworkInterfaces_ = other.logicalNetworkInterfaces_;
bitField0_ = (bitField0_ & ~0x00000001);
logicalNetworkInterfacesBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
? getLogicalNetworkInterfacesFieldBuilder()
: null;
} else {
logicalNetworkInterfacesBuilder_.addAllMessages(other.logicalNetworkInterfaces_);
}
}
}
if (!other.getName().isEmpty()) {
name_ = other.name_;
bitField0_ |= 0x00000002;
onChanged();
}
if (other.getInterfaceIndex() != 0) {
setInterfaceIndex(other.getInterfaceIndex());
}
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:
{
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface m =
input.readMessage(
com.google.cloud.baremetalsolution.v2.LogicalInterface
.LogicalNetworkInterface.parser(),
extensionRegistry);
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.add(m);
} else {
logicalNetworkInterfacesBuilder_.addMessage(m);
}
break;
} // case 10
case 18:
{
name_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 24:
{
interfaceIndex_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
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.util.List<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>
logicalNetworkInterfaces_ = java.util.Collections.emptyList();
private void ensureLogicalNetworkInterfacesIsMutable() {
if (!((bitField0_ & 0x00000001) != 0)) {
logicalNetworkInterfaces_ =
new java.util.ArrayList<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>(
logicalNetworkInterfaces_);
bitField0_ |= 0x00000001;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder>
logicalNetworkInterfacesBuilder_;
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public java.util.List<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>
getLogicalNetworkInterfacesList() {
if (logicalNetworkInterfacesBuilder_ == null) {
return java.util.Collections.unmodifiableList(logicalNetworkInterfaces_);
} else {
return logicalNetworkInterfacesBuilder_.getMessageList();
}
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public int getLogicalNetworkInterfacesCount() {
if (logicalNetworkInterfacesBuilder_ == null) {
return logicalNetworkInterfaces_.size();
} else {
return logicalNetworkInterfacesBuilder_.getCount();
}
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
getLogicalNetworkInterfaces(int index) {
if (logicalNetworkInterfacesBuilder_ == null) {
return logicalNetworkInterfaces_.get(index);
} else {
return logicalNetworkInterfacesBuilder_.getMessage(index);
}
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder setLogicalNetworkInterfaces(
int index,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) {
if (logicalNetworkInterfacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.set(index, value);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder setLogicalNetworkInterfaces(
int index,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
builderForValue) {
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.set(index, builderForValue.build());
onChanged();
} else {
logicalNetworkInterfacesBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder addLogicalNetworkInterfaces(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) {
if (logicalNetworkInterfacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.add(value);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.addMessage(value);
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder addLogicalNetworkInterfaces(
int index,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface value) {
if (logicalNetworkInterfacesBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.add(index, value);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder addLogicalNetworkInterfaces(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
builderForValue) {
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.add(builderForValue.build());
onChanged();
} else {
logicalNetworkInterfacesBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder addLogicalNetworkInterfaces(
int index,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
builderForValue) {
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.add(index, builderForValue.build());
onChanged();
} else {
logicalNetworkInterfacesBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder addAllLogicalNetworkInterfaces(
java.lang.Iterable<
? extends
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface>
values) {
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(values, logicalNetworkInterfaces_);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder clearLogicalNetworkInterfaces() {
if (logicalNetworkInterfacesBuilder_ == null) {
logicalNetworkInterfaces_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.clear();
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public Builder removeLogicalNetworkInterfaces(int index) {
if (logicalNetworkInterfacesBuilder_ == null) {
ensureLogicalNetworkInterfacesIsMutable();
logicalNetworkInterfaces_.remove(index);
onChanged();
} else {
logicalNetworkInterfacesBuilder_.remove(index);
}
return this;
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
getLogicalNetworkInterfacesBuilder(int index) {
return getLogicalNetworkInterfacesFieldBuilder().getBuilder(index);
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder
getLogicalNetworkInterfacesOrBuilder(int index) {
if (logicalNetworkInterfacesBuilder_ == null) {
return logicalNetworkInterfaces_.get(index);
} else {
return logicalNetworkInterfacesBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public java.util.List<
? extends
com.google.cloud.baremetalsolution.v2.LogicalInterface
.LogicalNetworkInterfaceOrBuilder>
getLogicalNetworkInterfacesOrBuilderList() {
if (logicalNetworkInterfacesBuilder_ != null) {
return logicalNetworkInterfacesBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(logicalNetworkInterfaces_);
}
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
addLogicalNetworkInterfacesBuilder() {
return getLogicalNetworkInterfacesFieldBuilder()
.addBuilder(
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.getDefaultInstance());
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder
addLogicalNetworkInterfacesBuilder(int index) {
return getLogicalNetworkInterfacesFieldBuilder()
.addBuilder(
index,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.getDefaultInstance());
}
/**
*
*
*
* List of logical network interfaces within a logical interface.
*
*
*
* repeated .google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface logical_network_interfaces = 1;
*
*/
public java.util.List<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder>
getLogicalNetworkInterfacesBuilderList() {
return getLogicalNetworkInterfacesFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface.Builder,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterfaceOrBuilder>
getLogicalNetworkInterfacesFieldBuilder() {
if (logicalNetworkInterfacesBuilder_ == null) {
logicalNetworkInterfacesBuilder_ =
new com.google.protobuf.RepeatedFieldBuilderV3<
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface,
com.google.cloud.baremetalsolution.v2.LogicalInterface.LogicalNetworkInterface
.Builder,
com.google.cloud.baremetalsolution.v2.LogicalInterface
.LogicalNetworkInterfaceOrBuilder>(
logicalNetworkInterfaces_,
((bitField0_ & 0x00000001) != 0),
getParentForChildren(),
isClean());
logicalNetworkInterfaces_ = null;
}
return logicalNetworkInterfacesBuilder_;
}
private java.lang.Object name_ = "";
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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;
}
}
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @return This builder for chaining.
*/
public Builder clearName() {
name_ = getDefaultInstance().getName();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
*
*
* Interface name. This is of syntax <bond><bond_mode> or <nic> and
* forms part of the network template name.
*
*
* string name = 2;
*
* @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_ |= 0x00000002;
onChanged();
return this;
}
private int interfaceIndex_;
/**
*
*
*
* The index of the logical interface mapping to the index of the hardware
* bond or nic on the chosen network template. This field is deprecated.
*
*
* int32 interface_index = 3 [deprecated = true];
*
* @deprecated google.cloud.baremetalsolution.v2.LogicalInterface.interface_index is deprecated.
* See google/cloud/baremetalsolution/v2/network.proto;l=243
* @return The interfaceIndex.
*/
@java.lang.Override
@java.lang.Deprecated
public int getInterfaceIndex() {
return interfaceIndex_;
}
/**
*
*
*
* The index of the logical interface mapping to the index of the hardware
* bond or nic on the chosen network template. This field is deprecated.
*
*
* int32 interface_index = 3 [deprecated = true];
*
* @deprecated google.cloud.baremetalsolution.v2.LogicalInterface.interface_index is deprecated.
* See google/cloud/baremetalsolution/v2/network.proto;l=243
* @param value The interfaceIndex to set.
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder setInterfaceIndex(int value) {
interfaceIndex_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
*
*
* The index of the logical interface mapping to the index of the hardware
* bond or nic on the chosen network template. This field is deprecated.
*
*
* int32 interface_index = 3 [deprecated = true];
*
* @deprecated google.cloud.baremetalsolution.v2.LogicalInterface.interface_index is deprecated.
* See google/cloud/baremetalsolution/v2/network.proto;l=243
* @return This builder for chaining.
*/
@java.lang.Deprecated
public Builder clearInterfaceIndex() {
bitField0_ = (bitField0_ & ~0x00000004);
interfaceIndex_ = 0;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:google.cloud.baremetalsolution.v2.LogicalInterface)
}
// @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.LogicalInterface)
private static final com.google.cloud.baremetalsolution.v2.LogicalInterface DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.LogicalInterface();
}
public static com.google.cloud.baremetalsolution.v2.LogicalInterface getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser PARSER =
new com.google.protobuf.AbstractParser() {
@java.lang.Override
public LogicalInterface 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.LogicalInterface getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}