/*
 * 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.cloudtasks.v2beta3.model;

/**
 * URI Override. When specified, all the HTTP tasks inside the queue will be partially or fully
 * overridden depending on the configured values.
 *
 * <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 Tasks 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 UriOverride extends com.google.api.client.json.GenericJson {

  /**
   * Host override. When specified, replaces the host part of the task URL. For example, if the task
   * URL is "https://www.google.com," and host value is set to "example.net", the overridden URI
   * will be changed to "https://example.net." Host value cannot be an empty string
   * (INVALID_ARGUMENT).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String host;

  /**
   * URI path. When specified, replaces the existing path of the task URL. Setting the path value to
   * an empty string clears the URI path segment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private PathOverride pathOverride;

  /**
   * Port override. When specified, replaces the port part of the task URI. For instance, for a URI
   * http://www.google.com/foo and port=123, the overridden URI becomes
   * http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the
   * port to 0 (Zero) clears the URI port.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long port;

  /**
   * URI Query. When specified, replaces the query part of the task URI. Setting the query value to
   * an empty string clears the URI query segment.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private QueryOverride queryOverride;

  /**
   * Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or
   * HTTPS).
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String scheme;

  /**
   * URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not
   * specified, it defaults to ALWAYS.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String uriOverrideEnforceMode;

  /**
   * Host override. When specified, replaces the host part of the task URL. For example, if the task
   * URL is "https://www.google.com," and host value is set to "example.net", the overridden URI
   * will be changed to "https://example.net." Host value cannot be an empty string
   * (INVALID_ARGUMENT).
   * @return value or {@code null} for none
   */
  public java.lang.String getHost() {
    return host;
  }

  /**
   * Host override. When specified, replaces the host part of the task URL. For example, if the task
   * URL is "https://www.google.com," and host value is set to "example.net", the overridden URI
   * will be changed to "https://example.net." Host value cannot be an empty string
   * (INVALID_ARGUMENT).
   * @param host host or {@code null} for none
   */
  public UriOverride setHost(java.lang.String host) {
    this.host = host;
    return this;
  }

  /**
   * URI path. When specified, replaces the existing path of the task URL. Setting the path value to
   * an empty string clears the URI path segment.
   * @return value or {@code null} for none
   */
  public PathOverride getPathOverride() {
    return pathOverride;
  }

  /**
   * URI path. When specified, replaces the existing path of the task URL. Setting the path value to
   * an empty string clears the URI path segment.
   * @param pathOverride pathOverride or {@code null} for none
   */
  public UriOverride setPathOverride(PathOverride pathOverride) {
    this.pathOverride = pathOverride;
    return this;
  }

  /**
   * Port override. When specified, replaces the port part of the task URI. For instance, for a URI
   * http://www.google.com/foo and port=123, the overridden URI becomes
   * http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the
   * port to 0 (Zero) clears the URI port.
   * @return value or {@code null} for none
   */
  public java.lang.Long getPort() {
    return port;
  }

  /**
   * Port override. When specified, replaces the port part of the task URI. For instance, for a URI
   * http://www.google.com/foo and port=123, the overridden URI becomes
   * http://www.google.com:123/foo. Note that the port value must be a positive integer. Setting the
   * port to 0 (Zero) clears the URI port.
   * @param port port or {@code null} for none
   */
  public UriOverride setPort(java.lang.Long port) {
    this.port = port;
    return this;
  }

  /**
   * URI Query. When specified, replaces the query part of the task URI. Setting the query value to
   * an empty string clears the URI query segment.
   * @return value or {@code null} for none
   */
  public QueryOverride getQueryOverride() {
    return queryOverride;
  }

  /**
   * URI Query. When specified, replaces the query part of the task URI. Setting the query value to
   * an empty string clears the URI query segment.
   * @param queryOverride queryOverride or {@code null} for none
   */
  public UriOverride setQueryOverride(QueryOverride queryOverride) {
    this.queryOverride = queryOverride;
    return this;
  }

  /**
   * Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or
   * HTTPS).
   * @return value or {@code null} for none
   */
  public java.lang.String getScheme() {
    return scheme;
  }

  /**
   * Scheme override. When specified, the task URI scheme is replaced by the provided value (HTTP or
   * HTTPS).
   * @param scheme scheme or {@code null} for none
   */
  public UriOverride setScheme(java.lang.String scheme) {
    this.scheme = scheme;
    return this;
  }

  /**
   * URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not
   * specified, it defaults to ALWAYS.
   * @return value or {@code null} for none
   */
  public java.lang.String getUriOverrideEnforceMode() {
    return uriOverrideEnforceMode;
  }

  /**
   * URI Override Enforce Mode When specified, determines the Target UriOverride mode. If not
   * specified, it defaults to ALWAYS.
   * @param uriOverrideEnforceMode uriOverrideEnforceMode or {@code null} for none
   */
  public UriOverride setUriOverrideEnforceMode(java.lang.String uriOverrideEnforceMode) {
    this.uriOverrideEnforceMode = uriOverrideEnforceMode;
    return this;
  }

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

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

}
