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

namespace Google\Cloud\AssuredWorkloads\V1beta1\Workload;

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

/**
 * Signed Access Approvals (SAA) enrollment response.
 *
 * Generated from protobuf message <code>google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse</code>
 */
class SaaEnrollmentResponse extends \Google\Protobuf\Internal\Message
{
    /**
     * Indicates SAA enrollment status of a given workload.
     *
     * Generated from protobuf field <code>optional .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;</code>
     */
    private $setup_status = null;
    /**
     * Indicates SAA enrollment setup error if any.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;</code>
     */
    private $setup_errors;

    /**
     * Constructor.
     *
     * @param array $data {
     *     Optional. Data for populating the Message object.
     *
     *     @type int $setup_status
     *           Indicates SAA enrollment status of a given workload.
     *     @type int[]|\Google\Protobuf\Internal\RepeatedField $setup_errors
     *           Indicates SAA enrollment setup error if any.
     * }
     */
    public function __construct($data = NULL) {
        \GPBMetadata\Google\Cloud\Assuredworkloads\V1Beta1\AssuredworkloadsV1Beta1::initOnce();
        parent::__construct($data);
    }

    /**
     * Indicates SAA enrollment status of a given workload.
     *
     * Generated from protobuf field <code>optional .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;</code>
     * @return int
     */
    public function getSetupStatus()
    {
        return isset($this->setup_status) ? $this->setup_status : 0;
    }

    public function hasSetupStatus()
    {
        return isset($this->setup_status);
    }

    public function clearSetupStatus()
    {
        unset($this->setup_status);
    }

    /**
     * Indicates SAA enrollment status of a given workload.
     *
     * Generated from protobuf field <code>optional .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupState setup_status = 1;</code>
     * @param int $var
     * @return $this
     */
    public function setSetupStatus($var)
    {
        GPBUtil::checkEnum($var, \Google\Cloud\AssuredWorkloads\V1beta1\Workload\SaaEnrollmentResponse\SetupState::class);
        $this->setup_status = $var;

        return $this;
    }

    /**
     * Indicates SAA enrollment setup error if any.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;</code>
     * @return \Google\Protobuf\Internal\RepeatedField
     */
    public function getSetupErrors()
    {
        return $this->setup_errors;
    }

    /**
     * Indicates SAA enrollment setup error if any.
     *
     * Generated from protobuf field <code>repeated .google.cloud.assuredworkloads.v1beta1.Workload.SaaEnrollmentResponse.SetupError setup_errors = 2;</code>
     * @param int[]|\Google\Protobuf\Internal\RepeatedField $var
     * @return $this
     */
    public function setSetupErrors($var)
    {
        $arr = GPBUtil::checkRepeatedField($var, \Google\Protobuf\Internal\GPBType::ENUM, \Google\Cloud\AssuredWorkloads\V1beta1\Workload\SaaEnrollmentResponse\SetupError::class);
        $this->setup_errors = $arr;

        return $this;
    }

}

// Adding a class alias for backwards compatibility with the previous class name.
class_alias(SaaEnrollmentResponse::class, \Google\Cloud\AssuredWorkloads\V1beta1\Workload_SaaEnrollmentResponse::class);

