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

namespace Google\Iam\Admin\V1;

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

/**
 * The request to create a new role.
 *
 * Generated from protobuf message <code>google.iam.admin.v1.CreateRoleRequest</code>
 */
class CreateRoleRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The resource name of the parent resource in one of the following formats:
     * `organizations/{ORGANIZATION_ID}`
     * `projects/{PROJECT_ID}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     */
    private $parent = '';
    /**
     * The role id to use for this role.
     *
     * Generated from protobuf field <code>string role_id = 2;</code>
     */
    private $role_id = '';
    /**
     * The Role resource to create.
     *
     * Generated from protobuf field <code>.google.iam.admin.v1.Role role = 3;</code>
     */
    private $role = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $parent
     *           The resource name of the parent resource in one of the following formats:
     *           `organizations/{ORGANIZATION_ID}`
     *           `projects/{PROJECT_ID}`
     *     @type string $role_id
     *           The role id to use for this role.
     *     @type \Google\Iam\Admin\V1\Role $role
     *           The Role resource to create.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Iam\Admin\V1\Iam::initOnce();
        parent::__construct($data);
    }

    /**
     * The resource name of the parent resource in one of the following formats:
     * `organizations/{ORGANIZATION_ID}`
     * `projects/{PROJECT_ID}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @return string
     */
    public function getParent()
    {
        return $this->parent;
    }

    /**
     * The resource name of the parent resource in one of the following formats:
     * `organizations/{ORGANIZATION_ID}`
     * `projects/{PROJECT_ID}`
     *
     * Generated from protobuf field <code>string parent = 1;</code>
     * @param string $var
     * @return $this
     */
    public function setParent($var)
    {
        GPBUtil::checkString($var, True);
        $this->parent = $var;

        return $this;
    }

    /**
     * The role id to use for this role.
     *
     * Generated from protobuf field <code>string role_id = 2;</code>
     * @return string
     */
    public function getRoleId()
    {
        return $this->role_id;
    }

    /**
     * The role id to use for this role.
     *
     * Generated from protobuf field <code>string role_id = 2;</code>
     * @param string $var
     * @return $this
     */
    public function setRoleId($var)
    {
        GPBUtil::checkString($var, True);
        $this->role_id = $var;

        return $this;
    }

    /**
     * The Role resource to create.
     *
     * Generated from protobuf field <code>.google.iam.admin.v1.Role role = 3;</code>
     * @return \Google\Iam\Admin\V1\Role
     */
    public function getRole()
    {
        return $this->role;
    }

    /**
     * The Role resource to create.
     *
     * Generated from protobuf field <code>.google.iam.admin.v1.Role role = 3;</code>
     * @param \Google\Iam\Admin\V1\Role $var
     * @return $this
     */
    public function setRole($var)
    {
        GPBUtil::checkMessage($var, \Google\Iam\Admin\V1\Role::class);
        $this->role = $var;

        return $this;
    }

}

