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

namespace Google\Cloud\AuditManager\V1;

use UnexpectedValueException;

/**
 * The different execution states of the Audit Manager service.
 *
 * Protobuf type <code>google.cloud.auditmanager.v1.OperationState</code>
 */
class OperationState
{
    /**
     * Unspecified. Invalid state.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_UNSPECIFIED = 0;</code>
     */
    const OPERATION_STATE_UNSPECIFIED = 0;
    /**
     * Audit report generation process has not started.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_NOT_STARTED = 10;</code>
     */
    const OPERATION_STATE_NOT_STARTED = 10;
    /**
     * Audit Manager is currently evaluating the workloads against specific
     * standard.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_EVALUATION_IN_PROGRESS = 20;</code>
     */
    const OPERATION_STATE_EVALUATION_IN_PROGRESS = 20;
    /**
     * Audit Manager has completed Evaluation for the workload.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_EVALUATION_DONE = 21;</code>
     */
    const OPERATION_STATE_EVALUATION_DONE = 21;
    /**
     * Audit Manager is creating audit report from the evaluated data.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30;</code>
     */
    const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS = 30;
    /**
     * Audit Manager has completed generation of the audit report.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31;</code>
     */
    const OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE = 31;
    /**
     * Audit Manager is uploading the audit report and evidences to the customer
     * provided destination.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40;</code>
     */
    const OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS = 40;
    /**
     * Audit report generation process is completed.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_DONE = 50;</code>
     */
    const OPERATION_STATE_DONE = 50;
    /**
     * Audit report generation process has failed.
     *
     * Generated from protobuf enum <code>OPERATION_STATE_FAILED = 60;</code>
     */
    const OPERATION_STATE_FAILED = 60;

    private static $valueToName = [
        self::OPERATION_STATE_UNSPECIFIED => 'OPERATION_STATE_UNSPECIFIED',
        self::OPERATION_STATE_NOT_STARTED => 'OPERATION_STATE_NOT_STARTED',
        self::OPERATION_STATE_EVALUATION_IN_PROGRESS => 'OPERATION_STATE_EVALUATION_IN_PROGRESS',
        self::OPERATION_STATE_EVALUATION_DONE => 'OPERATION_STATE_EVALUATION_DONE',
        self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_IN_PROGRESS',
        self::OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE => 'OPERATION_STATE_EVIDENCE_REPORT_GENERATION_DONE',
        self::OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS => 'OPERATION_STATE_EVIDENCE_UPLOAD_IN_PROGRESS',
        self::OPERATION_STATE_DONE => 'OPERATION_STATE_DONE',
        self::OPERATION_STATE_FAILED => 'OPERATION_STATE_FAILED',
    ];

    public static function name($value)
    {
        if (!isset(self::$valueToName[$value])) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no name defined for value %s', __CLASS__, $value));
        }
        return self::$valueToName[$value];
    }


    public static function value($name)
    {
        $const = __CLASS__ . '::' . strtoupper($name);
        if (!defined($const)) {
            throw new UnexpectedValueException(sprintf(
                    'Enum %s has no value defined for name %s', __CLASS__, $name));
        }
        return constant($const);
    }
}

