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

namespace Google\Cloud\Dataplex\V1;

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

/**
 * Creates a new GlossaryCategory under the specified Glossary.
 *
 * Generated from protobuf message <code>google.cloud.dataplex.v1.CreateGlossaryCategoryRequest</code>
 */
class CreateGlossaryCategoryRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource where this GlossaryCategory will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     * where `locationId` refers to a Google Cloud region.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    protected $parent = '';
    /**
     * Required. GlossaryCategory identifier.
     *
     * Generated from protobuf field <code>string category_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $category_id = '';
    /**
     * Required. The GlossaryCategory to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryCategory category = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    protected $category = null;

    /**
     * @param string                                     $parent     Required. The parent resource where this GlossaryCategory will be created.
     *                                                               Format:
     *                                                               projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     *                                                               where `locationId` refers to a Google Cloud region. Please see
     *                                                               {@see BusinessGlossaryServiceClient::glossaryName()} for help formatting this field.
     * @param \Google\Cloud\Dataplex\V1\GlossaryCategory $category   Required. The GlossaryCategory to create.
     * @param string                                     $categoryId Required. GlossaryCategory identifier.
     *
     * @return \Google\Cloud\Dataplex\V1\CreateGlossaryCategoryRequest
     *
     * @experimental
     */
    public static function build(string $parent, \Google\Cloud\Dataplex\V1\GlossaryCategory $category, string $categoryId): self
    {
        return (new self())
            ->setParent($parent)
            ->setCategory($category)
            ->setCategoryId($categoryId);
    }

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource where this GlossaryCategory will be created.
     *           Format:
     *           projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     *           where `locationId` refers to a Google Cloud region.
     *     @type string $category_id
     *           Required. GlossaryCategory identifier.
     *     @type \Google\Cloud\Dataplex\V1\GlossaryCategory $category
     *           Required. The GlossaryCategory to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dataplex\V1\BusinessGlossary::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource where this GlossaryCategory will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     * where `locationId` refers to a Google Cloud region.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * Required. The parent resource where this GlossaryCategory will be created.
     * Format:
     * projects/{project_id_or_number}/locations/{location_id}/glossaries/{glossary_id}
     * where `locationId` refers to a Google Cloud region.
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * Required. GlossaryCategory identifier.
     *
     * Generated from protobuf field <code>string category_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getCategoryId()
    {
        return $this->category_id;
    }

    /**
     * Required. GlossaryCategory identifier.
     *
     * Generated from protobuf field <code>string category_id = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setCategoryId($var)
    {
        GPBUtil::checkString($var, True);
        $this->category_id = $var;

        return $this;
    }

    /**
     * Required. The GlossaryCategory to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryCategory category = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\Dataplex\V1\GlossaryCategory|null
     */
    public function getCategory()
    {
        return $this->category;
    }

    public function hasCategory()
    {
        return isset($this->category);
    }

    public function clearCategory()
    {
        unset($this->category);
    }

    /**
     * Required. The GlossaryCategory to create.
     *
     * Generated from protobuf field <code>.google.cloud.dataplex.v1.GlossaryCategory category = 3 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\Dataplex\V1\GlossaryCategory $var
     * @return $this
     */
    public function setCategory($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\Dataplex\V1\GlossaryCategory::class);
        $this->category = $var;

        return $this;
    }

}

