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

namespace Google\Cloud\AlloyDb\V1;

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

/**
 * Message returned by a GenerateClientCertificate operation.
 *
 * Generated from protobuf message <code>google.cloud.alloydb.v1.GenerateClientCertificateResponse</code>
 */
class GenerateClientCertificateResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. The pem-encoded chain that may be used to verify the X.509
     * certificate. Expected to be in issuer-to-root order according to RFC 5246.
     *
     * Generated from protobuf field <code>repeated string pem_certificate_chain = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $pem_certificate_chain;
    /**
     * Optional. The pem-encoded cluster ca X.509 certificate.
     *
     * Generated from protobuf field <code>string ca_cert = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    protected $ca_cert = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $pem_certificate_chain
     *           Output only. The pem-encoded chain that may be used to verify the X.509
     *           certificate. Expected to be in issuer-to-root order according to RFC 5246.
     *     @type string $ca_cert
     *           Optional. The pem-encoded cluster ca X.509 certificate.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Alloydb\V1\Service::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. The pem-encoded chain that may be used to verify the X.509
     * certificate. Expected to be in issuer-to-root order according to RFC 5246.
     *
     * Generated from protobuf field <code>repeated string pem_certificate_chain = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getPemCertificateChain()
    {
        return $this->pem_certificate_chain;
    }

    /**
     * Output only. The pem-encoded chain that may be used to verify the X.509
     * certificate. Expected to be in issuer-to-root order according to RFC 5246.
     *
     * Generated from protobuf field <code>repeated string pem_certificate_chain = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setPemCertificateChain($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->pem_certificate_chain = $arr;

        return $this;
    }

    /**
     * Optional. The pem-encoded cluster ca X.509 certificate.
     *
     * Generated from protobuf field <code>string ca_cert = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getCaCert()
    {
        return $this->ca_cert;
    }

    /**
     * Optional. The pem-encoded cluster ca X.509 certificate.
     *
     * Generated from protobuf field <code>string ca_cert = 3 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setCaCert($var)
    {
        GPBUtil::checkString($var, True);
        $this->ca_cert = $var;

        return $this;
    }

}

