GraphConstants.php
47 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Copyright (c) Microsoft Corporation. All Rights Reserved. |
| 4 | * Licensed under the MIT License. See License in the project root |
| 5 | * for license information. |
| 6 | * |
| 7 | * Constants File |
| 8 | * PHP version 7 |
| 9 | * |
| 10 | * @category Library |
| 11 | * @package Microsoft.Graph |
| 12 | * @copyright 2020 Microsoft Corporation |
| 13 | * @license https://opensource.org/licenses/MIT MIT License |
| 14 | * @link https://graph.microsoft.com |
| 15 | */ |
| 16 | |
| 17 | namespace Microsoft\Graph\Core; |
| 18 | |
| 19 | final class GraphConstants |
| 20 | { |
| 21 | // These can be overwritten in setters in the Graph object |
| 22 | const API_VERSION = "v1.0"; |
| 23 | const REST_ENDPOINT = "https://graph.microsoft.com/"; |
| 24 | |
| 25 | // Define HTTP request constants |
| 26 | const SDK_VERSION = "1.61.0"; |
| 27 | |
| 28 | // Define error constants |
| 29 | const MAX_PAGE_SIZE = 999; |
| 30 | const MAX_PAGE_SIZE_ERROR = "Page size must be less than " . self::MAX_PAGE_SIZE; |
| 31 | const TIMEOUT = "Timeout error"; |
| 32 | |
| 33 | // Define error message constants |
| 34 | const BASE_URL_MISSING = "Base URL cannot be null or empty."; |
| 35 | const REQUEST_TIMED_OUT = "The request timed out."; |
| 36 | const UNABLE_TO_CREATE_INSTANCE_OF_TYPE = "Unable to create instance of type"; |
| 37 | |
| 38 | // Define user error constants |
| 39 | const INVALID_FILE = "Unable to open file stream for the given path."; |
| 40 | const NO_ACCESS_TOKEN = "No access token has been provided."; |
| 41 | const NO_APP_ID = "No app ID has been provided."; |
| 42 | const NO_APP_SECRET = "No app secret has been provided."; |
| 43 | |
| 44 | // Define server error constants |
| 45 | const UNABLE_TO_PARSE_RESPONSE = "The HTTP client sent back an invalid response"; |
| 46 | } |
| 47 |