/*
 * 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.networkmanagement.v1beta1.model;

/**
 * For display only. The specification of the endpoints for the test. EndpointInfo is derived from
 * source and destination Endpoint and validated by the backend data plane model.
 *
 * <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 Management 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 EndpointInfo extends com.google.api.client.json.GenericJson {

  /**
   * Destination IP address.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String destinationIp;

  /**
   * URI of the network where this packet is sent to.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String destinationNetworkUri;

  /**
   * Destination port. Only valid when protocol is TCP or UDP.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer destinationPort;

  /**
   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String protocol;

  /**
   * URI of the source telemetry agent this packet originates from.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sourceAgentUri;

  /**
   * Source IP address.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sourceIp;

  /**
   * URI of the network where this packet originates from.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sourceNetworkUri;

  /**
   * Source port. Only valid when protocol is TCP or UDP.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer sourcePort;

  /**
   * Destination IP address.
   * @return value or {@code null} for none
   */
  public java.lang.String getDestinationIp() {
    return destinationIp;
  }

  /**
   * Destination IP address.
   * @param destinationIp destinationIp or {@code null} for none
   */
  public EndpointInfo setDestinationIp(java.lang.String destinationIp) {
    this.destinationIp = destinationIp;
    return this;
  }

  /**
   * URI of the network where this packet is sent to.
   * @return value or {@code null} for none
   */
  public java.lang.String getDestinationNetworkUri() {
    return destinationNetworkUri;
  }

  /**
   * URI of the network where this packet is sent to.
   * @param destinationNetworkUri destinationNetworkUri or {@code null} for none
   */
  public EndpointInfo setDestinationNetworkUri(java.lang.String destinationNetworkUri) {
    this.destinationNetworkUri = destinationNetworkUri;
    return this;
  }

  /**
   * Destination port. Only valid when protocol is TCP or UDP.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getDestinationPort() {
    return destinationPort;
  }

  /**
   * Destination port. Only valid when protocol is TCP or UDP.
   * @param destinationPort destinationPort or {@code null} for none
   */
  public EndpointInfo setDestinationPort(java.lang.Integer destinationPort) {
    this.destinationPort = destinationPort;
    return this;
  }

  /**
   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
   * @return value or {@code null} for none
   */
  public java.lang.String getProtocol() {
    return protocol;
  }

  /**
   * IP protocol in string format, for example: "TCP", "UDP", "ICMP".
   * @param protocol protocol or {@code null} for none
   */
  public EndpointInfo setProtocol(java.lang.String protocol) {
    this.protocol = protocol;
    return this;
  }

  /**
   * URI of the source telemetry agent this packet originates from.
   * @return value or {@code null} for none
   */
  public java.lang.String getSourceAgentUri() {
    return sourceAgentUri;
  }

  /**
   * URI of the source telemetry agent this packet originates from.
   * @param sourceAgentUri sourceAgentUri or {@code null} for none
   */
  public EndpointInfo setSourceAgentUri(java.lang.String sourceAgentUri) {
    this.sourceAgentUri = sourceAgentUri;
    return this;
  }

  /**
   * Source IP address.
   * @return value or {@code null} for none
   */
  public java.lang.String getSourceIp() {
    return sourceIp;
  }

  /**
   * Source IP address.
   * @param sourceIp sourceIp or {@code null} for none
   */
  public EndpointInfo setSourceIp(java.lang.String sourceIp) {
    this.sourceIp = sourceIp;
    return this;
  }

  /**
   * URI of the network where this packet originates from.
   * @return value or {@code null} for none
   */
  public java.lang.String getSourceNetworkUri() {
    return sourceNetworkUri;
  }

  /**
   * URI of the network where this packet originates from.
   * @param sourceNetworkUri sourceNetworkUri or {@code null} for none
   */
  public EndpointInfo setSourceNetworkUri(java.lang.String sourceNetworkUri) {
    this.sourceNetworkUri = sourceNetworkUri;
    return this;
  }

  /**
   * Source port. Only valid when protocol is TCP or UDP.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getSourcePort() {
    return sourcePort;
  }

  /**
   * Source port. Only valid when protocol is TCP or UDP.
   * @param sourcePort sourcePort or {@code null} for none
   */
  public EndpointInfo setSourcePort(java.lang.Integer sourcePort) {
    this.sourcePort = sourcePort;
    return this;
  }

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

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

}
