<?php
# Generated by the protocol buffer compiler.  DO NOT EDIT!
# source: google/firestore/admin/v1/user_creds.proto

namespace Google\Cloud\Firestore\Admin\V1\UserCreds;

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

/**
 * Describes a Resource Identity principal.
 *
 * Generated from protobuf message <code>google.firestore.admin.v1.UserCreds.ResourceIdentity</code>
 */
class ResourceIdentity extends \Google\Protobuf\Internal\Message
{
    /**
     * Output only. Principal identifier string.
     * See: https://cloud.google.com/iam/docs/principal-identifiers
     *
     * Generated from protobuf field <code>string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     */
    private $principal = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $principal
     *           Output only. Principal identifier string.
     *           See: https://cloud.google.com/iam/docs/principal-identifiers
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Firestore\Admin\V1\UserCreds::initOnce();
        parent::__construct($data);
    }

    /**
     * Output only. Principal identifier string.
     * See: https://cloud.google.com/iam/docs/principal-identifiers
     *
     * Generated from protobuf field <code>string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @return string
     */
    public function getPrincipal()
    {
        return $this->principal;
    }

    /**
     * Output only. Principal identifier string.
     * See: https://cloud.google.com/iam/docs/principal-identifiers
     *
     * Generated from protobuf field <code>string principal = 1 [(.google.api.field_behavior) = OUTPUT_ONLY];</code>
     * @param string $var
     * @return $this
     */
    public function setPrincipal($var)
    {
        GPBUtil::checkString($var, True);
        $this->principal = $var;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(ResourceIdentity::class, \Google\Cloud\Firestore\Admin\V1\UserCreds_ResourceIdentity::class);

