/*
 * Copyright 2020 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;

/**
 *
 *
 * <pre>
 * A Network.
 * </pre>
 *
 * Protobuf type {@code google.cloud.baremetalsolution.v2.Network}
 */
public final class Network extends com.google.protobuf.GeneratedMessageV3
    implements
    // @@protoc_insertion_point(message_implements:google.cloud.baremetalsolution.v2.Network)
    NetworkOrBuilder {
  private static final long serialVersionUID = 0L;
  // Use Network.newBuilder() to construct.
  private Network(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
    super(builder);
  }

  private Network() {
    name_ = "";
    id_ = "";
    type_ = 0;
    ipAddress_ = "";
    macAddress_ = com.google.protobuf.LazyStringArrayList.EMPTY;
    state_ = 0;
    vlanId_ = "";
    cidr_ = "";
    servicesCidr_ = "";
    reservations_ = java.util.Collections.emptyList();
  }

  @java.lang.Override
  @SuppressWarnings({"unused"})
  protected java.lang.Object newInstance(UnusedPrivateParameter unused) {
    return new Network();
  }

  @java.lang.Override
  public final com.google.protobuf.UnknownFieldSet getUnknownFields() {
    return this.unknownFields;
  }

  public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
    return com.google.cloud.baremetalsolution.v2.NetworkProto
        .internal_static_google_cloud_baremetalsolution_v2_Network_descriptor;
  }

  @SuppressWarnings({"rawtypes"})
  @java.lang.Override
  protected com.google.protobuf.MapField internalGetMapField(int number) {
    switch (number) {
      case 11:
        return internalGetLabels();
      default:
        throw new RuntimeException("Invalid map field number: " + number);
    }
  }

  @java.lang.Override
  protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
      internalGetFieldAccessorTable() {
    return com.google.cloud.baremetalsolution.v2.NetworkProto
        .internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable
        .ensureFieldAccessorsInitialized(
            com.google.cloud.baremetalsolution.v2.Network.class,
            com.google.cloud.baremetalsolution.v2.Network.Builder.class);
  }

  /**
   *
   *
   * <pre>
   * Network type.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.baremetalsolution.v2.Network.Type}
   */
  public enum Type implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * Unspecified value.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    TYPE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * Client network, a network peered to a Google Cloud VPC.
     * </pre>
     *
     * <code>CLIENT = 1;</code>
     */
    CLIENT(1),
    /**
     *
     *
     * <pre>
     * Private network, a network local to the Bare Metal Solution environment.
     * </pre>
     *
     * <code>PRIVATE = 2;</code>
     */
    PRIVATE(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * Unspecified value.
     * </pre>
     *
     * <code>TYPE_UNSPECIFIED = 0;</code>
     */
    public static final int TYPE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * Client network, a network peered to a Google Cloud VPC.
     * </pre>
     *
     * <code>CLIENT = 1;</code>
     */
    public static final int CLIENT_VALUE = 1;
    /**
     *
     *
     * <pre>
     * Private network, a network local to the Bare Metal Solution environment.
     * </pre>
     *
     * <code>PRIVATE = 2;</code>
     */
    public static final int PRIVATE_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 Type 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 Type forNumber(int value) {
      switch (value) {
        case 0:
          return TYPE_UNSPECIFIED;
        case 1:
          return CLIENT;
        case 2:
          return PRIVATE;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<Type> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<Type> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<Type>() {
          public Type findValueByNumber(int number) {
            return Type.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.Network.getDescriptor().getEnumTypes().get(0);
    }

    private static final Type[] VALUES = values();

    public static Type 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 Type(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Network.Type)
  }

  /**
   *
   *
   * <pre>
   * The possible states for this Network.
   * </pre>
   *
   * Protobuf enum {@code google.cloud.baremetalsolution.v2.Network.State}
   */
  public enum State implements com.google.protobuf.ProtocolMessageEnum {
    /**
     *
     *
     * <pre>
     * The Network is in an unknown state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    STATE_UNSPECIFIED(0),
    /**
     *
     *
     * <pre>
     * The Network is provisioning.
     * </pre>
     *
     * <code>PROVISIONING = 1;</code>
     */
    PROVISIONING(1),
    /**
     *
     *
     * <pre>
     * The Network has been provisioned.
     * </pre>
     *
     * <code>PROVISIONED = 2;</code>
     */
    PROVISIONED(2),
    UNRECOGNIZED(-1),
    ;

    /**
     *
     *
     * <pre>
     * The Network is in an unknown state.
     * </pre>
     *
     * <code>STATE_UNSPECIFIED = 0;</code>
     */
    public static final int STATE_UNSPECIFIED_VALUE = 0;
    /**
     *
     *
     * <pre>
     * The Network is provisioning.
     * </pre>
     *
     * <code>PROVISIONING = 1;</code>
     */
    public static final int PROVISIONING_VALUE = 1;
    /**
     *
     *
     * <pre>
     * The Network has been provisioned.
     * </pre>
     *
     * <code>PROVISIONED = 2;</code>
     */
    public static final int PROVISIONED_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 State valueOf(int value) {
      return forNumber(value);
    }

    /**
     * @param value The numeric wire value of the corresponding enum entry.
     * @return The enum associated with the given numeric wire value.
     */
    public static State forNumber(int value) {
      switch (value) {
        case 0:
          return STATE_UNSPECIFIED;
        case 1:
          return PROVISIONING;
        case 2:
          return PROVISIONED;
        default:
          return null;
      }
    }

    public static com.google.protobuf.Internal.EnumLiteMap<State> internalGetValueMap() {
      return internalValueMap;
    }

    private static final com.google.protobuf.Internal.EnumLiteMap<State> internalValueMap =
        new com.google.protobuf.Internal.EnumLiteMap<State>() {
          public State findValueByNumber(int number) {
            return State.forNumber(number);
          }
        };

    public final com.google.protobuf.Descriptors.EnumValueDescriptor getValueDescriptor() {
      if (this == UNRECOGNIZED) {
        throw new java.lang.IllegalStateException(
            "Can't get the descriptor of an unrecognized enum value.");
      }
      return getDescriptor().getValues().get(ordinal());
    }

    public final com.google.protobuf.Descriptors.EnumDescriptor getDescriptorForType() {
      return getDescriptor();
    }

    public static final com.google.protobuf.Descriptors.EnumDescriptor getDescriptor() {
      return com.google.cloud.baremetalsolution.v2.Network.getDescriptor().getEnumTypes().get(1);
    }

    private static final State[] VALUES = values();

    public static State valueOf(com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
      if (desc.getType() != getDescriptor()) {
        throw new java.lang.IllegalArgumentException("EnumValueDescriptor is not for this type.");
      }
      if (desc.getIndex() == -1) {
        return UNRECOGNIZED;
      }
      return VALUES[desc.getIndex()];
    }

    private final int value;

    private State(int value) {
      this.value = value;
    }

    // @@protoc_insertion_point(enum_scope:google.cloud.baremetalsolution.v2.Network.State)
  }

  public static final int NAME_FIELD_NUMBER = 5;

  @SuppressWarnings("serial")
  private volatile java.lang.Object name_ = "";
  /**
   *
   *
   * <pre>
   * Output only. The resource name of this `Network`.
   * Resource names are schemeless URIs that follow the conventions in
   * https://cloud.google.com/apis/design/resource_names.
   * Format:
   * `projects/{project}/locations/{location}/networks/{network}`
   * </pre>
   *
   * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * Output only. The resource name of this `Network`.
   * Resource names are schemeless URIs that follow the conventions in
   * https://cloud.google.com/apis/design/resource_names.
   * Format:
   * `projects/{project}/locations/{location}/networks/{network}`
   * </pre>
   *
   * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
   *
   * @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 = 10;

  @SuppressWarnings("serial")
  private volatile java.lang.Object id_ = "";
  /**
   *
   *
   * <pre>
   * An identifier for the `Network`, generated by the backend.
   * </pre>
   *
   * <code>string id = 10;</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * An identifier for the `Network`, generated by the backend.
   * </pre>
   *
   * <code>string id = 10;</code>
   *
   * @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 TYPE_FIELD_NUMBER = 2;
  private int type_ = 0;
  /**
   *
   *
   * <pre>
   * The type of this network.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
   *
   * @return The enum numeric value on the wire for type.
   */
  @java.lang.Override
  public int getTypeValue() {
    return type_;
  }
  /**
   *
   *
   * <pre>
   * The type of this network.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
   *
   * @return The type.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Network.Type getType() {
    com.google.cloud.baremetalsolution.v2.Network.Type result =
        com.google.cloud.baremetalsolution.v2.Network.Type.forNumber(type_);
    return result == null
        ? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED
        : result;
  }

  public static final int IP_ADDRESS_FIELD_NUMBER = 3;

  @SuppressWarnings("serial")
  private volatile java.lang.Object ipAddress_ = "";
  /**
   *
   *
   * <pre>
   * IP address configured.
   * </pre>
   *
   * <code>string ip_address = 3;</code>
   *
   * @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;
    }
  }
  /**
   *
   *
   * <pre>
   * IP address configured.
   * </pre>
   *
   * <code>string ip_address = 3;</code>
   *
   * @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 MAC_ADDRESS_FIELD_NUMBER = 4;

  @SuppressWarnings("serial")
  private com.google.protobuf.LazyStringList macAddress_;
  /**
   *
   *
   * <pre>
   * List of physical interfaces.
   * </pre>
   *
   * <code>repeated string mac_address = 4;</code>
   *
   * @return A list containing the macAddress.
   */
  public com.google.protobuf.ProtocolStringList getMacAddressList() {
    return macAddress_;
  }
  /**
   *
   *
   * <pre>
   * List of physical interfaces.
   * </pre>
   *
   * <code>repeated string mac_address = 4;</code>
   *
   * @return The count of macAddress.
   */
  public int getMacAddressCount() {
    return macAddress_.size();
  }
  /**
   *
   *
   * <pre>
   * List of physical interfaces.
   * </pre>
   *
   * <code>repeated string mac_address = 4;</code>
   *
   * @param index The index of the element to return.
   * @return The macAddress at the given index.
   */
  public java.lang.String getMacAddress(int index) {
    return macAddress_.get(index);
  }
  /**
   *
   *
   * <pre>
   * List of physical interfaces.
   * </pre>
   *
   * <code>repeated string mac_address = 4;</code>
   *
   * @param index The index of the value to return.
   * @return The bytes of the macAddress at the given index.
   */
  public com.google.protobuf.ByteString getMacAddressBytes(int index) {
    return macAddress_.getByteString(index);
  }

  public static final int STATE_FIELD_NUMBER = 6;
  private int state_ = 0;
  /**
   *
   *
   * <pre>
   * The Network state.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
   *
   * @return The enum numeric value on the wire for state.
   */
  @java.lang.Override
  public int getStateValue() {
    return state_;
  }
  /**
   *
   *
   * <pre>
   * The Network state.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
   *
   * @return The state.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Network.State getState() {
    com.google.cloud.baremetalsolution.v2.Network.State result =
        com.google.cloud.baremetalsolution.v2.Network.State.forNumber(state_);
    return result == null
        ? com.google.cloud.baremetalsolution.v2.Network.State.UNRECOGNIZED
        : result;
  }

  public static final int VLAN_ID_FIELD_NUMBER = 7;

  @SuppressWarnings("serial")
  private volatile java.lang.Object vlanId_ = "";
  /**
   *
   *
   * <pre>
   * The vlan id of the Network.
   * </pre>
   *
   * <code>string vlan_id = 7;</code>
   *
   * @return The vlanId.
   */
  @java.lang.Override
  public java.lang.String getVlanId() {
    java.lang.Object ref = vlanId_;
    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();
      vlanId_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The vlan id of the Network.
   * </pre>
   *
   * <code>string vlan_id = 7;</code>
   *
   * @return The bytes for vlanId.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getVlanIdBytes() {
    java.lang.Object ref = vlanId_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      vlanId_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int CIDR_FIELD_NUMBER = 8;

  @SuppressWarnings("serial")
  private volatile java.lang.Object cidr_ = "";
  /**
   *
   *
   * <pre>
   * The cidr of the Network.
   * </pre>
   *
   * <code>string cidr = 8;</code>
   *
   * @return The cidr.
   */
  @java.lang.Override
  public java.lang.String getCidr() {
    java.lang.Object ref = cidr_;
    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();
      cidr_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * The cidr of the Network.
   * </pre>
   *
   * <code>string cidr = 8;</code>
   *
   * @return The bytes for cidr.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getCidrBytes() {
    java.lang.Object ref = cidr_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      cidr_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int VRF_FIELD_NUMBER = 9;
  private com.google.cloud.baremetalsolution.v2.VRF vrf_;
  /**
   *
   *
   * <pre>
   * The vrf for the Network.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
   *
   * @return Whether the vrf field is set.
   */
  @java.lang.Override
  public boolean hasVrf() {
    return vrf_ != null;
  }
  /**
   *
   *
   * <pre>
   * The vrf for the Network.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
   *
   * @return The vrf.
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.VRF getVrf() {
    return vrf_ == null ? com.google.cloud.baremetalsolution.v2.VRF.getDefaultInstance() : vrf_;
  }
  /**
   *
   *
   * <pre>
   * The vrf for the Network.
   * </pre>
   *
   * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.VRFOrBuilder getVrfOrBuilder() {
    return vrf_ == null ? com.google.cloud.baremetalsolution.v2.VRF.getDefaultInstance() : vrf_;
  }

  public static final int LABELS_FIELD_NUMBER = 11;

  private static final class LabelsDefaultEntryHolder {
    static final com.google.protobuf.MapEntry<java.lang.String, java.lang.String> defaultEntry =
        com.google.protobuf.MapEntry.<java.lang.String, java.lang.String>newDefaultInstance(
            com.google.cloud.baremetalsolution.v2.NetworkProto
                .internal_static_google_cloud_baremetalsolution_v2_Network_LabelsEntry_descriptor,
            com.google.protobuf.WireFormat.FieldType.STRING,
            "",
            com.google.protobuf.WireFormat.FieldType.STRING,
            "");
  }

  @SuppressWarnings("serial")
  private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

  private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
    if (labels_ == null) {
      return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
    }
    return labels_;
  }

  public int getLabelsCount() {
    return internalGetLabels().getMap().size();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 11;</code>
   */
  @java.lang.Override
  public boolean containsLabels(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    return internalGetLabels().getMap().containsKey(key);
  }
  /** Use {@link #getLabelsMap()} instead. */
  @java.lang.Override
  @java.lang.Deprecated
  public java.util.Map<java.lang.String, java.lang.String> getLabels() {
    return getLabelsMap();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 11;</code>
   */
  @java.lang.Override
  public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
    return internalGetLabels().getMap();
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 11;</code>
   */
  @java.lang.Override
  public /* nullable */ java.lang.String getLabelsOrDefault(
      java.lang.String key,
      /* nullable */
      java.lang.String defaultValue) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    return map.containsKey(key) ? map.get(key) : defaultValue;
  }
  /**
   *
   *
   * <pre>
   * Labels as key value pairs.
   * </pre>
   *
   * <code>map&lt;string, string&gt; labels = 11;</code>
   */
  @java.lang.Override
  public java.lang.String getLabelsOrThrow(java.lang.String key) {
    if (key == null) {
      throw new NullPointerException("map key");
    }
    java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
    if (!map.containsKey(key)) {
      throw new java.lang.IllegalArgumentException();
    }
    return map.get(key);
  }

  public static final int SERVICES_CIDR_FIELD_NUMBER = 12;

  @SuppressWarnings("serial")
  private volatile java.lang.Object servicesCidr_ = "";
  /**
   *
   *
   * <pre>
   * IP range for reserved for services (e.g. NFS).
   * </pre>
   *
   * <code>string services_cidr = 12;</code>
   *
   * @return The servicesCidr.
   */
  @java.lang.Override
  public java.lang.String getServicesCidr() {
    java.lang.Object ref = servicesCidr_;
    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();
      servicesCidr_ = s;
      return s;
    }
  }
  /**
   *
   *
   * <pre>
   * IP range for reserved for services (e.g. NFS).
   * </pre>
   *
   * <code>string services_cidr = 12;</code>
   *
   * @return The bytes for servicesCidr.
   */
  @java.lang.Override
  public com.google.protobuf.ByteString getServicesCidrBytes() {
    java.lang.Object ref = servicesCidr_;
    if (ref instanceof java.lang.String) {
      com.google.protobuf.ByteString b =
          com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
      servicesCidr_ = b;
      return b;
    } else {
      return (com.google.protobuf.ByteString) ref;
    }
  }

  public static final int RESERVATIONS_FIELD_NUMBER = 13;

  @SuppressWarnings("serial")
  private java.util.List<com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>
      reservations_;
  /**
   *
   *
   * <pre>
   * List of IP address reservations in this network.
   * When updating this field, an error will be generated if a reservation
   * conflicts with an IP address already allocated to a physical server.
   * </pre>
   *
   * <code>repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
   * </code>
   */
  @java.lang.Override
  public java.util.List<com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>
      getReservationsList() {
    return reservations_;
  }
  /**
   *
   *
   * <pre>
   * List of IP address reservations in this network.
   * When updating this field, an error will be generated if a reservation
   * conflicts with an IP address already allocated to a physical server.
   * </pre>
   *
   * <code>repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
   * </code>
   */
  @java.lang.Override
  public java.util.List<
          ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>
      getReservationsOrBuilderList() {
    return reservations_;
  }
  /**
   *
   *
   * <pre>
   * List of IP address reservations in this network.
   * When updating this field, an error will be generated if a reservation
   * conflicts with an IP address already allocated to a physical server.
   * </pre>
   *
   * <code>repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
   * </code>
   */
  @java.lang.Override
  public int getReservationsCount() {
    return reservations_.size();
  }
  /**
   *
   *
   * <pre>
   * List of IP address reservations in this network.
   * When updating this field, an error will be generated if a reservation
   * conflicts with an IP address already allocated to a physical server.
   * </pre>
   *
   * <code>repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation getReservations(
      int index) {
    return reservations_.get(index);
  }
  /**
   *
   *
   * <pre>
   * List of IP address reservations in this network.
   * When updating this field, an error will be generated if a reservation
   * conflicts with an IP address already allocated to a physical server.
   * </pre>
   *
   * <code>repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
   * </code>
   */
  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder
      getReservationsOrBuilder(int index) {
    return reservations_.get(index);
  }

  private byte memoizedIsInitialized = -1;

  @java.lang.Override
  public final boolean isInitialized() {
    byte isInitialized = memoizedIsInitialized;
    if (isInitialized == 1) return true;
    if (isInitialized == 0) return false;

    memoizedIsInitialized = 1;
    return true;
  }

  @java.lang.Override
  public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException {
    if (type_ != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) {
      output.writeEnum(2, type_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 3, ipAddress_);
    }
    for (int i = 0; i < macAddress_.size(); i++) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 4, macAddress_.getRaw(i));
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
    }
    if (state_
        != com.google.cloud.baremetalsolution.v2.Network.State.STATE_UNSPECIFIED.getNumber()) {
      output.writeEnum(6, state_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vlanId_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 7, vlanId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidr_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 8, cidr_);
    }
    if (vrf_ != null) {
      output.writeMessage(9, getVrf());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 10, id_);
    }
    com.google.protobuf.GeneratedMessageV3.serializeStringMapTo(
        output, internalGetLabels(), LabelsDefaultEntryHolder.defaultEntry, 11);
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesCidr_)) {
      com.google.protobuf.GeneratedMessageV3.writeString(output, 12, servicesCidr_);
    }
    for (int i = 0; i < reservations_.size(); i++) {
      output.writeMessage(13, reservations_.get(i));
    }
    getUnknownFields().writeTo(output);
  }

  @java.lang.Override
  public int getSerializedSize() {
    int size = memoizedSize;
    if (size != -1) return size;

    size = 0;
    if (type_ != com.google.cloud.baremetalsolution.v2.Network.Type.TYPE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(2, type_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(ipAddress_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, ipAddress_);
    }
    {
      int dataSize = 0;
      for (int i = 0; i < macAddress_.size(); i++) {
        dataSize += computeStringSizeNoTag(macAddress_.getRaw(i));
      }
      size += dataSize;
      size += 1 * getMacAddressList().size();
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
    }
    if (state_
        != com.google.cloud.baremetalsolution.v2.Network.State.STATE_UNSPECIFIED.getNumber()) {
      size += com.google.protobuf.CodedOutputStream.computeEnumSize(6, state_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(vlanId_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(7, vlanId_);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(cidr_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(8, cidr_);
    }
    if (vrf_ != null) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(9, getVrf());
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(id_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(10, id_);
    }
    for (java.util.Map.Entry<java.lang.String, java.lang.String> entry :
        internalGetLabels().getMap().entrySet()) {
      com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
          LabelsDefaultEntryHolder.defaultEntry
              .newBuilderForType()
              .setKey(entry.getKey())
              .setValue(entry.getValue())
              .build();
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(11, labels__);
    }
    if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(servicesCidr_)) {
      size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, servicesCidr_);
    }
    for (int i = 0; i < reservations_.size(); i++) {
      size += com.google.protobuf.CodedOutputStream.computeMessageSize(13, reservations_.get(i));
    }
    size += getUnknownFields().getSerializedSize();
    memoizedSize = size;
    return size;
  }

  @java.lang.Override
  public boolean equals(final java.lang.Object obj) {
    if (obj == this) {
      return true;
    }
    if (!(obj instanceof com.google.cloud.baremetalsolution.v2.Network)) {
      return super.equals(obj);
    }
    com.google.cloud.baremetalsolution.v2.Network other =
        (com.google.cloud.baremetalsolution.v2.Network) obj;

    if (!getName().equals(other.getName())) return false;
    if (!getId().equals(other.getId())) return false;
    if (type_ != other.type_) return false;
    if (!getIpAddress().equals(other.getIpAddress())) return false;
    if (!getMacAddressList().equals(other.getMacAddressList())) return false;
    if (state_ != other.state_) return false;
    if (!getVlanId().equals(other.getVlanId())) return false;
    if (!getCidr().equals(other.getCidr())) return false;
    if (hasVrf() != other.hasVrf()) return false;
    if (hasVrf()) {
      if (!getVrf().equals(other.getVrf())) return false;
    }
    if (!internalGetLabels().equals(other.internalGetLabels())) return false;
    if (!getServicesCidr().equals(other.getServicesCidr())) return false;
    if (!getReservationsList().equals(other.getReservationsList())) 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) + TYPE_FIELD_NUMBER;
    hash = (53 * hash) + type_;
    hash = (37 * hash) + IP_ADDRESS_FIELD_NUMBER;
    hash = (53 * hash) + getIpAddress().hashCode();
    if (getMacAddressCount() > 0) {
      hash = (37 * hash) + MAC_ADDRESS_FIELD_NUMBER;
      hash = (53 * hash) + getMacAddressList().hashCode();
    }
    hash = (37 * hash) + STATE_FIELD_NUMBER;
    hash = (53 * hash) + state_;
    hash = (37 * hash) + VLAN_ID_FIELD_NUMBER;
    hash = (53 * hash) + getVlanId().hashCode();
    hash = (37 * hash) + CIDR_FIELD_NUMBER;
    hash = (53 * hash) + getCidr().hashCode();
    if (hasVrf()) {
      hash = (37 * hash) + VRF_FIELD_NUMBER;
      hash = (53 * hash) + getVrf().hashCode();
    }
    if (!internalGetLabels().getMap().isEmpty()) {
      hash = (37 * hash) + LABELS_FIELD_NUMBER;
      hash = (53 * hash) + internalGetLabels().hashCode();
    }
    hash = (37 * hash) + SERVICES_CIDR_FIELD_NUMBER;
    hash = (53 * hash) + getServicesCidr().hashCode();
    if (getReservationsCount() > 0) {
      hash = (37 * hash) + RESERVATIONS_FIELD_NUMBER;
      hash = (53 * hash) + getReservationsList().hashCode();
    }
    hash = (29 * hash) + getUnknownFields().hashCode();
    memoizedHashCode = hash;
    return hash;
  }

  public static com.google.cloud.baremetalsolution.v2.Network parseFrom(java.nio.ByteBuffer data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Network 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.Network parseFrom(
      com.google.protobuf.ByteString data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Network 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.Network parseFrom(byte[] data)
      throws com.google.protobuf.InvalidProtocolBufferException {
    return PARSER.parseFrom(data);
  }

  public static com.google.cloud.baremetalsolution.v2.Network 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.Network parseFrom(java.io.InputStream input)
      throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseWithIOException(PARSER, input);
  }

  public static com.google.cloud.baremetalsolution.v2.Network 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.Network parseDelimitedFrom(
      java.io.InputStream input) throws java.io.IOException {
    return com.google.protobuf.GeneratedMessageV3.parseDelimitedWithIOException(PARSER, input);
  }

  public static com.google.cloud.baremetalsolution.v2.Network 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.Network 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.Network 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.Network 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;
  }
  /**
   *
   *
   * <pre>
   * A Network.
   * </pre>
   *
   * Protobuf type {@code google.cloud.baremetalsolution.v2.Network}
   */
  public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder<Builder>
      implements
      // @@protoc_insertion_point(builder_implements:google.cloud.baremetalsolution.v2.Network)
      com.google.cloud.baremetalsolution.v2.NetworkOrBuilder {
    public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() {
      return com.google.cloud.baremetalsolution.v2.NetworkProto
          .internal_static_google_cloud_baremetalsolution_v2_Network_descriptor;
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMapField(int number) {
      switch (number) {
        case 11:
          return internalGetLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @SuppressWarnings({"rawtypes"})
    protected com.google.protobuf.MapField internalGetMutableMapField(int number) {
      switch (number) {
        case 11:
          return internalGetMutableLabels();
        default:
          throw new RuntimeException("Invalid map field number: " + number);
      }
    }

    @java.lang.Override
    protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
        internalGetFieldAccessorTable() {
      return com.google.cloud.baremetalsolution.v2.NetworkProto
          .internal_static_google_cloud_baremetalsolution_v2_Network_fieldAccessorTable
          .ensureFieldAccessorsInitialized(
              com.google.cloud.baremetalsolution.v2.Network.class,
              com.google.cloud.baremetalsolution.v2.Network.Builder.class);
    }

    // Construct using com.google.cloud.baremetalsolution.v2.Network.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_ = "";
      type_ = 0;
      ipAddress_ = "";
      macAddress_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      state_ = 0;
      vlanId_ = "";
      cidr_ = "";
      vrf_ = null;
      if (vrfBuilder_ != null) {
        vrfBuilder_.dispose();
        vrfBuilder_ = null;
      }
      internalGetMutableLabels().clear();
      servicesCidr_ = "";
      if (reservationsBuilder_ == null) {
        reservations_ = java.util.Collections.emptyList();
      } else {
        reservations_ = null;
        reservationsBuilder_.clear();
      }
      bitField0_ = (bitField0_ & ~0x00000800);
      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_Network_descriptor;
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Network getDefaultInstanceForType() {
      return com.google.cloud.baremetalsolution.v2.Network.getDefaultInstance();
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Network build() {
      com.google.cloud.baremetalsolution.v2.Network result = buildPartial();
      if (!result.isInitialized()) {
        throw newUninitializedMessageException(result);
      }
      return result;
    }

    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Network buildPartial() {
      com.google.cloud.baremetalsolution.v2.Network result =
          new com.google.cloud.baremetalsolution.v2.Network(this);
      buildPartialRepeatedFields(result);
      if (bitField0_ != 0) {
        buildPartial0(result);
      }
      onBuilt();
      return result;
    }

    private void buildPartialRepeatedFields(com.google.cloud.baremetalsolution.v2.Network result) {
      if (((bitField0_ & 0x00000010) != 0)) {
        macAddress_ = macAddress_.getUnmodifiableView();
        bitField0_ = (bitField0_ & ~0x00000010);
      }
      result.macAddress_ = macAddress_;
      if (reservationsBuilder_ == null) {
        if (((bitField0_ & 0x00000800) != 0)) {
          reservations_ = java.util.Collections.unmodifiableList(reservations_);
          bitField0_ = (bitField0_ & ~0x00000800);
        }
        result.reservations_ = reservations_;
      } else {
        result.reservations_ = reservationsBuilder_.build();
      }
    }

    private void buildPartial0(com.google.cloud.baremetalsolution.v2.Network 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.type_ = type_;
      }
      if (((from_bitField0_ & 0x00000008) != 0)) {
        result.ipAddress_ = ipAddress_;
      }
      if (((from_bitField0_ & 0x00000020) != 0)) {
        result.state_ = state_;
      }
      if (((from_bitField0_ & 0x00000040) != 0)) {
        result.vlanId_ = vlanId_;
      }
      if (((from_bitField0_ & 0x00000080) != 0)) {
        result.cidr_ = cidr_;
      }
      if (((from_bitField0_ & 0x00000100) != 0)) {
        result.vrf_ = vrfBuilder_ == null ? vrf_ : vrfBuilder_.build();
      }
      if (((from_bitField0_ & 0x00000200) != 0)) {
        result.labels_ = internalGetLabels();
        result.labels_.makeImmutable();
      }
      if (((from_bitField0_ & 0x00000400) != 0)) {
        result.servicesCidr_ = servicesCidr_;
      }
    }

    @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.Network) {
        return mergeFrom((com.google.cloud.baremetalsolution.v2.Network) other);
      } else {
        super.mergeFrom(other);
        return this;
      }
    }

    public Builder mergeFrom(com.google.cloud.baremetalsolution.v2.Network other) {
      if (other == com.google.cloud.baremetalsolution.v2.Network.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.type_ != 0) {
        setTypeValue(other.getTypeValue());
      }
      if (!other.getIpAddress().isEmpty()) {
        ipAddress_ = other.ipAddress_;
        bitField0_ |= 0x00000008;
        onChanged();
      }
      if (!other.macAddress_.isEmpty()) {
        if (macAddress_.isEmpty()) {
          macAddress_ = other.macAddress_;
          bitField0_ = (bitField0_ & ~0x00000010);
        } else {
          ensureMacAddressIsMutable();
          macAddress_.addAll(other.macAddress_);
        }
        onChanged();
      }
      if (other.state_ != 0) {
        setStateValue(other.getStateValue());
      }
      if (!other.getVlanId().isEmpty()) {
        vlanId_ = other.vlanId_;
        bitField0_ |= 0x00000040;
        onChanged();
      }
      if (!other.getCidr().isEmpty()) {
        cidr_ = other.cidr_;
        bitField0_ |= 0x00000080;
        onChanged();
      }
      if (other.hasVrf()) {
        mergeVrf(other.getVrf());
      }
      internalGetMutableLabels().mergeFrom(other.internalGetLabels());
      bitField0_ |= 0x00000200;
      if (!other.getServicesCidr().isEmpty()) {
        servicesCidr_ = other.servicesCidr_;
        bitField0_ |= 0x00000400;
        onChanged();
      }
      if (reservationsBuilder_ == null) {
        if (!other.reservations_.isEmpty()) {
          if (reservations_.isEmpty()) {
            reservations_ = other.reservations_;
            bitField0_ = (bitField0_ & ~0x00000800);
          } else {
            ensureReservationsIsMutable();
            reservations_.addAll(other.reservations_);
          }
          onChanged();
        }
      } else {
        if (!other.reservations_.isEmpty()) {
          if (reservationsBuilder_.isEmpty()) {
            reservationsBuilder_.dispose();
            reservationsBuilder_ = null;
            reservations_ = other.reservations_;
            bitField0_ = (bitField0_ & ~0x00000800);
            reservationsBuilder_ =
                com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders
                    ? getReservationsFieldBuilder()
                    : null;
          } else {
            reservationsBuilder_.addAllMessages(other.reservations_);
          }
        }
      }
      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 16:
              {
                type_ = input.readEnum();
                bitField0_ |= 0x00000004;
                break;
              } // case 16
            case 26:
              {
                ipAddress_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000008;
                break;
              } // case 26
            case 34:
              {
                java.lang.String s = input.readStringRequireUtf8();
                ensureMacAddressIsMutable();
                macAddress_.add(s);
                break;
              } // case 34
            case 42:
              {
                name_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000001;
                break;
              } // case 42
            case 48:
              {
                state_ = input.readEnum();
                bitField0_ |= 0x00000020;
                break;
              } // case 48
            case 58:
              {
                vlanId_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000040;
                break;
              } // case 58
            case 66:
              {
                cidr_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000080;
                break;
              } // case 66
            case 74:
              {
                input.readMessage(getVrfFieldBuilder().getBuilder(), extensionRegistry);
                bitField0_ |= 0x00000100;
                break;
              } // case 74
            case 82:
              {
                id_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000002;
                break;
              } // case 82
            case 90:
              {
                com.google.protobuf.MapEntry<java.lang.String, java.lang.String> labels__ =
                    input.readMessage(
                        LabelsDefaultEntryHolder.defaultEntry.getParserForType(),
                        extensionRegistry);
                internalGetMutableLabels()
                    .getMutableMap()
                    .put(labels__.getKey(), labels__.getValue());
                bitField0_ |= 0x00000200;
                break;
              } // case 90
            case 98:
              {
                servicesCidr_ = input.readStringRequireUtf8();
                bitField0_ |= 0x00000400;
                break;
              } // case 98
            case 106:
              {
                com.google.cloud.baremetalsolution.v2.NetworkAddressReservation m =
                    input.readMessage(
                        com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.parser(),
                        extensionRegistry);
                if (reservationsBuilder_ == null) {
                  ensureReservationsIsMutable();
                  reservations_.add(m);
                } else {
                  reservationsBuilder_.addMessage(m);
                }
                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_ = "";
    /**
     *
     *
     * <pre>
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * </pre>
     *
     * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * </pre>
     *
     * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * </pre>
     *
     * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * </pre>
     *
     * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearName() {
      name_ = getDefaultInstance().getName();
      bitField0_ = (bitField0_ & ~0x00000001);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Output only. The resource name of this `Network`.
     * Resource names are schemeless URIs that follow the conventions in
     * https://cloud.google.com/apis/design/resource_names.
     * Format:
     * `projects/{project}/locations/{location}/networks/{network}`
     * </pre>
     *
     * <code>string name = 5 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     *
     * @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_ = "";
    /**
     *
     *
     * <pre>
     * An identifier for the `Network`, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * An identifier for the `Network`, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * An identifier for the `Network`, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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;
    }
    /**
     *
     *
     * <pre>
     * An identifier for the `Network`, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearId() {
      id_ = getDefaultInstance().getId();
      bitField0_ = (bitField0_ & ~0x00000002);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * An identifier for the `Network`, generated by the backend.
     * </pre>
     *
     * <code>string id = 10;</code>
     *
     * @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 int type_ = 0;
    /**
     *
     *
     * <pre>
     * The type of this network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     *
     * @return The enum numeric value on the wire for type.
     */
    @java.lang.Override
    public int getTypeValue() {
      return type_;
    }
    /**
     *
     *
     * <pre>
     * The type of this network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     *
     * @param value The enum numeric value on the wire for type to set.
     * @return This builder for chaining.
     */
    public Builder setTypeValue(int value) {
      type_ = value;
      bitField0_ |= 0x00000004;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     *
     * @return The type.
     */
    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Network.Type getType() {
      com.google.cloud.baremetalsolution.v2.Network.Type result =
          com.google.cloud.baremetalsolution.v2.Network.Type.forNumber(type_);
      return result == null
          ? com.google.cloud.baremetalsolution.v2.Network.Type.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The type of this network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     *
     * @param value The type to set.
     * @return This builder for chaining.
     */
    public Builder setType(com.google.cloud.baremetalsolution.v2.Network.Type value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000004;
      type_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The type of this network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.Type type = 2;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearType() {
      bitField0_ = (bitField0_ & ~0x00000004);
      type_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object ipAddress_ = "";
    /**
     *
     *
     * <pre>
     * IP address configured.
     * </pre>
     *
     * <code>string ip_address = 3;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * IP address configured.
     * </pre>
     *
     * <code>string ip_address = 3;</code>
     *
     * @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;
      }
    }
    /**
     *
     *
     * <pre>
     * IP address configured.
     * </pre>
     *
     * <code>string ip_address = 3;</code>
     *
     * @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_ |= 0x00000008;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * IP address configured.
     * </pre>
     *
     * <code>string ip_address = 3;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearIpAddress() {
      ipAddress_ = getDefaultInstance().getIpAddress();
      bitField0_ = (bitField0_ & ~0x00000008);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * IP address configured.
     * </pre>
     *
     * <code>string ip_address = 3;</code>
     *
     * @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_ |= 0x00000008;
      onChanged();
      return this;
    }

    private com.google.protobuf.LazyStringList macAddress_ =
        com.google.protobuf.LazyStringArrayList.EMPTY;

    private void ensureMacAddressIsMutable() {
      if (!((bitField0_ & 0x00000010) != 0)) {
        macAddress_ = new com.google.protobuf.LazyStringArrayList(macAddress_);
        bitField0_ |= 0x00000010;
      }
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @return A list containing the macAddress.
     */
    public com.google.protobuf.ProtocolStringList getMacAddressList() {
      return macAddress_.getUnmodifiableView();
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @return The count of macAddress.
     */
    public int getMacAddressCount() {
      return macAddress_.size();
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param index The index of the element to return.
     * @return The macAddress at the given index.
     */
    public java.lang.String getMacAddress(int index) {
      return macAddress_.get(index);
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param index The index of the value to return.
     * @return The bytes of the macAddress at the given index.
     */
    public com.google.protobuf.ByteString getMacAddressBytes(int index) {
      return macAddress_.getByteString(index);
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param index The index to set the value at.
     * @param value The macAddress to set.
     * @return This builder for chaining.
     */
    public Builder setMacAddress(int index, java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureMacAddressIsMutable();
      macAddress_.set(index, value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param value The macAddress to add.
     * @return This builder for chaining.
     */
    public Builder addMacAddress(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      ensureMacAddressIsMutable();
      macAddress_.add(value);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param values The macAddress to add.
     * @return This builder for chaining.
     */
    public Builder addAllMacAddress(java.lang.Iterable<java.lang.String> values) {
      ensureMacAddressIsMutable();
      com.google.protobuf.AbstractMessageLite.Builder.addAll(values, macAddress_);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearMacAddress() {
      macAddress_ = com.google.protobuf.LazyStringArrayList.EMPTY;
      bitField0_ = (bitField0_ & ~0x00000010);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of physical interfaces.
     * </pre>
     *
     * <code>repeated string mac_address = 4;</code>
     *
     * @param value The bytes of the macAddress to add.
     * @return This builder for chaining.
     */
    public Builder addMacAddressBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      ensureMacAddressIsMutable();
      macAddress_.add(value);
      onChanged();
      return this;
    }

    private int state_ = 0;
    /**
     *
     *
     * <pre>
     * The Network state.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     *
     * @return The enum numeric value on the wire for state.
     */
    @java.lang.Override
    public int getStateValue() {
      return state_;
    }
    /**
     *
     *
     * <pre>
     * The Network state.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     *
     * @param value The enum numeric value on the wire for state to set.
     * @return This builder for chaining.
     */
    public Builder setStateValue(int value) {
      state_ = value;
      bitField0_ |= 0x00000020;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Network state.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     *
     * @return The state.
     */
    @java.lang.Override
    public com.google.cloud.baremetalsolution.v2.Network.State getState() {
      com.google.cloud.baremetalsolution.v2.Network.State result =
          com.google.cloud.baremetalsolution.v2.Network.State.forNumber(state_);
      return result == null
          ? com.google.cloud.baremetalsolution.v2.Network.State.UNRECOGNIZED
          : result;
    }
    /**
     *
     *
     * <pre>
     * The Network state.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     *
     * @param value The state to set.
     * @return This builder for chaining.
     */
    public Builder setState(com.google.cloud.baremetalsolution.v2.Network.State value) {
      if (value == null) {
        throw new NullPointerException();
      }
      bitField0_ |= 0x00000020;
      state_ = value.getNumber();
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The Network state.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.Network.State state = 6;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearState() {
      bitField0_ = (bitField0_ & ~0x00000020);
      state_ = 0;
      onChanged();
      return this;
    }

    private java.lang.Object vlanId_ = "";
    /**
     *
     *
     * <pre>
     * The vlan id of the Network.
     * </pre>
     *
     * <code>string vlan_id = 7;</code>
     *
     * @return The vlanId.
     */
    public java.lang.String getVlanId() {
      java.lang.Object ref = vlanId_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        vlanId_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The vlan id of the Network.
     * </pre>
     *
     * <code>string vlan_id = 7;</code>
     *
     * @return The bytes for vlanId.
     */
    public com.google.protobuf.ByteString getVlanIdBytes() {
      java.lang.Object ref = vlanId_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        vlanId_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The vlan id of the Network.
     * </pre>
     *
     * <code>string vlan_id = 7;</code>
     *
     * @param value The vlanId to set.
     * @return This builder for chaining.
     */
    public Builder setVlanId(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      vlanId_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vlan id of the Network.
     * </pre>
     *
     * <code>string vlan_id = 7;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearVlanId() {
      vlanId_ = getDefaultInstance().getVlanId();
      bitField0_ = (bitField0_ & ~0x00000040);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vlan id of the Network.
     * </pre>
     *
     * <code>string vlan_id = 7;</code>
     *
     * @param value The bytes for vlanId to set.
     * @return This builder for chaining.
     */
    public Builder setVlanIdBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      vlanId_ = value;
      bitField0_ |= 0x00000040;
      onChanged();
      return this;
    }

    private java.lang.Object cidr_ = "";
    /**
     *
     *
     * <pre>
     * The cidr of the Network.
     * </pre>
     *
     * <code>string cidr = 8;</code>
     *
     * @return The cidr.
     */
    public java.lang.String getCidr() {
      java.lang.Object ref = cidr_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        cidr_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The cidr of the Network.
     * </pre>
     *
     * <code>string cidr = 8;</code>
     *
     * @return The bytes for cidr.
     */
    public com.google.protobuf.ByteString getCidrBytes() {
      java.lang.Object ref = cidr_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        cidr_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * The cidr of the Network.
     * </pre>
     *
     * <code>string cidr = 8;</code>
     *
     * @param value The cidr to set.
     * @return This builder for chaining.
     */
    public Builder setCidr(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      cidr_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cidr of the Network.
     * </pre>
     *
     * <code>string cidr = 8;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearCidr() {
      cidr_ = getDefaultInstance().getCidr();
      bitField0_ = (bitField0_ & ~0x00000080);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The cidr of the Network.
     * </pre>
     *
     * <code>string cidr = 8;</code>
     *
     * @param value The bytes for cidr to set.
     * @return This builder for chaining.
     */
    public Builder setCidrBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      cidr_ = value;
      bitField0_ |= 0x00000080;
      onChanged();
      return this;
    }

    private com.google.cloud.baremetalsolution.v2.VRF vrf_;
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.baremetalsolution.v2.VRF,
            com.google.cloud.baremetalsolution.v2.VRF.Builder,
            com.google.cloud.baremetalsolution.v2.VRFOrBuilder>
        vrfBuilder_;
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     *
     * @return Whether the vrf field is set.
     */
    public boolean hasVrf() {
      return ((bitField0_ & 0x00000100) != 0);
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     *
     * @return The vrf.
     */
    public com.google.cloud.baremetalsolution.v2.VRF getVrf() {
      if (vrfBuilder_ == null) {
        return vrf_ == null ? com.google.cloud.baremetalsolution.v2.VRF.getDefaultInstance() : vrf_;
      } else {
        return vrfBuilder_.getMessage();
      }
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public Builder setVrf(com.google.cloud.baremetalsolution.v2.VRF value) {
      if (vrfBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        vrf_ = value;
      } else {
        vrfBuilder_.setMessage(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public Builder setVrf(com.google.cloud.baremetalsolution.v2.VRF.Builder builderForValue) {
      if (vrfBuilder_ == null) {
        vrf_ = builderForValue.build();
      } else {
        vrfBuilder_.setMessage(builderForValue.build());
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public Builder mergeVrf(com.google.cloud.baremetalsolution.v2.VRF value) {
      if (vrfBuilder_ == null) {
        if (((bitField0_ & 0x00000100) != 0)
            && vrf_ != null
            && vrf_ != com.google.cloud.baremetalsolution.v2.VRF.getDefaultInstance()) {
          getVrfBuilder().mergeFrom(value);
        } else {
          vrf_ = value;
        }
      } else {
        vrfBuilder_.mergeFrom(value);
      }
      bitField0_ |= 0x00000100;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public Builder clearVrf() {
      bitField0_ = (bitField0_ & ~0x00000100);
      vrf_ = null;
      if (vrfBuilder_ != null) {
        vrfBuilder_.dispose();
        vrfBuilder_ = null;
      }
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public com.google.cloud.baremetalsolution.v2.VRF.Builder getVrfBuilder() {
      bitField0_ |= 0x00000100;
      onChanged();
      return getVrfFieldBuilder().getBuilder();
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    public com.google.cloud.baremetalsolution.v2.VRFOrBuilder getVrfOrBuilder() {
      if (vrfBuilder_ != null) {
        return vrfBuilder_.getMessageOrBuilder();
      } else {
        return vrf_ == null ? com.google.cloud.baremetalsolution.v2.VRF.getDefaultInstance() : vrf_;
      }
    }
    /**
     *
     *
     * <pre>
     * The vrf for the Network.
     * </pre>
     *
     * <code>.google.cloud.baremetalsolution.v2.VRF vrf = 9;</code>
     */
    private com.google.protobuf.SingleFieldBuilderV3<
            com.google.cloud.baremetalsolution.v2.VRF,
            com.google.cloud.baremetalsolution.v2.VRF.Builder,
            com.google.cloud.baremetalsolution.v2.VRFOrBuilder>
        getVrfFieldBuilder() {
      if (vrfBuilder_ == null) {
        vrfBuilder_ =
            new com.google.protobuf.SingleFieldBuilderV3<
                com.google.cloud.baremetalsolution.v2.VRF,
                com.google.cloud.baremetalsolution.v2.VRF.Builder,
                com.google.cloud.baremetalsolution.v2.VRFOrBuilder>(
                getVrf(), getParentForChildren(), isClean());
        vrf_ = null;
      }
      return vrfBuilder_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> labels_;

    private com.google.protobuf.MapField<java.lang.String, java.lang.String> internalGetLabels() {
      if (labels_ == null) {
        return com.google.protobuf.MapField.emptyMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      return labels_;
    }

    private com.google.protobuf.MapField<java.lang.String, java.lang.String>
        internalGetMutableLabels() {
      if (labels_ == null) {
        labels_ = com.google.protobuf.MapField.newMapField(LabelsDefaultEntryHolder.defaultEntry);
      }
      if (!labels_.isMutable()) {
        labels_ = labels_.copy();
      }
      bitField0_ |= 0x00000200;
      onChanged();
      return labels_;
    }

    public int getLabelsCount() {
      return internalGetLabels().getMap().size();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    @java.lang.Override
    public boolean containsLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      return internalGetLabels().getMap().containsKey(key);
    }
    /** Use {@link #getLabelsMap()} instead. */
    @java.lang.Override
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getLabels() {
      return getLabelsMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    @java.lang.Override
    public java.util.Map<java.lang.String, java.lang.String> getLabelsMap() {
      return internalGetLabels().getMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    @java.lang.Override
    public /* nullable */ java.lang.String getLabelsOrDefault(
        java.lang.String key,
        /* nullable */
        java.lang.String defaultValue) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      return map.containsKey(key) ? map.get(key) : defaultValue;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    @java.lang.Override
    public java.lang.String getLabelsOrThrow(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      java.util.Map<java.lang.String, java.lang.String> map = internalGetLabels().getMap();
      if (!map.containsKey(key)) {
        throw new java.lang.IllegalArgumentException();
      }
      return map.get(key);
    }

    public Builder clearLabels() {
      bitField0_ = (bitField0_ & ~0x00000200);
      internalGetMutableLabels().getMutableMap().clear();
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    public Builder removeLabels(java.lang.String key) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      internalGetMutableLabels().getMutableMap().remove(key);
      return this;
    }
    /** Use alternate mutation accessors instead. */
    @java.lang.Deprecated
    public java.util.Map<java.lang.String, java.lang.String> getMutableLabels() {
      bitField0_ |= 0x00000200;
      return internalGetMutableLabels().getMutableMap();
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    public Builder putLabels(java.lang.String key, java.lang.String value) {
      if (key == null) {
        throw new NullPointerException("map key");
      }
      if (value == null) {
        throw new NullPointerException("map value");
      }
      internalGetMutableLabels().getMutableMap().put(key, value);
      bitField0_ |= 0x00000200;
      return this;
    }
    /**
     *
     *
     * <pre>
     * Labels as key value pairs.
     * </pre>
     *
     * <code>map&lt;string, string&gt; labels = 11;</code>
     */
    public Builder putAllLabels(java.util.Map<java.lang.String, java.lang.String> values) {
      internalGetMutableLabels().getMutableMap().putAll(values);
      bitField0_ |= 0x00000200;
      return this;
    }

    private java.lang.Object servicesCidr_ = "";
    /**
     *
     *
     * <pre>
     * IP range for reserved for services (e.g. NFS).
     * </pre>
     *
     * <code>string services_cidr = 12;</code>
     *
     * @return The servicesCidr.
     */
    public java.lang.String getServicesCidr() {
      java.lang.Object ref = servicesCidr_;
      if (!(ref instanceof java.lang.String)) {
        com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref;
        java.lang.String s = bs.toStringUtf8();
        servicesCidr_ = s;
        return s;
      } else {
        return (java.lang.String) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * IP range for reserved for services (e.g. NFS).
     * </pre>
     *
     * <code>string services_cidr = 12;</code>
     *
     * @return The bytes for servicesCidr.
     */
    public com.google.protobuf.ByteString getServicesCidrBytes() {
      java.lang.Object ref = servicesCidr_;
      if (ref instanceof String) {
        com.google.protobuf.ByteString b =
            com.google.protobuf.ByteString.copyFromUtf8((java.lang.String) ref);
        servicesCidr_ = b;
        return b;
      } else {
        return (com.google.protobuf.ByteString) ref;
      }
    }
    /**
     *
     *
     * <pre>
     * IP range for reserved for services (e.g. NFS).
     * </pre>
     *
     * <code>string services_cidr = 12;</code>
     *
     * @param value The servicesCidr to set.
     * @return This builder for chaining.
     */
    public Builder setServicesCidr(java.lang.String value) {
      if (value == null) {
        throw new NullPointerException();
      }
      servicesCidr_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * IP range for reserved for services (e.g. NFS).
     * </pre>
     *
     * <code>string services_cidr = 12;</code>
     *
     * @return This builder for chaining.
     */
    public Builder clearServicesCidr() {
      servicesCidr_ = getDefaultInstance().getServicesCidr();
      bitField0_ = (bitField0_ & ~0x00000400);
      onChanged();
      return this;
    }
    /**
     *
     *
     * <pre>
     * IP range for reserved for services (e.g. NFS).
     * </pre>
     *
     * <code>string services_cidr = 12;</code>
     *
     * @param value The bytes for servicesCidr to set.
     * @return This builder for chaining.
     */
    public Builder setServicesCidrBytes(com.google.protobuf.ByteString value) {
      if (value == null) {
        throw new NullPointerException();
      }
      checkByteStringIsUtf8(value);
      servicesCidr_ = value;
      bitField0_ |= 0x00000400;
      onChanged();
      return this;
    }

    private java.util.List<com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>
        reservations_ = java.util.Collections.emptyList();

    private void ensureReservationsIsMutable() {
      if (!((bitField0_ & 0x00000800) != 0)) {
        reservations_ =
            new java.util.ArrayList<
                com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>(reservations_);
        bitField0_ |= 0x00000800;
      }
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservation,
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder,
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>
        reservationsBuilder_;

    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public java.util.List<com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>
        getReservationsList() {
      if (reservationsBuilder_ == null) {
        return java.util.Collections.unmodifiableList(reservations_);
      } else {
        return reservationsBuilder_.getMessageList();
      }
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public int getReservationsCount() {
      if (reservationsBuilder_ == null) {
        return reservations_.size();
      } else {
        return reservationsBuilder_.getCount();
      }
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation getReservations(
        int index) {
      if (reservationsBuilder_ == null) {
        return reservations_.get(index);
      } else {
        return reservationsBuilder_.getMessage(index);
      }
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder setReservations(
        int index, com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) {
      if (reservationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureReservationsIsMutable();
        reservations_.set(index, value);
        onChanged();
      } else {
        reservationsBuilder_.setMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder setReservations(
        int index,
        com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) {
      if (reservationsBuilder_ == null) {
        ensureReservationsIsMutable();
        reservations_.set(index, builderForValue.build());
        onChanged();
      } else {
        reservationsBuilder_.setMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder addReservations(
        com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) {
      if (reservationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureReservationsIsMutable();
        reservations_.add(value);
        onChanged();
      } else {
        reservationsBuilder_.addMessage(value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder addReservations(
        int index, com.google.cloud.baremetalsolution.v2.NetworkAddressReservation value) {
      if (reservationsBuilder_ == null) {
        if (value == null) {
          throw new NullPointerException();
        }
        ensureReservationsIsMutable();
        reservations_.add(index, value);
        onChanged();
      } else {
        reservationsBuilder_.addMessage(index, value);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder addReservations(
        com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) {
      if (reservationsBuilder_ == null) {
        ensureReservationsIsMutable();
        reservations_.add(builderForValue.build());
        onChanged();
      } else {
        reservationsBuilder_.addMessage(builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder addReservations(
        int index,
        com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder builderForValue) {
      if (reservationsBuilder_ == null) {
        ensureReservationsIsMutable();
        reservations_.add(index, builderForValue.build());
        onChanged();
      } else {
        reservationsBuilder_.addMessage(index, builderForValue.build());
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder addAllReservations(
        java.lang.Iterable<
                ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservation>
            values) {
      if (reservationsBuilder_ == null) {
        ensureReservationsIsMutable();
        com.google.protobuf.AbstractMessageLite.Builder.addAll(values, reservations_);
        onChanged();
      } else {
        reservationsBuilder_.addAllMessages(values);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder clearReservations() {
      if (reservationsBuilder_ == null) {
        reservations_ = java.util.Collections.emptyList();
        bitField0_ = (bitField0_ & ~0x00000800);
        onChanged();
      } else {
        reservationsBuilder_.clear();
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public Builder removeReservations(int index) {
      if (reservationsBuilder_ == null) {
        ensureReservationsIsMutable();
        reservations_.remove(index);
        onChanged();
      } else {
        reservationsBuilder_.remove(index);
      }
      return this;
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder
        getReservationsBuilder(int index) {
      return getReservationsFieldBuilder().getBuilder(index);
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder
        getReservationsOrBuilder(int index) {
      if (reservationsBuilder_ == null) {
        return reservations_.get(index);
      } else {
        return reservationsBuilder_.getMessageOrBuilder(index);
      }
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public java.util.List<
            ? extends com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>
        getReservationsOrBuilderList() {
      if (reservationsBuilder_ != null) {
        return reservationsBuilder_.getMessageOrBuilderList();
      } else {
        return java.util.Collections.unmodifiableList(reservations_);
      }
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder
        addReservationsBuilder() {
      return getReservationsFieldBuilder()
          .addBuilder(
              com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder
        addReservationsBuilder(int index) {
      return getReservationsFieldBuilder()
          .addBuilder(
              index,
              com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.getDefaultInstance());
    }
    /**
     *
     *
     * <pre>
     * List of IP address reservations in this network.
     * When updating this field, an error will be generated if a reservation
     * conflicts with an IP address already allocated to a physical server.
     * </pre>
     *
     * <code>
     * repeated .google.cloud.baremetalsolution.v2.NetworkAddressReservation reservations = 13;
     * </code>
     */
    public java.util.List<com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder>
        getReservationsBuilderList() {
      return getReservationsFieldBuilder().getBuilderList();
    }

    private com.google.protobuf.RepeatedFieldBuilderV3<
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservation,
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder,
            com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>
        getReservationsFieldBuilder() {
      if (reservationsBuilder_ == null) {
        reservationsBuilder_ =
            new com.google.protobuf.RepeatedFieldBuilderV3<
                com.google.cloud.baremetalsolution.v2.NetworkAddressReservation,
                com.google.cloud.baremetalsolution.v2.NetworkAddressReservation.Builder,
                com.google.cloud.baremetalsolution.v2.NetworkAddressReservationOrBuilder>(
                reservations_, ((bitField0_ & 0x00000800) != 0), getParentForChildren(), isClean());
        reservations_ = null;
      }
      return reservationsBuilder_;
    }

    @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.Network)
  }

  // @@protoc_insertion_point(class_scope:google.cloud.baremetalsolution.v2.Network)
  private static final com.google.cloud.baremetalsolution.v2.Network DEFAULT_INSTANCE;

  static {
    DEFAULT_INSTANCE = new com.google.cloud.baremetalsolution.v2.Network();
  }

  public static com.google.cloud.baremetalsolution.v2.Network getDefaultInstance() {
    return DEFAULT_INSTANCE;
  }

  private static final com.google.protobuf.Parser<Network> PARSER =
      new com.google.protobuf.AbstractParser<Network>() {
        @java.lang.Override
        public Network 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<Network> parser() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.protobuf.Parser<Network> getParserForType() {
    return PARSER;
  }

  @java.lang.Override
  public com.google.cloud.baremetalsolution.v2.Network getDefaultInstanceForType() {
    return DEFAULT_INSTANCE;
  }
}
