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

namespace Google\Cloud\Retail\V2;

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

/**
 * Response message of
 * [CatalogService.GetDefaultBranch][google.cloud.retail.v2.CatalogService.GetDefaultBranch].
 *
 * Generated from protobuf message <code>google.cloud.retail.v2.GetDefaultBranchResponse</code>
 */
class GetDefaultBranchResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Full resource name of the branch id currently set as default branch.
     *
     * Generated from protobuf field <code>string branch = 1 [(.google.api.resource_reference) = {</code>
     */
    private $branch = '';
    /**
     * The time when this branch is set to default.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp set_time = 2;</code>
     */
    private $set_time = null;
    /**
     * This corresponds to
     * [SetDefaultBranchRequest.note][google.cloud.retail.v2.SetDefaultBranchRequest.note]
     * field, when this branch was set as default.
     *
     * Generated from protobuf field <code>string note = 3;</code>
     */
    private $note = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $branch
     *           Full resource name of the branch id currently set as default branch.
     *     @type \Google\Protobuf\Timestamp $set_time
     *           The time when this branch is set to default.
     *     @type string $note
     *           This corresponds to
     *           [SetDefaultBranchRequest.note][google.cloud.retail.v2.SetDefaultBranchRequest.note]
     *           field, when this branch was set as default.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Retail\V2\CatalogService::initOnce();
        parent::__construct($data);
    }

    /**
     * Full resource name of the branch id currently set as default branch.
     *
     * Generated from protobuf field <code>string branch = 1 [(.google.api.resource_reference) = {</code>
     * @return string
     */
    public function getBranch()
    {
        return $this->branch;
    }

    /**
     * Full resource name of the branch id currently set as default branch.
     *
     * Generated from protobuf field <code>string branch = 1 [(.google.api.resource_reference) = {</code>
     * @param string $var
     * @return $this
     */
    public function setBranch($var)
    {
        GPBUtil::checkString($var, True);
        $this->branch = $var;

        return $this;
    }

    /**
     * The time when this branch is set to default.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp set_time = 2;</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getSetTime()
    {
        return $this->set_time;
    }

    public function hasSetTime()
    {
        return isset($this->set_time);
    }

    public function clearSetTime()
    {
        unset($this->set_time);
    }

    /**
     * The time when this branch is set to default.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp set_time = 2;</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setSetTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->set_time = $var;

        return $this;
    }

    /**
     * This corresponds to
     * [SetDefaultBranchRequest.note][google.cloud.retail.v2.SetDefaultBranchRequest.note]
     * field, when this branch was set as default.
     *
     * Generated from protobuf field <code>string note = 3;</code>
     * @return string
     */
    public function getNote()
    {
        return $this->note;
    }

    /**
     * This corresponds to
     * [SetDefaultBranchRequest.note][google.cloud.retail.v2.SetDefaultBranchRequest.note]
     * field, when this branch was set as default.
     *
     * Generated from protobuf field <code>string note = 3;</code>
     * @param string $var
     * @return $this
     */
    public function setNote($var)
    {
        GPBUtil::checkString($var, True);
        $this->note = $var;

        return $this;
    }

}

