<?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.ReservationSubBlocksReportFaultyRequest</code>
 */
class ReservationSubBlocksReportFaultyRequest extends \Google\Protobuf\Internal\Message
{
    /**
     * The disruption schedule for the subBlock.
     * Check the DisruptionSchedule enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string disruption_schedule = 95871619;</code>
     */
    protected $disruption_schedule = null;
    /**
     * The component that experienced the fault.
     * Check the FailureComponent enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string failure_component = 25912456;</code>
     */
    protected $failure_component = null;
    /**
     * The reasons for the fault experienced with the subBlock.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationSubBlocksReportFaultyRequestFaultReason fault_reasons = 168056210;</code>
     */
    private $fault_reasons;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type string $disruption_schedule
     *           The disruption schedule for the subBlock.
     *           Check the DisruptionSchedule enum for the list of possible values.
     *     @type string $failure_component
     *           The component that experienced the fault.
     *           Check the FailureComponent enum for the list of possible values.
     *     @type array<\Google\Cloud\Compute\V1\ReservationSubBlocksReportFaultyRequestFaultReason>|\Google\Protobuf\Internal\RepeatedField $fault_reasons
     *           The reasons for the fault experienced with the subBlock.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Compute\V1\Compute::initOnce();
        parent::__construct($data);
    }

    /**
     * The disruption schedule for the subBlock.
     * Check the DisruptionSchedule enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string disruption_schedule = 95871619;</code>
     * @return string
     */
    public function getDisruptionSchedule()
    {
        return isset($this->disruption_schedule) ? $this->disruption_schedule : '';
    }

    public function hasDisruptionSchedule()
    {
        return isset($this->disruption_schedule);
    }

    public function clearDisruptionSchedule()
    {
        unset($this->disruption_schedule);
    }

    /**
     * The disruption schedule for the subBlock.
     * Check the DisruptionSchedule enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string disruption_schedule = 95871619;</code>
     * @param string $var
     * @return $this
     */
    public function setDisruptionSchedule($var)
    {
        GPBUtil::checkString($var, True);
        $this->disruption_schedule = $var;

        return $this;
    }

    /**
     * The component that experienced the fault.
     * Check the FailureComponent enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string failure_component = 25912456;</code>
     * @return string
     */
    public function getFailureComponent()
    {
        return isset($this->failure_component) ? $this->failure_component : '';
    }

    public function hasFailureComponent()
    {
        return isset($this->failure_component);
    }

    public function clearFailureComponent()
    {
        unset($this->failure_component);
    }

    /**
     * The component that experienced the fault.
     * Check the FailureComponent enum for the list of possible values.
     *
     * Generated from protobuf field <code>optional string failure_component = 25912456;</code>
     * @param string $var
     * @return $this
     */
    public function setFailureComponent($var)
    {
        GPBUtil::checkString($var, True);
        $this->failure_component = $var;

        return $this;
    }

    /**
     * The reasons for the fault experienced with the subBlock.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationSubBlocksReportFaultyRequestFaultReason fault_reasons = 168056210;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getFaultReasons()
    {
        return $this->fault_reasons;
    }

    /**
     * The reasons for the fault experienced with the subBlock.
     *
     * Generated from protobuf field <code>repeated .google.cloud.compute.v1.ReservationSubBlocksReportFaultyRequestFaultReason fault_reasons = 168056210;</code>
     * @param array<\Google\Cloud\Compute\V1\ReservationSubBlocksReportFaultyRequestFaultReason>|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setFaultReasons($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::MESSAGE, \Google\Cloud\Compute\V1\ReservationSubBlocksReportFaultyRequestFaultReason::class);
        $this->fault_reasons = $arr;

        return $this;
    }

}

