<?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.ResourceStatusScheduling</code>
 */
class ResourceStatusScheduling extends \Google\Protobuf\Internal\Message
{
    /**
     * Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.
     *
     * Generated from protobuf field <code>optional int32 availability_domain = 252514344;</code>
     */
    protected $availability_domain = null;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $availability_domain
     *           Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.
     *
     * Generated from protobuf field <code>optional int32 availability_domain = 252514344;</code>
     * @return int
     */
    public function getAvailabilityDomain()
    {
        return isset($this->availability_domain) ? $this->availability_domain : 0;
    }

    public function hasAvailabilityDomain()
    {
        return isset($this->availability_domain);
    }

    public function clearAvailabilityDomain()
    {
        unset($this->availability_domain);
    }

    /**
     * Specifies the availability domain to place the instance in. The value must be a number between 1 and the number of availability domains specified in the spread placement policy attached to the instance.
     *
     * Generated from protobuf field <code>optional int32 availability_domain = 252514344;</code>
     * @param int $var
     * @return $this
     */
    public function setAvailabilityDomain($var)
    {
        GPBUtil::checkInt32($var);
        $this->availability_domain = $var;

        return $this;
    }

}

