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

/**
 * Describes a web asset.
 *
 * <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 Digital Asset Links 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 WebAsset extends com.google.api.client.json.GenericJson {

  /**
   * Web assets are identified by a URL that contains only the scheme, hostname and port parts.  The
   * format is
   *
   *     http[s]://[:]
   *
   * Hostnames must be fully qualified: they must end in a single period ("`.`").
   *
   * Only the schemes "http" and "https" are currently allowed.
   *
   * Port numbers are given as a decimal number, and they must be omitted if the standard port
   * numbers are used: 80 for http and 443 for https.
   *
   * We call this limited URL the "site".  All URLs that share the same scheme, hostname and port
   * are considered to be a part of the site and thus belong to the web asset.
   *
   * Example: the asset with the site `https://www.google.com` contains all these URLs:
   *
   *   *   `https://www.google.com/`   *   `https://www.google.com:443/`   *
   * `https://www.google.com/foo`   *   `https://www.google.com/foo?bar`   *
   * `https://www.google.com/foo#bar`   *   `https://user@password:www.google.com/`
   *
   * But it does not contain these URLs:
   *
   *   *   `http://www.google.com/`       (wrong scheme)   *   `https://google.com/`
   * (hostname does not match)   *   `https://www.google.com:444/`  (port does not match) REQUIRED
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String site;

  /**
   * Web assets are identified by a URL that contains only the scheme, hostname and port parts.  The
   * format is
   *
   *     http[s]://[:]
   *
   * Hostnames must be fully qualified: they must end in a single period ("`.`").
   *
   * Only the schemes "http" and "https" are currently allowed.
   *
   * Port numbers are given as a decimal number, and they must be omitted if the standard port
   * numbers are used: 80 for http and 443 for https.
   *
   * We call this limited URL the "site".  All URLs that share the same scheme, hostname and port
   * are considered to be a part of the site and thus belong to the web asset.
   *
   * Example: the asset with the site `https://www.google.com` contains all these URLs:
   *
   *   *   `https://www.google.com/`   *   `https://www.google.com:443/`   *
   * `https://www.google.com/foo`   *   `https://www.google.com/foo?bar`   *
   * `https://www.google.com/foo#bar`   *   `https://user@password:www.google.com/`
   *
   * But it does not contain these URLs:
   *
   *   *   `http://www.google.com/`       (wrong scheme)   *   `https://google.com/`
   * (hostname does not match)   *   `https://www.google.com:444/`  (port does not match) REQUIRED
   * @return value or {@code null} for none
   */
  public java.lang.String getSite() {
    return site;
  }

  /**
   * Web assets are identified by a URL that contains only the scheme, hostname and port parts.  The
   * format is
   *
   *     http[s]://[:]
   *
   * Hostnames must be fully qualified: they must end in a single period ("`.`").
   *
   * Only the schemes "http" and "https" are currently allowed.
   *
   * Port numbers are given as a decimal number, and they must be omitted if the standard port
   * numbers are used: 80 for http and 443 for https.
   *
   * We call this limited URL the "site".  All URLs that share the same scheme, hostname and port
   * are considered to be a part of the site and thus belong to the web asset.
   *
   * Example: the asset with the site `https://www.google.com` contains all these URLs:
   *
   *   *   `https://www.google.com/`   *   `https://www.google.com:443/`   *
   * `https://www.google.com/foo`   *   `https://www.google.com/foo?bar`   *
   * `https://www.google.com/foo#bar`   *   `https://user@password:www.google.com/`
   *
   * But it does not contain these URLs:
   *
   *   *   `http://www.google.com/`       (wrong scheme)   *   `https://google.com/`
   * (hostname does not match)   *   `https://www.google.com:444/`  (port does not match) REQUIRED
   * @param site site or {@code null} for none
   */
  public WebAsset setSite(java.lang.String site) {
    this.site = site;
    return this;
  }

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

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

}
