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

namespace Google\Cloud\Security\PrivateCA\V1beta1;

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

/**
 * A [ReusableConfigWrapper][google.cloud.security.privateca.v1beta1.ReusableConfigWrapper] describes values that may assist in creating an
 * X.509 certificate, or a reference to a pre-defined set of values.
 *
 * Generated from protobuf message <code>google.cloud.security.privateca.v1beta1.ReusableConfigWrapper</code>
 */
class ReusableConfigWrapper extends \Google\Protobuf\Internal\Message
{
    protected $config_values;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $reusable_config
     *           Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
     *           `projects/&#42;&#47;locations/&#42;&#47;reusableConfigs/&#42;`.
     *     @type \Google\Cloud\Security\PrivateCA\V1beta1\ReusableConfigValues $reusable_config_values
     *           Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Security\Privateca\V1Beta1\Resources::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;reusableConfigs/&#42;`.
     *
     * Generated from protobuf field <code>string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getReusableConfig()
    {
        return $this->readOneof(1);
    }

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

    /**
     * Required. A resource path to a [ReusableConfig][google.cloud.security.privateca.v1beta1.ReusableConfig] in the format
     * `projects/&#42;&#47;locations/&#42;&#47;reusableConfigs/&#42;`.
     *
     * Generated from protobuf field <code>string reusable_config = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setReusableConfig($var)
    {
        GPBUtil::checkString($var, True);
        $this->writeOneof(1, $var);

        return $this;
    }

    /**
     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
     *
     * Generated from protobuf field <code>.google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Security\PrivateCA\V1beta1\ReusableConfigValues|null
     */
    public function getReusableConfigValues()
    {
        return $this->readOneof(2);
    }

    public function hasReusableConfigValues()
    {
        return $this->hasOneof(2);
    }

    /**
     * Required. A user-specified inline [ReusableConfigValues][google.cloud.security.privateca.v1beta1.ReusableConfigValues].
     *
     * Generated from protobuf field <code>.google.cloud.security.privateca.v1beta1.ReusableConfigValues reusable_config_values = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Security\PrivateCA\V1beta1\ReusableConfigValues $var
     * @return $this
     */
    public function setReusableConfigValues($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Security\PrivateCA\V1beta1\ReusableConfigValues::class);
        $this->writeOneof(2, $var);

        return $this;
    }

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

}

