<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/certificatemanager/v1/certificate_manager.proto

namespace Google\Cloud\CertificateManager\V1\Certificate;

use Google\Protobuf\Internal\GPBType;
use Google\Protobuf\Internal\RepeatedField;
use Google\Protobuf\Internal\GPBUtil;

/**
 * Certificate data for a SelfManaged Certificate.
 * SelfManaged Certificates are uploaded by the user. Updating such
 * certificates before they expire remains the user's responsibility.
 *
 * Generated from protobuf message <code>google.cloud.certificatemanager.v1.Certificate.SelfManagedCertificate</code>
 */
class SelfManagedCertificate extends \Google\Protobuf\Internal\Message
{
    /**
     * Input only. The PEM-encoded certificate chain.
     * Leaf certificate comes first, followed by intermediate ones if any.
     *
     * Generated from protobuf field <code>string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $pem_certificate = '';
    /**
     * Input only. The PEM-encoded private key of the leaf certificate.
     *
     * Generated from protobuf field <code>string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     */
    private $pem_private_key = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $pem_certificate
     *           Input only. The PEM-encoded certificate chain.
     *           Leaf certificate comes first, followed by intermediate ones if any.
     *     @type string $pem_private_key
     *           Input only. The PEM-encoded private key of the leaf certificate.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateManager::initOnce();
        parent::__construct($data);
    }

    /**
     * Input only. The PEM-encoded certificate chain.
     * Leaf certificate comes first, followed by intermediate ones if any.
     *
     * Generated from protobuf field <code>string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getPemCertificate()
    {
        return $this->pem_certificate;
    }

    /**
     * Input only. The PEM-encoded certificate chain.
     * Leaf certificate comes first, followed by intermediate ones if any.
     *
     * Generated from protobuf field <code>string pem_certificate = 1 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPemCertificate($var)
    {
        GPBUtil::checkString($var, True);
        $this->pem_certificate = $var;

        return $this;
    }

    /**
     * Input only. The PEM-encoded private key of the leaf certificate.
     *
     * Generated from protobuf field <code>string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @return string
     */
    public function getPemPrivateKey()
    {
        return $this->pem_private_key;
    }

    /**
     * Input only. The PEM-encoded private key of the leaf certificate.
     *
     * Generated from protobuf field <code>string pem_private_key = 2 [(.google.api.field_behavior) = INPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPemPrivateKey($var)
    {
        GPBUtil::checkString($var, True);
        $this->pem_private_key = $var;

        return $this;
    }

}


