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

namespace Google\Cloud\Iam\V2;

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

/**
 * Request message for `GetPolicy`.
 *
 * Generated from protobuf message <code>google.iam.v2.GetPolicyRequest</code>
 */
class GetPolicyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * Required. The resource name of the policy to retrieve. Format:
     * `policies/{attachment_point}/denypolicies/{policy_id}`
     * Use the URL-encoded full resource name, which means that the forward-slash
     * character, `/`, must be written as `%2F`. For example,
     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
     * For organizations and folders, use the numeric ID in the full resource
     * name. For projects, you can use the alphanumeric or the numeric ID.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     */
    private $name = '';

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $name
     *           Required. The resource name of the policy to retrieve. Format:
     *           `policies/{attachment_point}/denypolicies/{policy_id}`
     *           Use the URL-encoded full resource name, which means that the forward-slash
     *           character, `/`, must be written as `%2F`. For example,
     *           `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
     *           For organizations and folders, use the numeric ID in the full resource
     *           name. For projects, you can use the alphanumeric or the numeric ID.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Iam\V2\Policy::initOnce();
        parent::__construct($data);
    }

    /**
     * Required. The resource name of the policy to retrieve. Format:
     * `policies/{attachment_point}/denypolicies/{policy_id}`
     * Use the URL-encoded full resource name, which means that the forward-slash
     * character, `/`, must be written as `%2F`. For example,
     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
     * For organizations and folders, use the numeric ID in the full resource
     * name. For projects, you can use the alphanumeric or the numeric ID.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @return string
     */
    public function getName()
    {
        return $this->name;
    }

    /**
     * Required. The resource name of the policy to retrieve. Format:
     * `policies/{attachment_point}/denypolicies/{policy_id}`
     * Use the URL-encoded full resource name, which means that the forward-slash
     * character, `/`, must be written as `%2F`. For example,
     * `policies/cloudresourcemanager.googleapis.com%2Fprojects%2Fmy-project/denypolicies/my-policy`.
     * For organizations and folders, use the numeric ID in the full resource
     * name. For projects, you can use the alphanumeric or the numeric ID.
     *
     * Generated from protobuf field <code>string name = 1 [(.google.api.field_behavior) = REQUIRED];</code>
     * @param string $var
     * @return $this
     */
    public function setName($var)
    {
        GPBUtil::checkString($var, True);
        $this->name = $var;

        return $this;
    }

}

