<?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;

/**
 *
 * Generated from protobuf message <code>google.cloud.compute.v1.InstanceGroupManagersSuspendInstancesRequest</code>
 */
class InstanceGroupManagersSuspendInstancesRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.
     *
     * Generated from protobuf field <code>optional bool force_suspend = 27637480;</code>
     */
    private $force_suspend = null;
    /**
     * The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *
     * Generated from protobuf field <code>repeated string instances = 29097598;</code>
     */
    private $instances;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type bool $force_suspend
     *           If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.
     *     @type array<string>|\Google\Protobuf\Internal\RepeatedField $instances
     *           The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.
     *
     * Generated from protobuf field <code>optional bool force_suspend = 27637480;</code>
     * @return bool
     */
    public function getForceSuspend()
    {
        return isset($this->force_suspend) ? $this->force_suspend : false;
    }

    public function hasForceSuspend()
    {
        return isset($this->force_suspend);
    }

    public function clearForceSuspend()
    {
        unset($this->force_suspend);
    }

    /**
     * If this flag is set to true, the Instance Group Manager will proceed to suspend the instances, skipping initialization on them.
     *
     * Generated from protobuf field <code>optional bool force_suspend = 27637480;</code>
     * @param bool $var
     * @return $this
     */
    public function setForceSuspend($var)
    {
        GPBUtil::checkBool($var);
        $this->force_suspend = $var;

        return $this;
    }

    /**
     * The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *
     * Generated from protobuf field <code>repeated string instances = 29097598;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getInstances()
    {
        return $this->instances;
    }

    /**
     * The URLs of one or more instances to suspend. This can be a full URL or a partial URL, such as zones/[ZONE]/instances/[INSTANCE_NAME].
     *
     * Generated from protobuf field <code>repeated string instances = 29097598;</code>
     * @param array<string>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setInstances($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::STRING);
        $this->instances = $arr;

        return $this;
    }

}

