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

namespace Google\Cloud\ApiHub\V1;

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

/**
 * The curation information for this plugin instance.
 *
 * Generated from protobuf message <code>google.cloud.apihub.v1.CurationConfig</code>
 */
class CurationConfig extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The curation type for this plugin instance.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $curation_type = 0;
    protected $curation_config;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type \Google\Cloud\ApiHub\V1\CurationConfig\CustomCuration $custom_curation
     *           Optional. Custom curation information for this plugin instance.
     *     @type int $curation_type
     *           Required. The curation type for this plugin instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Apihub\V1\PluginService::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. Custom curation information for this plugin instance.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return \Google\Cloud\ApiHub\V1\CurationConfig\CustomCuration|null
     */
    public function getCustomCuration()
    {
        return $this->readOneof(2);
    }

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

    /**
     * Optional. Custom curation information for this plugin instance.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.CurationConfig.CustomCuration custom_curation = 2 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param \Google\Cloud\ApiHub\V1\CurationConfig\CustomCuration $var
     * @return $this
     */
    public function setCustomCuration($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ApiHub\V1\CurationConfig\CustomCuration::class);
        $this->writeOneof(2, $var);

        return $this;
    }

    /**
     * Required. The curation type for this plugin instance.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return int
     */
    public function getCurationType()
    {
        return $this->curation_type;
    }

    /**
     * Required. The curation type for this plugin instance.
     *
     * Generated from protobuf field <code>.google.cloud.apihub.v1.CurationType curation_type = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param int $var
     * @return $this
     */
    public function setCurationType($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\ApiHub\V1\CurationType::class);
        $this->curation_type = $var;

        return $this;
    }

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

}

