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

/**
 * PSC connection details on consumer side.
 *
 * <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 ConsumerPscConnection extends com.google.api.client.json.GenericJson {

  /**
   * The most recent error during operating this connection.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleRpcStatus error;

  /**
   * Output only. The error info for the latest error during operating this connection.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private GoogleRpcErrorInfo errorInfo;

  /**
   * The error type indicates whether the error is consumer facing, producer facing or system
   * internal.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String errorType;

  /**
   * The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-
   * east1/networks/{resourceId}.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String forwardingRule;

  /**
   * The last Compute Engine operation to setup PSC connection.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String gceOperation;

  /**
   * The IP literal allocated on the consumer network for the PSC forwarding rule that is created to
   * connect to the producer service attachment in this service connection map.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String ip;

  /**
   * The consumer network whose PSC forwarding rule is connected to the service attachments in this
   * service connection map. Note that the network could be on a different project (shared VPC).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String network;

  /**
   * The consumer project whose PSC forwarding rule is connected to the service attachments in this
   * service connection map.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String project;

  /**
   * The PSC connection id of the PSC forwarding rule connected to the service attachments in this
   * service connection map.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String pscConnectionId;

  /**
   * The URI of a service attachment which is the target of the PSC connection.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String serviceAttachmentUri;

  /**
   * The state of the PSC connection.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String state;

  /**
   * The most recent error during operating this connection.
   * @return value or {@code null} for none
   */
  public GoogleRpcStatus getError() {
    return error;
  }

  /**
   * The most recent error during operating this connection.
   * @param error error or {@code null} for none
   */
  public ConsumerPscConnection setError(GoogleRpcStatus error) {
    this.error = error;
    return this;
  }

  /**
   * Output only. The error info for the latest error during operating this connection.
   * @return value or {@code null} for none
   */
  public GoogleRpcErrorInfo getErrorInfo() {
    return errorInfo;
  }

  /**
   * Output only. The error info for the latest error during operating this connection.
   * @param errorInfo errorInfo or {@code null} for none
   */
  public ConsumerPscConnection setErrorInfo(GoogleRpcErrorInfo errorInfo) {
    this.errorInfo = errorInfo;
    return this;
  }

  /**
   * The error type indicates whether the error is consumer facing, producer facing or system
   * internal.
   * @return value or {@code null} for none
   */
  public java.lang.String getErrorType() {
    return errorType;
  }

  /**
   * The error type indicates whether the error is consumer facing, producer facing or system
   * internal.
   * @param errorType errorType or {@code null} for none
   */
  public ConsumerPscConnection setErrorType(java.lang.String errorType) {
    this.errorType = errorType;
    return this;
  }

  /**
   * The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-
   * east1/networks/{resourceId}.
   * @return value or {@code null} for none
   */
  public java.lang.String getForwardingRule() {
    return forwardingRule;
  }

  /**
   * The URI of the consumer forwarding rule created. Example: projects/{projectNumOrId}/regions/us-
   * east1/networks/{resourceId}.
   * @param forwardingRule forwardingRule or {@code null} for none
   */
  public ConsumerPscConnection setForwardingRule(java.lang.String forwardingRule) {
    this.forwardingRule = forwardingRule;
    return this;
  }

  /**
   * The last Compute Engine operation to setup PSC connection.
   * @return value or {@code null} for none
   */
  public java.lang.String getGceOperation() {
    return gceOperation;
  }

  /**
   * The last Compute Engine operation to setup PSC connection.
   * @param gceOperation gceOperation or {@code null} for none
   */
  public ConsumerPscConnection setGceOperation(java.lang.String gceOperation) {
    this.gceOperation = gceOperation;
    return this;
  }

  /**
   * The IP literal allocated on the consumer network for the PSC forwarding rule that is created to
   * connect to the producer service attachment in this service connection map.
   * @return value or {@code null} for none
   */
  public java.lang.String getIp() {
    return ip;
  }

  /**
   * The IP literal allocated on the consumer network for the PSC forwarding rule that is created to
   * connect to the producer service attachment in this service connection map.
   * @param ip ip or {@code null} for none
   */
  public ConsumerPscConnection setIp(java.lang.String ip) {
    this.ip = ip;
    return this;
  }

  /**
   * The consumer network whose PSC forwarding rule is connected to the service attachments in this
   * service connection map. Note that the network could be on a different project (shared VPC).
   * @return value or {@code null} for none
   */
  public java.lang.String getNetwork() {
    return network;
  }

  /**
   * The consumer network whose PSC forwarding rule is connected to the service attachments in this
   * service connection map. Note that the network could be on a different project (shared VPC).
   * @param network network or {@code null} for none
   */
  public ConsumerPscConnection setNetwork(java.lang.String network) {
    this.network = network;
    return this;
  }

  /**
   * The consumer project whose PSC forwarding rule is connected to the service attachments in this
   * service connection map.
   * @return value or {@code null} for none
   */
  public java.lang.String getProject() {
    return project;
  }

  /**
   * The consumer project whose PSC forwarding rule is connected to the service attachments in this
   * service connection map.
   * @param project project or {@code null} for none
   */
  public ConsumerPscConnection setProject(java.lang.String project) {
    this.project = project;
    return this;
  }

  /**
   * The PSC connection id of the PSC forwarding rule connected to the service attachments in this
   * service connection map.
   * @return value or {@code null} for none
   */
  public java.lang.String getPscConnectionId() {
    return pscConnectionId;
  }

  /**
   * The PSC connection id of the PSC forwarding rule connected to the service attachments in this
   * service connection map.
   * @param pscConnectionId pscConnectionId or {@code null} for none
   */
  public ConsumerPscConnection setPscConnectionId(java.lang.String pscConnectionId) {
    this.pscConnectionId = pscConnectionId;
    return this;
  }

  /**
   * The URI of a service attachment which is the target of the PSC connection.
   * @return value or {@code null} for none
   */
  public java.lang.String getServiceAttachmentUri() {
    return serviceAttachmentUri;
  }

  /**
   * The URI of a service attachment which is the target of the PSC connection.
   * @param serviceAttachmentUri serviceAttachmentUri or {@code null} for none
   */
  public ConsumerPscConnection setServiceAttachmentUri(java.lang.String serviceAttachmentUri) {
    this.serviceAttachmentUri = serviceAttachmentUri;
    return this;
  }

  /**
   * The state of the PSC connection.
   * @return value or {@code null} for none
   */
  public java.lang.String getState() {
    return state;
  }

  /**
   * The state of the PSC connection.
   * @param state state or {@code null} for none
   */
  public ConsumerPscConnection setState(java.lang.String state) {
    this.state = state;
    return this;
  }

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

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

}
