/*
 * 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.networkconnectivity.v1.model;

/**
 * A Network Connectivity Center spoke represents a connection between your Google Cloud network
 * resources and a non-Google-Cloud network. When you create a spoke, you associate it with a hub.
 * You must also identify a value for exactly one of the following fields: * linked_vpn_tunnels *
 * linked_interconnect_attachments * linked_router_appliance_instances
 *
 * <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 Network Connectivity 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 Spoke extends com.google.api.client.json.GenericJson {

  /**
   * Output only. The time the spoke was created.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String createTime;

  /**
   * An optional description of the spoke.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String description;

  /**
   * Immutable. The name of the hub that this spoke is attached to.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String hub;

  /**
   * Optional labels in key:value format. For more information about labels, see [Requirements for
   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.Map<String, java.lang.String> labels;

  /**
   * VLAN attachments that are associated with the spoke.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LinkedInterconnectAttachments linkedInterconnectAttachments;

  /**
   * Router appliance instances that are associated with the spoke.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LinkedRouterApplianceInstances linkedRouterApplianceInstances;

  /**
   * VPN tunnels that are associated with the spoke.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private LinkedVpnTunnels linkedVpnTunnels;

  /**
   * Immutable. The name of the spoke. Spoke names must be unique. They use the following form:
   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * Output only. The current lifecycle state of this spoke.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * Output only. The Google-generated UUID for the spoke. This value is unique across all spoke
   * resources. If a spoke is deleted and another with the same name is created, the new spoke is
   * assigned a different unique_id.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String uniqueId;

  /**
   * Output only. The time the spoke was last updated.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String updateTime;

  /**
   * Output only. The time the spoke was created.
   * @return value or {@code null} for none
   */
  public String getCreateTime() {
    return createTime;
  }

  /**
   * Output only. The time the spoke was created.
   * @param createTime createTime or {@code null} for none
   */
  public Spoke setCreateTime(String createTime) {
    this.createTime = createTime;
    return this;
  }

  /**
   * An optional description of the spoke.
   * @return value or {@code null} for none
   */
  public java.lang.String getDescription() {
    return description;
  }

  /**
   * An optional description of the spoke.
   * @param description description or {@code null} for none
   */
  public Spoke setDescription(java.lang.String description) {
    this.description = description;
    return this;
  }

  /**
   * Immutable. The name of the hub that this spoke is attached to.
   * @return value or {@code null} for none
   */
  public java.lang.String getHub() {
    return hub;
  }

  /**
   * Immutable. The name of the hub that this spoke is attached to.
   * @param hub hub or {@code null} for none
   */
  public Spoke setHub(java.lang.String hub) {
    this.hub = hub;
    return this;
  }

  /**
   * Optional labels in key:value format. For more information about labels, see [Requirements for
   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   * @return value or {@code null} for none
   */
  public java.util.Map<String, java.lang.String> getLabels() {
    return labels;
  }

  /**
   * Optional labels in key:value format. For more information about labels, see [Requirements for
   * labels](https://cloud.google.com/resource-manager/docs/creating-managing-labels#requirements).
   * @param labels labels or {@code null} for none
   */
  public Spoke setLabels(java.util.Map<String, java.lang.String> labels) {
    this.labels = labels;
    return this;
  }

  /**
   * VLAN attachments that are associated with the spoke.
   * @return value or {@code null} for none
   */
  public LinkedInterconnectAttachments getLinkedInterconnectAttachments() {
    return linkedInterconnectAttachments;
  }

  /**
   * VLAN attachments that are associated with the spoke.
   * @param linkedInterconnectAttachments linkedInterconnectAttachments or {@code null} for none
   */
  public Spoke setLinkedInterconnectAttachments(LinkedInterconnectAttachments linkedInterconnectAttachments) {
    this.linkedInterconnectAttachments = linkedInterconnectAttachments;
    return this;
  }

  /**
   * Router appliance instances that are associated with the spoke.
   * @return value or {@code null} for none
   */
  public LinkedRouterApplianceInstances getLinkedRouterApplianceInstances() {
    return linkedRouterApplianceInstances;
  }

  /**
   * Router appliance instances that are associated with the spoke.
   * @param linkedRouterApplianceInstances linkedRouterApplianceInstances or {@code null} for none
   */
  public Spoke setLinkedRouterApplianceInstances(LinkedRouterApplianceInstances linkedRouterApplianceInstances) {
    this.linkedRouterApplianceInstances = linkedRouterApplianceInstances;
    return this;
  }

  /**
   * VPN tunnels that are associated with the spoke.
   * @return value or {@code null} for none
   */
  public LinkedVpnTunnels getLinkedVpnTunnels() {
    return linkedVpnTunnels;
  }

  /**
   * VPN tunnels that are associated with the spoke.
   * @param linkedVpnTunnels linkedVpnTunnels or {@code null} for none
   */
  public Spoke setLinkedVpnTunnels(LinkedVpnTunnels linkedVpnTunnels) {
    this.linkedVpnTunnels = linkedVpnTunnels;
    return this;
  }

  /**
   * Immutable. The name of the spoke. Spoke names must be unique. They use the following form:
   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Immutable. The name of the spoke. Spoke names must be unique. They use the following form:
   * `projects/{project_number}/locations/{region}/spokes/{spoke_id}`
   * @param name name or {@code null} for none
   */
  public Spoke setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * Output only. The current lifecycle state of this spoke.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * Output only. The current lifecycle state of this spoke.
   * @param state state or {@code null} for none
   */
  public Spoke setState(java.lang.String state) {
    this.state = state;
    return this;
  }

  /**
   * Output only. The Google-generated UUID for the spoke. This value is unique across all spoke
   * resources. If a spoke is deleted and another with the same name is created, the new spoke is
   * assigned a different unique_id.
   * @return value or {@code null} for none
   */
  public java.lang.String getUniqueId() {
    return uniqueId;
  }

  /**
   * Output only. The Google-generated UUID for the spoke. This value is unique across all spoke
   * resources. If a spoke is deleted and another with the same name is created, the new spoke is
   * assigned a different unique_id.
   * @param uniqueId uniqueId or {@code null} for none
   */
  public Spoke setUniqueId(java.lang.String uniqueId) {
    this.uniqueId = uniqueId;
    return this;
  }

  /**
   * Output only. The time the spoke was last updated.
   * @return value or {@code null} for none
   */
  public String getUpdateTime() {
    return updateTime;
  }

  /**
   * Output only. The time the spoke was last updated.
   * @param updateTime updateTime or {@code null} for none
   */
  public Spoke setUpdateTime(String updateTime) {
    this.updateTime = updateTime;
    return this;
  }

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

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

}
