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

namespace Google\Cloud\ContactCenterInsights\V1;

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

/**
 * Request to create a phrase matcher.
 *
 * Generated from protobuf message <code>google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest</code>
 */
class CreatePhraseMatcherRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The parent resource of the phrase matcher. Required. The location to create
     * a phrase matcher for.
     * Format: `projects/<Project ID>/locations/<Location ID>` or
     * `projects/<Project Number>/locations/<Location ID>`
     *
     * Generated from protobuf field <code>string parent = 1 [(.google.api.field_behavior) = REQUIRED, (.google.api.resource_reference) = {</code>
     */
    private $parent = '';
    /**
     * Required. The phrase matcher resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $phrase_matcher = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           Required. The parent resource of the phrase matcher. Required. The location to create
     *           a phrase matcher for.
     *           Format: `projects/<Project ID>/locations/<Location ID>` or
     *           `projects/<Project Number>/locations/<Location ID>`
     *     @type \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $phrase_matcher
     *           Required. The phrase matcher resource to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Contactcenterinsights\V1\ContactCenterInsights::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The parent resource of the phrase matcher. Required. The location to create
     * a phrase matcher for.
     * Format: `projects/<Project ID>/locations/<Location ID>` or
     * `projects/<Project Number>/locations/<Location ID>`
     *
     * 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 of the phrase matcher. Required. The location to create
     * a phrase matcher for.
     * Format: `projects/<Project ID>/locations/<Location ID>` or
     * `projects/<Project Number>/locations/<Location ID>`
     *
     * 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. The phrase matcher resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher|null
     */
    public function getPhraseMatcher()
    {
        return $this->phrase_matcher;
    }

    public function hasPhraseMatcher()
    {
        return isset($this->phrase_matcher);
    }

    public function clearPhraseMatcher()
    {
        unset($this->phrase_matcher);
    }

    /**
     * Required. The phrase matcher resource to create.
     *
     * Generated from protobuf field <code>.google.cloud.contactcenterinsights.v1.PhraseMatcher phrase_matcher = 2 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher $var
     * @return $this
     */
    public function setPhraseMatcher($var)
    {
        GPBUtil::checkMessage($var, \Google\Cloud\ContactCenterInsights\V1\PhraseMatcher::class);
        $this->phrase_matcher = $var;

        return $this;
    }

}

