Debian Codegraph @

lib/3rdParty/composer/aws/aws-sdk-php/src/Api/SupportedProtocols.php

raw symbols SCIP
1 <?php
2
3 namespace Aws\Api;
4
5 /**
6 * Priority ordered collection of supported AWS protocols.
7 */
8 enum SupportedProtocols: string
9 {
10 case JSON = 'json';
11 case CBOR = 'smithy-rpc-v2-cbor';
12 case REST_JSON = 'rest-json';
13 case REST_XML = 'rest-xml';
14 case QUERY = 'query';
15 case EC2 = 'ec2';
16
17 /**
18 * Check if a protocol is valid.
19 *
20 * @param string $protocol
21 * @return bool True if the protocol is supported, otherwise false.
22 */
23 public static function isSupported(string $protocol): bool
24 {
25 return self::tryFrom($protocol) !== null;
26 }
27 }