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

namespace Google\Cloud\Container\V1\ContainerdConfig;

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

/**
 * PrivateRegistryAccessConfig contains access configuration for
 * private container registries.
 *
 * Generated from protobuf message <code>google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig</code>
 */
class PrivateRegistryAccessConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Private registry access is enabled.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     */
    protected $enabled = false;
    /**
     * Private registry access configuration.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2;</code>
     */
    private $certificate_authority_domain_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $enabled
     *           Private registry access is enabled.
     *     @type array<\Google\Cloud\Container\V1\ContainerdConfig\PrivateRegistryAccessConfig\CertificateAuthorityDomainConfig>|\Google\Protobuf\Internal\RepeatedField $certificate_authority_domain_config
     *           Private registry access configuration.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Private registry access is enabled.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @return bool
     */
    public function getEnabled()
    {
        return $this->enabled;
    }

    /**
     * Private registry access is enabled.
     *
     * Generated from protobuf field <code>bool enabled = 1;</code>
     * @param bool $var
     * @return $this
     */
    public function setEnabled($var)
    {
        GPBUtil::checkBool($var);
        $this->enabled = $var;

        return $this;
    }

    /**
     * Private registry access configuration.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getCertificateAuthorityDomainConfig()
    {
        return $this->certificate_authority_domain_config;
    }

    /**
     * Private registry access configuration.
     *
     * Generated from protobuf field <code>repeated .google.container.v1.ContainerdConfig.PrivateRegistryAccessConfig.CertificateAuthorityDomainConfig certificate_authority_domain_config = 2;</code>
     * @param array<\Google\Cloud\Container\V1\ContainerdConfig\PrivateRegistryAccessConfig\CertificateAuthorityDomainConfig>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setCertificateAuthorityDomainConfig($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Container\V1\ContainerdConfig\PrivateRegistryAccessConfig\CertificateAuthorityDomainConfig::class);
        $this->certificate_authority_domain_config = $arr;

        return $this;
    }

}


