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

/**
 * Represents a private connection resource. A private connection is implemented as a VPC Network
 * Peering connection between a service producer's VPC network and a service consumer's VPC network.
 *
 * <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 Service Networking 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 GoogleCloudServicenetworkingV1betaConnection extends com.google.api.client.json.GenericJson {

  /**
   * The name of service consumer's VPC network that's connected with service producer network, in
   * the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project
   * number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is
   * the name of the service consumer's VPC network.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String network;

  /**
   * Output only. The name of the VPC Network Peering connection that was created by the service
   * producer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String peering;

  /**
   * The name of one or more allocated IP address ranges for this service producer of type
   * `PEERING`. Note that invoking this method with a different range when connection is already
   * established will not modify already provisioned service producer subnetworks.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> reservedPeeringRanges;

  /**
   * Output only. The name of the peering service that's associated with this connection, in the
   * following format: `services/{service name}`.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String service;

  /**
   * The name of service consumer's VPC network that's connected with service producer network, in
   * the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project
   * number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is
   * the name of the service consumer's VPC network.
   * @return value or {@code null} for none
   */
  public java.lang.String getNetwork() {
    return network;
  }

  /**
   * The name of service consumer's VPC network that's connected with service producer network, in
   * the following format: `projects/{project}/global/networks/{network}`. `{project}` is a project
   * number, such as in `12345` that includes the VPC service consumer's VPC network. `{network}` is
   * the name of the service consumer's VPC network.
   * @param network network or {@code null} for none
   */
  public GoogleCloudServicenetworkingV1betaConnection setNetwork(java.lang.String network) {
    this.network = network;
    return this;
  }

  /**
   * Output only. The name of the VPC Network Peering connection that was created by the service
   * producer.
   * @return value or {@code null} for none
   */
  public java.lang.String getPeering() {
    return peering;
  }

  /**
   * Output only. The name of the VPC Network Peering connection that was created by the service
   * producer.
   * @param peering peering or {@code null} for none
   */
  public GoogleCloudServicenetworkingV1betaConnection setPeering(java.lang.String peering) {
    this.peering = peering;
    return this;
  }

  /**
   * The name of one or more allocated IP address ranges for this service producer of type
   * `PEERING`. Note that invoking this method with a different range when connection is already
   * established will not modify already provisioned service producer subnetworks.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getReservedPeeringRanges() {
    return reservedPeeringRanges;
  }

  /**
   * The name of one or more allocated IP address ranges for this service producer of type
   * `PEERING`. Note that invoking this method with a different range when connection is already
   * established will not modify already provisioned service producer subnetworks.
   * @param reservedPeeringRanges reservedPeeringRanges or {@code null} for none
   */
  public GoogleCloudServicenetworkingV1betaConnection setReservedPeeringRanges(java.util.List<java.lang.String> reservedPeeringRanges) {
    this.reservedPeeringRanges = reservedPeeringRanges;
    return this;
  }

  /**
   * Output only. The name of the peering service that's associated with this connection, in the
   * following format: `services/{service name}`.
   * @return value or {@code null} for none
   */
  public java.lang.String getService() {
    return service;
  }

  /**
   * Output only. The name of the peering service that's associated with this connection, in the
   * following format: `services/{service name}`.
   * @param service service or {@code null} for none
   */
  public GoogleCloudServicenetworkingV1betaConnection setService(java.lang.String service) {
    this.service = service;
    return this;
  }

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

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

}
