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

namespace Google\Cloud\DeveloperConnect\V1;

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

/**
 * User represents a user connected to the service providers through
 * a AccountConnector.
 *
 * Generated from protobuf message <code>google.cloud.developerconnect.v1.User</code>
 */
class User extends \Google\Protobuf\Internal\Message
{
    /**
     * Identifier. Resource name of the user, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;accountConnectors/&#42;&#47;users/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     */
    protected $name = '';
    /**
     * Output only. Developer Connect automatically converts user identity
     * to some human readable description, e.g., email address.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $display_name = '';
    /**
     * Output only. The timestamp when the user was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $create_time = null;
    /**
     * Output only. The timestamp when the token was last requested.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    protected $last_token_request_time = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Identifier. Resource name of the user, in the format
     *           `projects/&#42;&#47;locations/&#42;&#47;accountConnectors/&#42;&#47;users/&#42;`.
     *     @type string $display_name
     *           Output only. Developer Connect automatically converts user identity
     *           to some human readable description, e.g., email address.
     *     @type \Google\Protobuf\Timestamp $create_time
     *           Output only. The timestamp when the user was created.
     *     @type \Google\Protobuf\Timestamp $last_token_request_time
     *           Output only. The timestamp when the token was last requested.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Developerconnect\V1\DeveloperConnect::initOnce();
        parent::__construct($data);
    }

    /**
     * Identifier. Resource name of the user, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;accountConnectors/&#42;&#47;users/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Identifier. Resource name of the user, in the format
     * `projects/&#42;&#47;locations/&#42;&#47;accountConnectors/&#42;&#47;users/&#42;`.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = IDENTIFIER];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

    /**
     * Output only. Developer Connect automatically converts user identity
     * to some human readable description, e.g., email address.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getDisplayName()
    {
        return $this->display_name;
    }

    /**
     * Output only. Developer Connect automatically converts user identity
     * to some human readable description, e.g., email address.
     *
     * Generated from protobuf field <code>string display_name = 2 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setDisplayName($var)
    {
        GPBUtil::checkString($var, True);
        $this->display_name = $var;

        return $this;
    }

    /**
     * Output only. The timestamp when the user was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getCreateTime()
    {
        return $this->create_time;
    }

    public function hasCreateTime()
    {
        return isset($this->create_time);
    }

    public function clearCreateTime()
    {
        unset($this->create_time);
    }

    /**
     * Output only. The timestamp when the user was created.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp create_time = 3 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setCreateTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->create_time = $var;

        return $this;
    }

    /**
     * Output only. The timestamp when the token was last requested.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return \Google\Protobuf\Timestamp|null
     */
    public function getLastTokenRequestTime()
    {
        return $this->last_token_request_time;
    }

    public function hasLastTokenRequestTime()
    {
        return isset($this->last_token_request_time);
    }

    public function clearLastTokenRequestTime()
    {
        unset($this->last_token_request_time);
    }

    /**
     * Output only. The timestamp when the token was last requested.
     *
     * Generated from protobuf field <code>.google.protobuf.Timestamp last_token_request_time = 4 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param \Google\Protobuf\Timestamp $var
     * @return $this
     */
    public function setLastTokenRequestTime($var)
    {
        GPBUtil::checkMessage($var, \Google\Protobuf\Timestamp::class);
        $this->last_token_request_time = $var;

        return $this;
    }

}

