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

namespace Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig;

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

/**
 * CertificateConfigPair configures pairs of certificates, which is used for
 * client certificate and key pairs under a registry.
 *
 * Generated from protobuf message <code>google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfigPair</code>
 */
class CertificateConfigPair extends \Google\Protobuf\Internal\Message
{
    /**
     * Cert configures the client certificate.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig cert = 1;</code>
     */
    protected $cert = null;
    /**
     * Key configures the client private key. Optional.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig key = 2;</code>
     */
    protected $key = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig $cert
     *           Cert configures the client certificate.
     *     @type \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig $key
     *           Key configures the client private key. Optional.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Container\V1\ClusterService::initOnce();
        parent::__construct($data);
    }

    /**
     * Cert configures the client certificate.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig cert = 1;</code>
     * @return \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig|null
     */
    public function getCert()
    {
        return $this->cert;
    }

    public function hasCert()
    {
        return isset($this->cert);
    }

    public function clearCert()
    {
        unset($this->cert);
    }

    /**
     * Cert configures the client certificate.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig cert = 1;</code>
     * @param \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig $var
     * @return $this
     */
    public function setCert($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig::class);
        $this->cert = $var;

        return $this;
    }

    /**
     * Key configures the client private key. Optional.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig key = 2;</code>
     * @return \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig|null
     */
    public function getKey()
    {
        return $this->key;
    }

    public function hasKey()
    {
        return isset($this->key);
    }

    public function clearKey()
    {
        unset($this->key);
    }

    /**
     * Key configures the client private key. Optional.
     *
     * Generated from protobuf field <code>.google.container.v1.ContainerdConfig.RegistryHostConfig.CertificateConfig key = 2;</code>
     * @param \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig $var
     * @return $this
     */
    public function setKey($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Container\V1\ContainerdConfig\RegistryHostConfig\CertificateConfig::class);
        $this->key = $var;

        return $this;
    }

}

