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

namespace Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig;

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

/**
 * The CA that issues the workload certificate. It includes CA address, type,
 * authentication to CA service, etc.
 *
 * Generated from protobuf message <code>google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig</code>
 */
class CertificateAuthorityConfig extends \Google\Protobuf\Internal\Message
{
    protected $kind;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $certificate_authority_service_config
     *           Defines a CertificateAuthorityServiceConfig.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Certificatemanager\V1\CertificateIssuanceConfig::initOnce();
        parent::__construct($data);
    }

    /**
     * Defines a CertificateAuthorityServiceConfig.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1;</code>
     * @return \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig|null
     */
    public function getCertificateAuthorityServiceConfig()
    {
        return $this->readOneof(1);
    }

    public function hasCertificateAuthorityServiceConfig()
    {
        return $this->hasOneof(1);
    }

    /**
     * Defines a CertificateAuthorityServiceConfig.
     *
     * Generated from protobuf field <code>.google.cloud.certificatemanager.v1.CertificateIssuanceConfig.CertificateAuthorityConfig.CertificateAuthorityServiceConfig certificate_authority_service_config = 1;</code>
     * @param \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig $var
     * @return $this
     */
    public function setCertificateAuthorityServiceConfig($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\CertificateManager\V1\CertificateIssuanceConfig\CertificateAuthorityConfig\CertificateAuthorityServiceConfig::class);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * @return string
     */
    public function getKind()
    {
        return $this->whichOneof("kind");
    }

}


