/*
 * 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
 *
 * http://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.
 */
/*
 * This code was generated by https://github.com/googleapis/google-api-java-client-services/
 * Modify at your own risk.
 */

package com.google.api.services.lifesciences.v2beta.model;

/**
 * VM networking options.
 *
 * <p> This is the Java data model class that specifies how to parse/serialize into the JSON that is
 * transmitted over HTTP when working with the Cloud Life Sciences API. For a detailed explanation
 * see:
 * <a href="https://developers.google.com/api-client-library/java/google-http-java-client/json">https://developers.google.com/api-client-library/java/google-http-java-client/json</a>
 * </p>
 *
 * @author Google, Inc.
 */
@SuppressWarnings("javadoc")
public final class Network extends com.google.api.client.json.GenericJson {

  /**
   * The network name to attach the VM's network interface to. The value will be prefixed with
   * `global/networks/` unless it contains a `/`, in which case it is assumed to be a fully
   * specified network resource URL.
   *
   * If unspecified, the global default network is used.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String network;

  /**
   * If the specified network is configured for custom subnet creation, the name of the subnetwork
   * to attach the instance to must be specified here.
   *
   * The value is prefixed with `regions/subnetworks/` unless it contains a `/`, in which case it is
   * assumed to be a fully specified subnetwork resource URL.
   *
   * If the `*` character appears in the value, it is replaced with the region that the virtual
   * machine has been allocated in.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String subnetwork;

  /**
   * If set to true, do not attach a public IP address to the VM. Note that without a public IP
   * address, additional configuration is required to allow the VM to access Google services.
   *
   * See https://cloud.google.com/vpc/docs/configure-private-google-access for more information.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Boolean usePrivateAddress;

  /**
   * The network name to attach the VM's network interface to. The value will be prefixed with
   * `global/networks/` unless it contains a `/`, in which case it is assumed to be a fully
   * specified network resource URL.
   *
   * If unspecified, the global default network is used.
   * @return value or {@code null} for none
   */
  public java.lang.String getNetwork() {
    return network;
  }

  /**
   * The network name to attach the VM's network interface to. The value will be prefixed with
   * `global/networks/` unless it contains a `/`, in which case it is assumed to be a fully
   * specified network resource URL.
   *
   * If unspecified, the global default network is used.
   * @param network network or {@code null} for none
   */
  public Network setNetwork(java.lang.String network) {
    this.network = network;
    return this;
  }

  /**
   * If the specified network is configured for custom subnet creation, the name of the subnetwork
   * to attach the instance to must be specified here.
   *
   * The value is prefixed with `regions/subnetworks/` unless it contains a `/`, in which case it is
   * assumed to be a fully specified subnetwork resource URL.
   *
   * If the `*` character appears in the value, it is replaced with the region that the virtual
   * machine has been allocated in.
   * @return value or {@code null} for none
   */
  public java.lang.String getSubnetwork() {
    return subnetwork;
  }

  /**
   * If the specified network is configured for custom subnet creation, the name of the subnetwork
   * to attach the instance to must be specified here.
   *
   * The value is prefixed with `regions/subnetworks/` unless it contains a `/`, in which case it is
   * assumed to be a fully specified subnetwork resource URL.
   *
   * If the `*` character appears in the value, it is replaced with the region that the virtual
   * machine has been allocated in.
   * @param subnetwork subnetwork or {@code null} for none
   */
  public Network setSubnetwork(java.lang.String subnetwork) {
    this.subnetwork = subnetwork;
    return this;
  }

  /**
   * If set to true, do not attach a public IP address to the VM. Note that without a public IP
   * address, additional configuration is required to allow the VM to access Google services.
   *
   * See https://cloud.google.com/vpc/docs/configure-private-google-access for more information.
   * @return value or {@code null} for none
   */
  public java.lang.Boolean getUsePrivateAddress() {
    return usePrivateAddress;
  }

  /**
   * If set to true, do not attach a public IP address to the VM. Note that without a public IP
   * address, additional configuration is required to allow the VM to access Google services.
   *
   * See https://cloud.google.com/vpc/docs/configure-private-google-access for more information.
   * @param usePrivateAddress usePrivateAddress or {@code null} for none
   */
  public Network setUsePrivateAddress(java.lang.Boolean usePrivateAddress) {
    this.usePrivateAddress = usePrivateAddress;
    return this;
  }

  @Override
  public Network set(String fieldName, Object value) {
    return (Network) super.set(fieldName, value);
  }

  @Override
  public Network clone() {
    return (Network) super.clone();
  }

}
