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

namespace Google\Cloud\CloudControlsPartner\V1beta\PartnerPermissions;

use UnexpectedValueException;

/**
 * Protobuf type <code>google.cloud.cloudcontrolspartner.v1beta.PartnerPermissions.Permission</code>
 */
class Permission
{
    /**
     * Unspecified partner permission
     *
     * Generated from protobuf enum <code>PERMISSION_UNSPECIFIED = 0;</code>
     */
    const PERMISSION_UNSPECIFIED = 0;
    /**
     * Permission for Access Transparency and emergency logs
     *
     * Generated from protobuf enum <code>ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1;</code>
     */
    const ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS = 1;
    /**
     * Permission for Assured Workloads monitoring violations
     *
     * Generated from protobuf enum <code>ASSURED_WORKLOADS_MONITORING = 2;</code>
     */
    const ASSURED_WORKLOADS_MONITORING = 2;
    /**
     * Permission for Access Approval requests
     *
     * Generated from protobuf enum <code>ACCESS_APPROVAL_REQUESTS = 3;</code>
     */
    const ACCESS_APPROVAL_REQUESTS = 3;
    /**
     * Permission for External Key Manager connection status
     *
     * Generated from protobuf enum <code>ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4;</code>
     */
    const ASSURED_WORKLOADS_EKM_CONNECTION_STATUS = 4;
    /**
     * Permission for support case details for Access Transparency log entries
     *
     * Generated from protobuf enum <code>ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5;</code>
     */
    const ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER = 5;

    private static $valueToName = [
        self::PERMISSION_UNSPECIFIED => 'PERMISSION_UNSPECIFIED',
        self::ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS => 'ACCESS_TRANSPARENCY_AND_EMERGENCY_ACCESS_LOGS',
        self::ASSURED_WORKLOADS_MONITORING => 'ASSURED_WORKLOADS_MONITORING',
        self::ACCESS_APPROVAL_REQUESTS => 'ACCESS_APPROVAL_REQUESTS',
        self::ASSURED_WORKLOADS_EKM_CONNECTION_STATUS => 'ASSURED_WORKLOADS_EKM_CONNECTION_STATUS',
        self::ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER => 'ACCESS_TRANSPARENCY_LOGS_SUPPORT_CASE_VIEWER',
    ];

    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);
    }
}


