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

/**
 * An SSL certificate that a user has been authorized to administer. A user is authorized to
 * administer any certificate that applies to one of their authorized domains.
 *
 * <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 App Engine Admin 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 AuthorizedCertificate extends com.google.api.client.json.GenericJson {

  /**
   * The SSL certificate serving the AuthorizedCertificate resource. This must be obtained
   * independently from a certificate authority.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private CertificateRawData certificateRawData;

  /**
   * The user-specified display name of the certificate. This is not guaranteed to be unique.
   * Example: My Certificate.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String displayName;

  /**
   * Aggregate count of the domain mappings with this certificate mapped. This count includes domain
   * mappings on applications for which the user does not have VIEWER permissions.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer domainMappingsCount;

  /**
   * Topmost applicable domains of this certificate. This certificate applies to these domains and
   * their subdomains. Example: example.com.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> domainNames;

  /**
   * The time when this certificate expires. To update the renewal time on this certificate, upload
   * an SSL certificate with a different expiration time using
   * AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private String expireTime;

  /**
   * Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate
   * resource creation. Example: 12345.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String id;

  /**
   * Only applicable if this certificate is managed by App Engine. Managed certificates are tied to
   * the lifecycle of a DomainMapping and cannot be updated or deleted via the
   * AuthorizedCertificates API. If this certificate is manually administered by the user, this
   * field will be empty.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private ManagedCertificate managedCertificate;

  /**
   * Full path to the AuthorizedCertificate resource in the API. Example:
   * apps/myapp/authorizedCertificates/12345.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String name;

  /**
   * The full paths to user visible Domain Mapping resources that have this certificate mapped.
   * Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped
   * domain mappings if the user does not have VIEWER permissions on all of the applications that
   * have this certificate mapped. See domain_mappings_count for a complete count.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> visibleDomainMappings;

  /**
   * The SSL certificate serving the AuthorizedCertificate resource. This must be obtained
   * independently from a certificate authority.
   * @return value or {@code null} for none
   */
  public CertificateRawData getCertificateRawData() {
    return certificateRawData;
  }

  /**
   * The SSL certificate serving the AuthorizedCertificate resource. This must be obtained
   * independently from a certificate authority.
   * @param certificateRawData certificateRawData or {@code null} for none
   */
  public AuthorizedCertificate setCertificateRawData(CertificateRawData certificateRawData) {
    this.certificateRawData = certificateRawData;
    return this;
  }

  /**
   * The user-specified display name of the certificate. This is not guaranteed to be unique.
   * Example: My Certificate.
   * @return value or {@code null} for none
   */
  public java.lang.String getDisplayName() {
    return displayName;
  }

  /**
   * The user-specified display name of the certificate. This is not guaranteed to be unique.
   * Example: My Certificate.
   * @param displayName displayName or {@code null} for none
   */
  public AuthorizedCertificate setDisplayName(java.lang.String displayName) {
    this.displayName = displayName;
    return this;
  }

  /**
   * Aggregate count of the domain mappings with this certificate mapped. This count includes domain
   * mappings on applications for which the user does not have VIEWER permissions.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * @return value or {@code null} for none
   */
  public java.lang.Integer getDomainMappingsCount() {
    return domainMappingsCount;
  }

  /**
   * Aggregate count of the domain mappings with this certificate mapped. This count includes domain
   * mappings on applications for which the user does not have VIEWER permissions.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * @param domainMappingsCount domainMappingsCount or {@code null} for none
   */
  public AuthorizedCertificate setDomainMappingsCount(java.lang.Integer domainMappingsCount) {
    this.domainMappingsCount = domainMappingsCount;
    return this;
  }

  /**
   * Topmost applicable domains of this certificate. This certificate applies to these domains and
   * their subdomains. Example: example.com.@OutputOnly
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getDomainNames() {
    return domainNames;
  }

  /**
   * Topmost applicable domains of this certificate. This certificate applies to these domains and
   * their subdomains. Example: example.com.@OutputOnly
   * @param domainNames domainNames or {@code null} for none
   */
  public AuthorizedCertificate setDomainNames(java.util.List<java.lang.String> domainNames) {
    this.domainNames = domainNames;
    return this;
  }

  /**
   * The time when this certificate expires. To update the renewal time on this certificate, upload
   * an SSL certificate with a different expiration time using
   * AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
   * @return value or {@code null} for none
   */
  public String getExpireTime() {
    return expireTime;
  }

  /**
   * The time when this certificate expires. To update the renewal time on this certificate, upload
   * an SSL certificate with a different expiration time using
   * AuthorizedCertificates.UpdateAuthorizedCertificate.@OutputOnly
   * @param expireTime expireTime or {@code null} for none
   */
  public AuthorizedCertificate setExpireTime(String expireTime) {
    this.expireTime = expireTime;
    return this;
  }

  /**
   * Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate
   * resource creation. Example: 12345.@OutputOnly
   * @return value or {@code null} for none
   */
  public java.lang.String getId() {
    return id;
  }

  /**
   * Relative name of the certificate. This is a unique value autogenerated on AuthorizedCertificate
   * resource creation. Example: 12345.@OutputOnly
   * @param id id or {@code null} for none
   */
  public AuthorizedCertificate setId(java.lang.String id) {
    this.id = id;
    return this;
  }

  /**
   * Only applicable if this certificate is managed by App Engine. Managed certificates are tied to
   * the lifecycle of a DomainMapping and cannot be updated or deleted via the
   * AuthorizedCertificates API. If this certificate is manually administered by the user, this
   * field will be empty.@OutputOnly
   * @return value or {@code null} for none
   */
  public ManagedCertificate getManagedCertificate() {
    return managedCertificate;
  }

  /**
   * Only applicable if this certificate is managed by App Engine. Managed certificates are tied to
   * the lifecycle of a DomainMapping and cannot be updated or deleted via the
   * AuthorizedCertificates API. If this certificate is manually administered by the user, this
   * field will be empty.@OutputOnly
   * @param managedCertificate managedCertificate or {@code null} for none
   */
  public AuthorizedCertificate setManagedCertificate(ManagedCertificate managedCertificate) {
    this.managedCertificate = managedCertificate;
    return this;
  }

  /**
   * Full path to the AuthorizedCertificate resource in the API. Example:
   * apps/myapp/authorizedCertificates/12345.@OutputOnly
   * @return value or {@code null} for none
   */
  public java.lang.String getName() {
    return name;
  }

  /**
   * Full path to the AuthorizedCertificate resource in the API. Example:
   * apps/myapp/authorizedCertificates/12345.@OutputOnly
   * @param name name or {@code null} for none
   */
  public AuthorizedCertificate setName(java.lang.String name) {
    this.name = name;
    return this;
  }

  /**
   * The full paths to user visible Domain Mapping resources that have this certificate mapped.
   * Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped
   * domain mappings if the user does not have VIEWER permissions on all of the applications that
   * have this certificate mapped. See domain_mappings_count for a complete count.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getVisibleDomainMappings() {
    return visibleDomainMappings;
  }

  /**
   * The full paths to user visible Domain Mapping resources that have this certificate mapped.
   * Example: apps/myapp/domainMappings/example.com.This may not represent the full list of mapped
   * domain mappings if the user does not have VIEWER permissions on all of the applications that
   * have this certificate mapped. See domain_mappings_count for a complete count.Only returned by
   * GET or LIST requests when specifically requested by the view=FULL_CERTIFICATE
   * option.@OutputOnly
   * @param visibleDomainMappings visibleDomainMappings or {@code null} for none
   */
  public AuthorizedCertificate setVisibleDomainMappings(java.util.List<java.lang.String> visibleDomainMappings) {
    this.visibleDomainMappings = visibleDomainMappings;
    return this;
  }

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

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

}
