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

/**
 * X.509 certificate as defined in RFC 5280.
 *
 * <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 Apigee 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 GoogleCloudApigeeV1CertInfo extends com.google.api.client.json.GenericJson {

  /**
   * X.509 basic constraints extension.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String basicConstraints;

  /**
   * X.509 `notAfter` validity period in milliseconds since epoch.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long expiryDate;

  /**
   * Flag that specifies whether the certificate is valid. Flag is set to `Yes` if the certificate
   * is valid, `No` if expired, or `Not yet` if not yet valid.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String isValid;

  /**
   * X.509 issuer.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String issuer;

  /**
   * Public key component of the X.509 subject public key info.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String publicKey;

  /**
   * X.509 serial number.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String serialNumber;

  /**
   * X.509 signatureAlgorithm.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String sigAlgName;

  /**
   * X.509 subject.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.String subject;

  /**
   * X.509 subject alternative names (SANs) extension.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.util.List<java.lang.String> subjectAlternativeNames;

  /**
   * X.509 `notBefore` validity period in milliseconds since epoch.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key @com.google.api.client.json.JsonString
  private java.lang.Long validFrom;

  /**
   * X.509 version.
   * The value may be {@code null}.
   */
  @com.google.api.client.util.Key
  private java.lang.Integer version;

  /**
   * X.509 basic constraints extension.
   * @return value or {@code null} for none
   */
  public java.lang.String getBasicConstraints() {
    return basicConstraints;
  }

  /**
   * X.509 basic constraints extension.
   * @param basicConstraints basicConstraints or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setBasicConstraints(java.lang.String basicConstraints) {
    this.basicConstraints = basicConstraints;
    return this;
  }

  /**
   * X.509 `notAfter` validity period in milliseconds since epoch.
   * @return value or {@code null} for none
   */
  public java.lang.Long getExpiryDate() {
    return expiryDate;
  }

  /**
   * X.509 `notAfter` validity period in milliseconds since epoch.
   * @param expiryDate expiryDate or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setExpiryDate(java.lang.Long expiryDate) {
    this.expiryDate = expiryDate;
    return this;
  }

  /**
   * Flag that specifies whether the certificate is valid. Flag is set to `Yes` if the certificate
   * is valid, `No` if expired, or `Not yet` if not yet valid.
   * @return value or {@code null} for none
   */
  public java.lang.String getIsValid() {
    return isValid;
  }

  /**
   * Flag that specifies whether the certificate is valid. Flag is set to `Yes` if the certificate
   * is valid, `No` if expired, or `Not yet` if not yet valid.
   * @param isValid isValid or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setIsValid(java.lang.String isValid) {
    this.isValid = isValid;
    return this;
  }

  /**
   * X.509 issuer.
   * @return value or {@code null} for none
   */
  public java.lang.String getIssuer() {
    return issuer;
  }

  /**
   * X.509 issuer.
   * @param issuer issuer or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setIssuer(java.lang.String issuer) {
    this.issuer = issuer;
    return this;
  }

  /**
   * Public key component of the X.509 subject public key info.
   * @return value or {@code null} for none
   */
  public java.lang.String getPublicKey() {
    return publicKey;
  }

  /**
   * Public key component of the X.509 subject public key info.
   * @param publicKey publicKey or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setPublicKey(java.lang.String publicKey) {
    this.publicKey = publicKey;
    return this;
  }

  /**
   * X.509 serial number.
   * @return value or {@code null} for none
   */
  public java.lang.String getSerialNumber() {
    return serialNumber;
  }

  /**
   * X.509 serial number.
   * @param serialNumber serialNumber or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setSerialNumber(java.lang.String serialNumber) {
    this.serialNumber = serialNumber;
    return this;
  }

  /**
   * X.509 signatureAlgorithm.
   * @return value or {@code null} for none
   */
  public java.lang.String getSigAlgName() {
    return sigAlgName;
  }

  /**
   * X.509 signatureAlgorithm.
   * @param sigAlgName sigAlgName or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setSigAlgName(java.lang.String sigAlgName) {
    this.sigAlgName = sigAlgName;
    return this;
  }

  /**
   * X.509 subject.
   * @return value or {@code null} for none
   */
  public java.lang.String getSubject() {
    return subject;
  }

  /**
   * X.509 subject.
   * @param subject subject or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setSubject(java.lang.String subject) {
    this.subject = subject;
    return this;
  }

  /**
   * X.509 subject alternative names (SANs) extension.
   * @return value or {@code null} for none
   */
  public java.util.List<java.lang.String> getSubjectAlternativeNames() {
    return subjectAlternativeNames;
  }

  /**
   * X.509 subject alternative names (SANs) extension.
   * @param subjectAlternativeNames subjectAlternativeNames or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setSubjectAlternativeNames(java.util.List<java.lang.String> subjectAlternativeNames) {
    this.subjectAlternativeNames = subjectAlternativeNames;
    return this;
  }

  /**
   * X.509 `notBefore` validity period in milliseconds since epoch.
   * @return value or {@code null} for none
   */
  public java.lang.Long getValidFrom() {
    return validFrom;
  }

  /**
   * X.509 `notBefore` validity period in milliseconds since epoch.
   * @param validFrom validFrom or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setValidFrom(java.lang.Long validFrom) {
    this.validFrom = validFrom;
    return this;
  }

  /**
   * X.509 version.
   * @return value or {@code null} for none
   */
  public java.lang.Integer getVersion() {
    return version;
  }

  /**
   * X.509 version.
   * @param version version or {@code null} for none
   */
  public GoogleCloudApigeeV1CertInfo setVersion(java.lang.Integer version) {
    this.version = version;
    return this;
  }

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

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

}
