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

namespace Google\Cloud\Memorystore\V1beta\CertificateAuthority\ManagedCertificateAuthority;

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

/**
 * A certificate chain.
 *
 * Generated from protobuf message <code>google.cloud.memorystore.v1beta.CertificateAuthority.ManagedCertificateAuthority.CertChain</code>
 */
class CertChain extends \Google\Protobuf\Internal\Message
{
    /**
     * The certificates that form the CA chain in order of leaf to root.
     *
     * Generated from protobuf field <code>repeated string certificates = 1;</code>
     */
    private $certificates;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $certificates
     *           The certificates that form the CA chain in order of leaf to root.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Memorystore\V1Beta\Memorystore::initOnce();
        parent::__construct($data);
    }

    /**
     * The certificates that form the CA chain in order of leaf to root.
     *
     * Generated from protobuf field <code>repeated string certificates = 1;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCertificates()
    {
        return $this->certificates;
    }

    /**
     * The certificates that form the CA chain in order of leaf to root.
     *
     * Generated from protobuf field <code>repeated string certificates = 1;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCertificates($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->certificates = $arr;

        return $this;
    }

}


