<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/cloud/dialogflow/v2/participant.proto

namespace Google\Cloud\Dialogflow\V2;

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

/**
 * Represents a conversation participant (human agent, virtual agent, end-user).
 *
 * Generated from protobuf message <code>google.cloud.dialogflow.v2.Participant</code>
 */
class Participant extends \Google\Protobuf\Internal\Message
{
    /**
     * Optional. The unique identifier of this participant.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $name = '';
    /**
     * Immutable. The role this participant plays in the conversation. This field must be set
     * during participant creation and is then immutable.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     */
    private $role = 0;
    /**
     * Optional. Label applied to streams representing this participant in SIPREC
     * XML metadata and SDP. This is used to assign transcriptions from that
     * media stream to this participant. This field can be updated.
     *
     * Generated from protobuf field <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     */
    private $sip_recording_media_label = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Optional. The unique identifier of this participant.
     *           Format: `projects/<Project ID>/locations/<Location
     *           ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
     *     @type int $role
     *           Immutable. The role this participant plays in the conversation. This field must be set
     *           during participant creation and is then immutable.
     *     @type string $sip_recording_media_label
     *           Optional. Label applied to streams representing this participant in SIPREC
     *           XML metadata and SDP. This is used to assign transcriptions from that
     *           media stream to this participant. This field can be updated.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Dialogflow\V2\Participant::initOnce();
        parent::__construct($data);
    }

    /**
     * Optional. The unique identifier of this participant.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Optional. The unique identifier of this participant.
     * Format: `projects/<Project ID>/locations/<Location
     * ID>/conversations/<Conversation ID>/participants/<Participant ID>`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Immutable. The role this participant plays in the conversation. This field must be set
     * during participant creation and is then immutable.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @return int
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * Immutable. The role this participant plays in the conversation. This field must be set
     * during participant creation and is then immutable.
     *
     * Generated from protobuf field <code>.google.cloud.dialogflow.v2.Participant.Role role = 2 [(.google.api.field_behavior) = IMMUTABLE];</code>
     * @param int $var
     * @return $this
     */
    public function setRole($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\Dialogflow\V2\Participant\Role::class);
        $this->role = $var;

        return $this;
    }

    /**
     * Optional. Label applied to streams representing this participant in SIPREC
     * XML metadata and SDP. This is used to assign transcriptions from that
     * media stream to this participant. This field can be updated.
     *
     * Generated from protobuf field <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @return string
     */
    public function getSipRecordingMediaLabel()
    {
        return $this->sip_recording_media_label;
    }

    /**
     * Optional. Label applied to streams representing this participant in SIPREC
     * XML metadata and SDP. This is used to assign transcriptions from that
     * media stream to this participant. This field can be updated.
     *
     * Generated from protobuf field <code>string sip_recording_media_label = 6 [(.google.api.field_behavior) = OPTIONAL];</code>
     * @param string $var
     * @return $this
     */
    public function setSipRecordingMediaLabel($var)
    {
        GPBUtil::checkString($var, True);
        $this->sip_recording_media_label = $var;

        return $this;
    }

}

