CloneableInstantiable
Constants
public Google\ApiCore\ApiStatus::ABORTED = 'ABORTED'
public Google\ApiCore\ApiStatus::ALREADY_EXISTS = 'ALREADY_EXISTS'
public Google\ApiCore\ApiStatus::CANCELLED = 'CANCELLED'
public Google\ApiCore\ApiStatus::DATA_LOSS = 'DATA_LOSS'
public Google\ApiCore\ApiStatus::DEADLINE_EXCEEDED = 'DEADLINE_EXCEEDED'
public Google\ApiCore\ApiStatus::FAILED_PRECONDITION = 'FAILED_PRECONDITION'
public Google\ApiCore\ApiStatus::INTERNAL = 'INTERNAL'
public Google\ApiCore\ApiStatus::INVALID_ARGUMENT = 'INVALID_ARGUMENT'
public Google\ApiCore\ApiStatus::NOT_FOUND = 'NOT_FOUND'
public Google\ApiCore\ApiStatus::OK = 'OK'
public Google\ApiCore\ApiStatus::OUT_OF_RANGE = 'OUT_OF_RANGE'
public Google\ApiCore\ApiStatus::PERMISSION_DENIED = 'PERMISSION_DENIED'
public Google\ApiCore\ApiStatus::RESOURCE_EXHAUSTED = 'RESOURCE_EXHAUSTED'
public Google\ApiCore\ApiStatus::UNAUTHENTICATED = 'UNAUTHENTICATED'
public Google\ApiCore\ApiStatus::UNAVAILABLE = 'UNAVAILABLE'
public Google\ApiCore\ApiStatus::UNIMPLEMENTED = 'UNIMPLEMENTED'
public Google\ApiCore\ApiStatus::UNKNOWN = 'UNKNOWN'
public Google\ApiCore\ApiStatus::UNRECOGNIZED_CODE = -1
public Google\ApiCore\ApiStatus::UNRECOGNIZED_STATUS = 'UNRECOGNIZED_STATUS'
Methods
public static isValidStatus( $status)
 
  • return bool
public static rpcCodeFromHttpStatusCode( $httpStatusCode)
 

Maps HTTP status codes to Google\Rpc\Code codes.

Only map codes which do not map to multiple gRPC codes (e.g. excludes
400, 409, and 500).

  • return int
public static rpcCodeFromStatus( $status)
 
  • return int
public static statusFromRpcCode( $code)
 
  • return string
Properties
private static $apiStatusToCodeMap = ['OK' => 0, 'CANCELLED' => 1, 'UNKNOWN' => 2, 'INVALID_ARGUMENT' => 3, 'DEADLINE_EXCEEDED' => 4, 'NOT_FOUND' => 5, 'ALREADY_EXISTS' => 6, 'PERMISSION_DENIED' => 7, 'RESOURCE_EXHAUSTED' => 8, 'FAILED_PRECONDITION' => 9, 'ABORTED' => 10, 'OUT_OF_RANGE' => 11, 'UNIMPLEMENTED' => 12, 'INTERNAL' => 13, 'UNAVAILABLE' => 14, 'DATA_LOSS' => 15, 'UNAUTHENTICATED' => 16]
private static $codeToApiStatusMap = ['OK', 'CANCELLED', 'UNKNOWN', 'INVALID_ARGUMENT', 'DEADLINE_EXCEEDED', 'NOT_FOUND', 'ALREADY_EXISTS', 'PERMISSION_DENIED', 'RESOURCE_EXHAUSTED', 'FAILED_PRECONDITION', 'ABORTED', 'OUT_OF_RANGE', 'UNIMPLEMENTED', 'INTERNAL', 'UNAVAILABLE', 'DATA_LOSS', 'UNAUTHENTICATED']
private static $httpStatusCodeToRpcCodeMap = [401 => 16, 403 => 7, 404 => 5, 429 => 8, 499 => 1, 501 => 12, 503 => 14, 504 => 4]
Properties
private static $apiStatusToCodeMap = ['OK' => 0, 'CANCELLED' => 1, 'UNKNOWN' => 2, 'INVALID_ARGUMENT' => 3, 'DEADLINE_EXCEEDED' => 4, 'NOT_FOUND' => 5, 'ALREADY_EXISTS' => 6, 'PERMISSION_DENIED' => 7, 'RESOURCE_EXHAUSTED' => 8, 'FAILED_PRECONDITION' => 9, 'ABORTED' => 10, 'OUT_OF_RANGE' => 11, 'UNIMPLEMENTED' => 12, 'INTERNAL' => 13, 'UNAVAILABLE' => 14, 'DATA_LOSS' => 15, 'UNAUTHENTICATED' => 16]
private static $codeToApiStatusMap = ['OK', 'CANCELLED', 'UNKNOWN', 'INVALID_ARGUMENT', 'DEADLINE_EXCEEDED', 'NOT_FOUND', 'ALREADY_EXISTS', 'PERMISSION_DENIED', 'RESOURCE_EXHAUSTED', 'FAILED_PRECONDITION', 'ABORTED', 'OUT_OF_RANGE', 'UNIMPLEMENTED', 'INTERNAL', 'UNAVAILABLE', 'DATA_LOSS', 'UNAUTHENTICATED']
private static $httpStatusCodeToRpcCodeMap = [401 => 16, 403 => 7, 404 => 5, 429 => 8, 499 => 1, 501 => 12, 503 => 14, 504 => 4]
Methods
public static isValidStatus( $status)
 
  • return bool
public static rpcCodeFromHttpStatusCode( $httpStatusCode)
 

Maps HTTP status codes to Google\Rpc\Code codes.

Only map codes which do not map to multiple gRPC codes (e.g. excludes
400, 409, and 500).

  • return int
public static rpcCodeFromStatus( $status)
 
  • return int
public static statusFromRpcCode( $code)
 
  • return string
© 2020 Bruce Wells
Search Namespaces \ Classes
ConfigurationNumbers (0-9.) only