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

namespace Google\Cloud\ManagedKafka\V1;

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

/**
 * Sources of CA certificates to install in the broker's truststore.
 *
 * Generated from protobuf message <code>google.cloud.managedkafka.v1.TrustConfig</code>
 */
class TrustConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. Configuration for the Google Certificate Authority Service.
     * Maximum 10.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.TrustConfig.CertificateAuthorityServiceConfig cas_configs = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $cas_configs;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type array<\Google\Cloud\ManagedKafka\V1\TrustConfig\CertificateAuthorityServiceConfig>|\Google\Protobuf\Internal\RepeatedField $cas_configs
     *           Optional. Configuration for the Google Certificate Authority Service.
     *           Maximum 10.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Managedkafka\V1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Configuration for the Google Certificate Authority Service.
     * Maximum 10.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.TrustConfig.CertificateAuthorityServiceConfig cas_configs = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCasConfigs()
    {
        return $this->cas_configs;
    }

    /**
     * Optional. Configuration for the Google Certificate Authority Service.
     * Maximum 10.
     *
     * Generated from protobuf field <code>repeated .google.cloud.managedkafka.v1.TrustConfig.CertificateAuthorityServiceConfig cas_configs = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param array<\Google\Cloud\ManagedKafka\V1\TrustConfig\CertificateAuthorityServiceConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCasConfigs($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\ManagedKafka\V1\TrustConfig\CertificateAuthorityServiceConfig::class);
        $this->cas_configs = $arr;

        return $this;
    }

}

