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

namespace Google\Cloud\Compute\V1;

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

/**
 * A transient resource used in compute.disks.stopGroupAsyncReplication and compute.regionDisks.stopGroupAsyncReplication. It is only used to process requests and is not persisted.
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.DisksStopGroupAsyncReplicationResource</code>
 */
class DisksStopGroupAsyncReplicationResource extends \Google\Protobuf\Internal\Message
{
    /**
     * The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full or partial URL, such as: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy 
     *
     * Generated from protobuf field <code>optional string resource_policy = 159240835;</code>
     */
    private $resource_policy = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $resource_policy
     *           The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full or partial URL, such as: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy 
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full or partial URL, such as: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy 
     *
     * Generated from protobuf field <code>optional string resource_policy = 159240835;</code>
     * @return string
     */
    public function getResourcePolicy()
    {
        return isset($this->resource_policy) ? $this->resource_policy : '';
    }

    public function hasResourcePolicy()
    {
        return isset($this->resource_policy);
    }

    public function clearResourcePolicy()
    {
        unset($this->resource_policy);
    }

    /**
     * The URL of the DiskConsistencyGroupPolicy for the group of disks to stop. This may be a full or partial URL, such as: - https://www.googleapis.com/compute/v1/projects/project/regions/region /resourcePolicies/resourcePolicy - projects/project/regions/region/resourcePolicies/resourcePolicy - regions/region/resourcePolicies/resourcePolicy 
     *
     * Generated from protobuf field <code>optional string resource_policy = 159240835;</code>
     * @param string $var
     * @return $this
     */
    public function setResourcePolicy($var)
    {
        GPBUtil::checkString($var, True);
        $this->resource_policy = $var;

        return $this;
    }

}

