├── .github ├── CODEOWNERS └── workflows │ └── main.yml ├── .gitignore ├── .php_cs ├── LICENSE ├── README.md ├── composer.json ├── docs ├── Api │ ├── AccountApi.md │ ├── FirewallApi.md │ ├── HostsApi.md │ ├── IPAddressApi.md │ ├── NetworkApi.md │ ├── ObjectStorageApi.md │ ├── PlanApi.md │ ├── PricesApi.md │ ├── ServerApi.md │ ├── StorageApi.md │ ├── TagApi.md │ ├── TimezoneApi.md │ └── ZoneApi.md └── Model │ ├── Account.md │ ├── AccountResourceLimits.md │ ├── AccountResponse.md │ ├── AddIpRequest.md │ ├── AssignIpResponse.md │ ├── AttachNetwork.md │ ├── AttachStorageDeviceRequest.md │ ├── AvailablePlanListResponse.md │ ├── AvailablePlanListResponsePlans.md │ ├── BackupRule.md │ ├── CloneStorageRequest.md │ ├── ConfigurationListResponse.md │ ├── ConfigurationListResponseServerSizes.md │ ├── CreateBackupStorageRequest.md │ ├── CreateNetworkInterfaceRequest.md │ ├── CreateNetworkRequest.md │ ├── CreateNewTagResponse.md │ ├── CreateObjectStorageRequest.md │ ├── CreateServerRequest.md │ ├── CreateServerResponse.md │ ├── CreateStorageRequest.md │ ├── CreateStorageResponse.md │ ├── Error.md │ ├── ErrorCode.md │ ├── ErrorError.md │ ├── ErrorStatus.md │ ├── FirewallRule.md │ ├── FirewallRuleCreateResponse.md │ ├── FirewallRuleListResponse.md │ ├── FirewallRuleListResponseFirewallRules.md │ ├── FirewallRuleRequest.md │ ├── Host.md │ ├── HostListResponse.md │ ├── HostResponse.md │ ├── Hosts.md │ ├── IpAddress.md │ ├── IpAddressListResponse.md │ ├── IpAddressListResponseIpAddresses.md │ ├── IpAddresses.md │ ├── IpNetwork.md │ ├── ModifyHostRequest.md │ ├── ModifyIpRequest.md │ ├── ModifyNetworkInterfaceRequest.md │ ├── ModifyNetworkRequest.md │ ├── ModifyObjectStorageRequest.md │ ├── ModifyServerRequest.md │ ├── ModifyStorageRequest.md │ ├── ModifyTagRequest.md │ ├── Network.md │ ├── NetworkInterface.md │ ├── NetworkInterfaceList.md │ ├── NetworkInterfaceResponse.md │ ├── NetworkInterfaces.md │ ├── NetworkResponse.md │ ├── Networks.md │ ├── NetworksListResponse.md │ ├── ObjectStorage.md │ ├── ObjectStorageListResponse.md │ ├── ObjectStorageResponse.md │ ├── ObjectStorages.md │ ├── Plan.md │ ├── Price.md │ ├── PriceListResponse.md │ ├── PriceListResponsePrice.md │ ├── PriceListResponsePrices.md │ ├── PriceZone.md │ ├── RestartServer.md │ ├── Router.md │ ├── RouterRequest.md │ ├── RouterResponse.md │ ├── Routers.md │ ├── RoutersListResponse.md │ ├── Server.md │ ├── ServerListResponse.md │ ├── ServerListResponseServers.md │ ├── ServerLoginUser.md │ ├── ServerNetworksListResponse.md │ ├── ServerSize.md │ ├── ServerSshKey.md │ ├── ServerState.md │ ├── ServerStorageDevices.md │ ├── ServerTags.md │ ├── Servers.md │ ├── Stat.md │ ├── Stats.md │ ├── StopServer.md │ ├── StopServerRequest.md │ ├── Storage.md │ ├── StorageAccessType.md │ ├── StorageBackups.md │ ├── StorageDevice.md │ ├── StorageDeviceDetachRequest.md │ ├── StorageDeviceLoadRequest.md │ ├── StorageState.md │ ├── StorageTier.md │ ├── StorageType.md │ ├── SuccessStoragesResponse.md │ ├── SuccessStoragesResponseStorages.md │ ├── Tag.md │ ├── TagCreateRequest.md │ ├── TagListResponse.md │ ├── TagListResponseTags.md │ ├── TagServers.md │ ├── TemplitizeStorageRequest.md │ ├── TimezoneListResponse.md │ ├── TimezoneListResponseTimezones.md │ ├── Zone.md │ ├── ZoneListResponse.md │ ├── ZoneListResponseZones.md │ └── ipNetworks.md ├── lib ├── ApiException.php ├── Configuration.php ├── HttpClient │ ├── UpcloudApiRequest.php │ ├── UpcloudApiResponse.php │ └── UpcloudHttpClient.php ├── Model │ ├── Account.php │ ├── AccountResourceLimits.php │ ├── AccountResponse.php │ ├── AddIpRequest.php │ ├── AssignIpResponse.php │ ├── AttachNetwork.php │ ├── AttachStorageDeviceRequest.php │ ├── AvailablePlanListResponse.php │ ├── AvailablePlanListResponsePlans.php │ ├── BackupRule.php │ ├── CloneStorageRequest.php │ ├── ConfigurationListResponse.php │ ├── ConfigurationListResponseServerSizes.php │ ├── CreateBackupStorageRequest.php │ ├── CreateNetworkInterfaceRequest.php │ ├── CreateNetworkRequest.php │ ├── CreateNewTagResponse.php │ ├── CreateObjectStorageRequest.php │ ├── CreateServerRequest.php │ ├── CreateServerResponse.php │ ├── CreateStorageRequest.php │ ├── CreateStorageResponse.php │ ├── Error.php │ ├── ErrorCode.php │ ├── ErrorError.php │ ├── ErrorStatus.php │ ├── FirewallRule.php │ ├── FirewallRuleCreateResponse.php │ ├── FirewallRuleListResponse.php │ ├── FirewallRuleListResponseFirewallRules.php │ ├── FirewallRuleRequest.php │ ├── FirewallRulesRequest.php │ ├── Host.php │ ├── HostListResponse.php │ ├── HostResponse.php │ ├── Hosts.php │ ├── IpAddress.php │ ├── IpAddressListResponse.php │ ├── IpAddresses.php │ ├── IpNetwork.php │ ├── IpNetworks.php │ ├── ModifyHostRequest.php │ ├── ModifyIpRequest.php │ ├── ModifyNetworkInterfaceRequest.php │ ├── ModifyNetworkRequest.php │ ├── ModifyObjectStorageRequest.php │ ├── ModifyServerRequest.php │ ├── ModifyStorageRequest.php │ ├── ModifyTagRequest.php │ ├── Network.php │ ├── NetworkInterface.php │ ├── NetworkInterfaceList.php │ ├── NetworkInterfaceRequest.php │ ├── NetworkInterfaceResponse.php │ ├── NetworkInterfaces.php │ ├── NetworkRequest.php │ ├── NetworkResponse.php │ ├── Networks.php │ ├── NetworksListResponse.php │ ├── ObjectStorage.php │ ├── ObjectStorageListResponse.php │ ├── ObjectStorageRequest.php │ ├── ObjectStorageResponse.php │ ├── ObjectStorages.php │ ├── Plan.php │ ├── Price.php │ ├── PriceListResponse.php │ ├── PriceListResponsePrices.php │ ├── PriceZone.php │ ├── RestartServer.php │ ├── RestartServerRequest.php │ ├── Router.php │ ├── RouterRequest.php │ ├── RouterResponse.php │ ├── Routers.php │ ├── RoutersListResponse.php │ ├── Server.php │ ├── ServerListResponse.php │ ├── ServerListResponseServers.php │ ├── ServerLoginUser.php │ ├── ServerNetworksListResponse.php │ ├── ServerRequest.php │ ├── ServerSize.php │ ├── ServerSshKey.php │ ├── ServerState.php │ ├── ServerStorageDevices.php │ ├── ServerTags.php │ ├── Servers.php │ ├── Stat.php │ ├── Stats.php │ ├── StopServer.php │ ├── StopServerRequest.php │ ├── Storage.php │ ├── StorageAccessType.php │ ├── StorageBackups.php │ ├── StorageDevice.php │ ├── StorageDeviceDetachRequest.php │ ├── StorageDeviceLoadRequest.php │ ├── StorageDeviceRequest.php │ ├── StorageRequest.php │ ├── StorageState.php │ ├── StorageTier.php │ ├── StorageType.php │ ├── SuccessStoragesResponse.php │ ├── SuccessStoragesResponseStorages.php │ ├── Tag.php │ ├── TagCreateRequest.php │ ├── TagListResponse.php │ ├── TagListResponseTags.php │ ├── TagServers.php │ ├── TemplitizeStorageRequest.php │ ├── TimezoneListResponse.php │ ├── TimezoneListResponseTimezones.php │ ├── Zone.php │ ├── ZoneListResponse.php │ └── ZoneListResponseZones.php ├── Serializer.php ├── SerializerInterface.php ├── Support │ └── Traits │ │ └── Arrayable.php └── Upcloud │ ├── AccountApi.php │ ├── BaseApi.php │ ├── FirewallApi.php │ ├── HostsApi.php │ ├── IPAddressApi.php │ ├── NetworkApi.php │ ├── ObjectStorageApi.php │ ├── PlanApi.php │ ├── PricesApi.php │ ├── ServerApi.php │ ├── StorageApi.php │ ├── TagApi.php │ ├── TimezoneApi.php │ └── ZoneApi.php ├── phpconfig.ini ├── phpunit.xml.dist └── test ├── Api ├── AccountApi │ └── AccountApiTest.php ├── BaseApiTest.php ├── FirewallApi │ ├── FirewallApiAsyncTest.php │ └── FirewallApiTest.php ├── Fixtures │ ├── BaseFixture.php │ ├── FirewallApiFixture.php │ ├── HostsApiFixture.php │ ├── IPAddressApiFixture.php │ ├── NetworkApiFixture.php │ ├── ObjectStorageApiFixture.php │ ├── PlanApiFixture.php │ ├── PricesApiFixture.php │ ├── ServerApiFixture.php │ ├── StorageApiFixture.php │ ├── TagApiFixture.php │ ├── TimezoneApiFixture.php │ └── ZoneApiFixture.php ├── Hosts │ └── HostsApiTest.php ├── HttpClient │ └── HttpClientTest.php ├── IPAddressApi │ ├── IPAddressApiAsyncTest.php │ └── IPAddressApiTest.php ├── NetworkApi │ ├── NetworkApiAsyncTest.php │ └── NetworkApiTest.php ├── ObjectStorage │ ├── ObjectStorageAsyncTest.php │ └── ObjectStorageTest.php ├── PlanApi │ └── PlanApiTest.php ├── PricesApi │ └── PricesApiTest.php ├── ServerApi │ ├── ServerApiAsyncTest.php │ └── ServerApiTest.php ├── StorageApi │ ├── StorageApiAsyncTest.php │ └── StorageApiTest.php ├── TagApi │ ├── TagApiAsyncTest.php │ └── TagApiTest.php ├── TimezoneApi │ └── TimezoneApiTest.php └── ZoneApi │ └── ZoneApiTest.php └── test-install-with-laravel.sh /.github/CODEOWNERS: -------------------------------------------------------------------------------- 1 | * @UpCloudLtd/devex @Darep 2 | -------------------------------------------------------------------------------- /.github/workflows/main.yml: -------------------------------------------------------------------------------- 1 | name: UpCloud php api test 2 | on: 3 | push: 4 | branches: 5 | - main 6 | pull_request: 7 | jobs: 8 | Test: 9 | strategy: 10 | matrix: 11 | os-php-versions: [ 12 | { os: ubuntu-latest, php: 8.0 }, 13 | { os: ubuntu-latest, php: 8.1 }, 14 | { os: ubuntu-latest, php: 8.2 }, 15 | ] 16 | runs-on: ${{ matrix.os-php-versions.os }} 17 | steps: 18 | - name: Setup PHP 19 | uses: shivammathur/setup-php@v2 20 | with: 21 | php-version: ${{ matrix.os-php-versions.php }} 22 | - uses: actions/checkout@v2 23 | - name: Validate composer.json and composer.lock 24 | run: composer validate 25 | 26 | - name: Install dependencies 27 | if: steps.composer-cache.outputs.cache-hit != 'true' 28 | run: composer install --prefer-dist --no-progress --no-suggest 29 | 30 | - name: run unit tests 31 | run: vendor/bin/phpunit 32 | env: 33 | xdebug.max_nesting_level: 512 34 | UPCLOUD_API_TEST_USER: ${{ secrets.UPCLOUD_API_TEST_USER }} 35 | UPCLOUD_API_TEST_PASSWORD: ${{ secrets.UPCLOUD_API_TEST_PASSWORD }} 36 | 37 | test-with-laravel: 38 | name: Test install with laravel 39 | strategy: 40 | matrix: 41 | laravel-version: 42 | - 9 43 | - 10 44 | runs-on: ubuntu-latest 45 | steps: 46 | - name: Setup PHP 47 | uses: shivammathur/setup-php@v2 48 | with: 49 | php-version: 8.2 50 | - uses: actions/checkout@v2 51 | - name: Test package can be required into laravel project 52 | run: | 53 | ./test/test-install-with-laravel.sh ${{ matrix.laravel-version }} 54 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | vendor 2 | .DS_Store 3 | git_push.sh 4 | .vscode 5 | /phpunit.xml 6 | /composer.lock 7 | .phpunit.result.cache 8 | tmp/ 9 | -------------------------------------------------------------------------------- /.php_cs: -------------------------------------------------------------------------------- 1 | in(['lib', 'test']); 7 | 8 | return PhpCsFixer\Config::create() 9 | ->setUsingCache(true) 10 | ->setRiskyAllowed(true) 11 | ->setRules([ 12 | '@Symfony' => true, 13 | 'align_multiline_comment' => true, 14 | 'array_indentation' => true, 15 | 'array_syntax' => ['syntax' => 'short'], 16 | 'combine_consecutive_issets' => true, 17 | 'date_time_immutable' => true, 18 | 'declare_strict_types' => true, 19 | 'function_to_constant' => true, 20 | 'header_comment' => ['header' => ''], 21 | 'mb_str_functions' => true, 22 | 'method_chaining_indentation' => true, 23 | 'multiline_whitespace_before_semicolons' => true, 24 | 'native_constant_invocation' => true, 25 | 'native_function_invocation' => true, 26 | 'no_alternative_syntax' => true, 27 | 'no_homoglyph_names' => true, 28 | 'no_null_property_initialization' => true, 29 | 'no_superfluous_elseif' => true, 30 | 'no_superfluous_phpdoc_tags' => [ 31 | 'allow_mixed' => true, 32 | ], 33 | 'no_useless_else' => true, 34 | 'nullable_type_declaration_for_default_null_value' => [ 35 | 'use_nullable_type_declaration' => true, 36 | ], 37 | 'ordered_imports' => true, 38 | 'ordered_interfaces' => true, 39 | 'phpdoc_line_span' => [ 40 | 'const' => 'single', 41 | 'property' => 'single', 42 | ], 43 | 'phpdoc_no_empty_return' => true, 44 | 'php_unit_expectation' => true, 45 | 'php_unit_internal_class' => true, 46 | 'php_unit_mock' => true, 47 | 'php_unit_mock_short_will_return' => true, 48 | 'php_unit_namespaced' => true, 49 | 'php_unit_no_expectation_annotation' => true, 50 | 'php_unit_set_up_tear_down_visibility' => true, 51 | 'php_unit_test_case_static_method_calls' => [ 52 | 'call_type' => 'this', 53 | ], 54 | 'phpdoc_align' => false, 55 | 'phpdoc_order' => true, 56 | 'phpdoc_trim_consecutive_blank_line_separation' => true, 57 | 'simple_to_complex_string_variable' => true, 58 | 'single_line_throw' => false, 59 | 'static_lambda' => true, 60 | 'void_return' => true, 61 | 'yoda_style' => false, 62 | ]) 63 | ->setFinder($finder); 64 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 UpCloud 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. 22 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "upcloudltd/upcloud-php-api", 3 | "description": "UpCloud PHP API", 4 | "keywords": [ 5 | "php", 6 | "sdk", 7 | "api", 8 | "upcloud" 9 | ], 10 | "homepage": "https://github.com/UpCloudLtd/upcloud-php-api", 11 | "license": "MIT", 12 | "authors": [ 13 | { 14 | "name": "UpCloud", 15 | "homepage": "https://www.upcloud.com" 16 | } 17 | ], 18 | "require": { 19 | "php": "^8.0", 20 | "ext-curl": "*", 21 | "ext-json": "*", 22 | "ext-mbstring": "*", 23 | "guzzlehttp/guzzle": "^7.1", 24 | "symfony/serializer": "^6.0", 25 | "symfony/property-access": "^6.0", 26 | "webmozart/assert": "^1.9" 27 | }, 28 | "require-dev": { 29 | "phpunit/phpunit": "^8.5.8", 30 | "squizlabs/php_codesniffer": "~3.5", 31 | "mockery/mockery": "^1.3.3", 32 | "symfony/var-dumper": "^6.0" 33 | }, 34 | "autoload": { 35 | "psr-4": { 36 | "Upcloud\\ApiClient\\": "lib/" 37 | } 38 | }, 39 | "autoload-dev": { 40 | "psr-4": { 41 | "Upcloud\\Tests\\": "test/" 42 | } 43 | }, 44 | "minimum-stability": "stable" 45 | } -------------------------------------------------------------------------------- /docs/Api/AccountApi.md: -------------------------------------------------------------------------------- 1 | # Upcloud\ApiClient\AccountApi 2 | 3 | All URIs are relative to _https://api.upcloud.com/1.3_ 4 | 5 | | Method | HTTP request | Description | 6 | | ------------------------------------------ | ---------------- | ------------------- | 7 | | [**getAccount**](AccountApi.md#getAccount) | **GET** /account | Account information | 8 | 9 | # **getAccount** 10 | 11 | > \Upcloud\ApiClient\Model\AccountResponse getAccount() 12 | 13 | Account information 14 | 15 | Returns information on the user's account. 16 | 17 | ### Example 18 | 19 | ```php 20 | setUsername('YOUR_USERNAME'); 25 | Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); 26 | 27 | $api_instance = new Upcloud\ApiClient\Upcloud\AccountApi(); 28 | 29 | try { 30 | $result = $api_instance->getAccount(); 31 | print_r($result); 32 | } catch (Exception $e) { 33 | echo 'Exception when calling AccountApi->getAccount: ', $e->getMessage(), PHP_EOL; 34 | } 35 | ?> 36 | ``` 37 | 38 | ### Parameters 39 | 40 | This endpoint does not need any parameter. 41 | 42 | ### Return type 43 | 44 | [**\Upcloud\ApiClient\Model\AccountResponse**](../Model/AccountResponse.md) 45 | 46 | ### Authorization 47 | 48 | [baseAuth](../../README.md#baseAuth) 49 | 50 | ### HTTP request headers 51 | 52 | * **Content-Type**: application/json 53 | * **Accept**: application/json 54 | 55 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) 56 | -------------------------------------------------------------------------------- /docs/Api/PlanApi.md: -------------------------------------------------------------------------------- 1 | # Upcloud\ApiClient\PlanApi 2 | 3 | All URIs are relative to _https://api.upcloud.com/1.3_ 4 | 5 | | Method | HTTP request | Description | 6 | | ------------------------------------- | ------------- | -------------------- | 7 | | [**listPlans**](PlanApi.md#listPlans) | **GET** /plan | List available plans | 8 | 9 | # **listPlans** 10 | 11 | > \Upcloud\ApiClient\Model\AvailablePlanListResponse listPlans() 12 | 13 | List available plans 14 | 15 | Returns a list of available plans. 16 | 17 | ### Example 18 | 19 | ```php 20 | setUsername('YOUR_USERNAME'); 25 | Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); 26 | 27 | $api_instance = new Upcloud\ApiClient\Upcloud\PlanApi(); 28 | 29 | try { 30 | $result = $api_instance->listPlans(); 31 | print_r($result); 32 | } catch (Exception $e) { 33 | echo 'Exception when calling PlanApi->listPlans: ', $e->getMessage(), PHP_EOL; 34 | } 35 | ?> 36 | ``` 37 | 38 | ### Parameters 39 | 40 | This endpoint does not need any parameter. 41 | 42 | ### Return type 43 | 44 | [**\Upcloud\ApiClient\Model\AvailablePlanListResponse**](../Model/AvailablePlanListResponse.md) 45 | 46 | ### Authorization 47 | 48 | [baseAuth](../../README.md#baseAuth) 49 | 50 | ### HTTP request headers 51 | 52 | * **Content-Type**: application/json 53 | * **Accept**: application/json 54 | 55 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) 56 | -------------------------------------------------------------------------------- /docs/Api/PricesApi.md: -------------------------------------------------------------------------------- 1 | # Upcloud\ApiClient\PricesApi 2 | 3 | All URIs are relative to _https://api.upcloud.com/1.3_ 4 | 5 | | Method | HTTP request | Description | 6 | | ----------------------------------------- | -------------- | ----------- | 7 | | [**listPrices**](PricesApi.md#listPrices) | **GET** /price | List prices | 8 | 9 | # **listPrices** 10 | 11 | > \Upcloud\ApiClient\Model\PriceListResponse listPrices() 12 | 13 | List prices 14 | 15 | Returns a list resource prices. 16 | 17 | ### Example 18 | 19 | ```php 20 | setUsername('YOUR_USERNAME'); 25 | Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); 26 | 27 | $api_instance = new Upcloud\ApiClient\Upcloud\PricesApi(); 28 | 29 | try { 30 | $result = $api_instance->listPrices(); 31 | print_r($result); 32 | } catch (Exception $e) { 33 | echo 'Exception when calling PricesApi->listPrices: ', $e->getMessage(), PHP_EOL; 34 | } 35 | ?> 36 | ``` 37 | 38 | ### Parameters 39 | 40 | This endpoint does not need any parameter. 41 | 42 | ### Return type 43 | 44 | [**\Upcloud\ApiClient\Model\PriceListResponse**](../Model/PriceListResponse.md) 45 | 46 | ### Authorization 47 | 48 | [baseAuth](../../README.md#baseAuth) 49 | 50 | ### HTTP request headers 51 | 52 | * **Content-Type**: application/json 53 | * **Accept**: application/json 54 | 55 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) 56 | -------------------------------------------------------------------------------- /docs/Api/TimezoneApi.md: -------------------------------------------------------------------------------- 1 | # Upcloud\ApiClient\TimezoneApi 2 | 3 | All URIs are relative to _https://api.upcloud.com/1.3_ 4 | 5 | | Method | HTTP request | Description | 6 | | ------------------------------------------------- | ----------------- | -------------- | 7 | | [**listTimezones**](TimezoneApi.md#listTimezones) | **GET** /timezone | List timezones | 8 | 9 | # **listTimezones** 10 | 11 | > \Upcloud\ApiClient\Model\TimezoneListResponse listTimezones() 12 | 13 | List timezones 14 | 15 | Returns a list of available timezones. Timezones are used to set the hardware clock for servers. 16 | 17 | ### Example 18 | 19 | ```php 20 | setUsername('YOUR_USERNAME'); 25 | Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); 26 | 27 | $api_instance = new Upcloud\ApiClient\Upcloud\TimezoneApi(); 28 | 29 | try { 30 | $result = $api_instance->listTimezones(); 31 | print_r($result); 32 | } catch (Exception $e) { 33 | echo 'Exception when calling TimezoneApi->listTimezones: ', $e->getMessage(), PHP_EOL; 34 | } 35 | ?> 36 | ``` 37 | 38 | ### Parameters 39 | 40 | This endpoint does not need any parameter. 41 | 42 | ### Return type 43 | 44 | [**\Upcloud\ApiClient\Model\TimezoneListResponse**](../Model/TimezoneListResponse.md) 45 | 46 | ### Authorization 47 | 48 | [baseAuth](../../README.md#baseAuth) 49 | 50 | ### HTTP request headers 51 | 52 | * **Content-Type**: application/json 53 | * **Accept**: application/json 54 | 55 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) 56 | -------------------------------------------------------------------------------- /docs/Api/ZoneApi.md: -------------------------------------------------------------------------------- 1 | # Upcloud\ApiClient\ZoneApi 2 | 3 | All URIs are relative to _https://api.upcloud.com/1.3_ 4 | 5 | | Method | HTTP request | Description | 6 | | ------------------------------------- | ------------- | -------------------- | 7 | | [**listZones**](ZoneApi.md#listZones) | **GET** /zone | List available zones | 8 | 9 | # **listZones** 10 | 11 | > \Upcloud\ApiClient\Model\ZoneListResponse listZones() 12 | 13 | List available zones 14 | 15 | Returns a list of available zones. 16 | 17 | ### Example 18 | 19 | ```php 20 | setUsername('YOUR_USERNAME'); 25 | Upcloud\ApiClient\Configuration::getDefaultConfiguration()->setPassword('YOUR_PASSWORD'); 26 | 27 | $api_instance = new Upcloud\ApiClient\Upcloud\ZoneApi(); 28 | 29 | try { 30 | $result = $api_instance->listZones(); 31 | print_r($result); 32 | } catch (Exception $e) { 33 | echo 'Exception when calling ZoneApi->listZones: ', $e->getMessage(), PHP_EOL; 34 | } 35 | ?> 36 | ``` 37 | 38 | ### Parameters 39 | 40 | This endpoint does not need any parameter. 41 | 42 | ### Return type 43 | 44 | [**\Upcloud\ApiClient\Model\ZoneListResponse**](../Model/ZoneListResponse.md) 45 | 46 | ### Authorization 47 | 48 | [baseAuth](../../README.md#baseAuth) 49 | 50 | ### HTTP request headers 51 | 52 | * **Content-Type**: application/json 53 | * **Accept**: application/json 54 | 55 | [[Back to top]](#) [[Back to API list]](../../README.md#documentation) [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to README]](../../README.md) 56 | -------------------------------------------------------------------------------- /docs/Model/Account.md: -------------------------------------------------------------------------------- 1 | # Account 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **credits** | **float** | Credits are used to pay for cloud resources such as servers, storages, network traffic and IP addresses. Credits are automatically deducted for used resources on an hourly basis. Should the user run out of credits, active resources will be disabled and reactivated after the credit balance returns to positive. Credits can be purchased from the UpCloud website. | [optional] 7 | **username** | **string** | | [optional] 8 | **resource_limits** | [**\Upcloud\ApiClient\Model\AccountResourceLimits**](AccountResourceLimits.md) | Resource limit variables | [varies] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/AccountResourceLimits.md: -------------------------------------------------------------------------------- 1 | # AccountResourceLimits 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **cores** | |Maximum number of CPU cores | 7 | **detached_floating_ips** | | Maximum number of detached floating IP addresses | 8 | **memory** | | Maximum amount of memory in MiB | 9 | **networks** | | Maximum number of networks | 10 | **public_ipv4** | | Maximum number of IPv4 addresses | 11 | **public_ipv6** | | Maximum number of IPv6 addresses | 12 | **storage_hdd** | | Maximum amount of HDD storage space in MiB | 13 | **storage_ssd** | | Maximum amount of SSD storage space in MiB | 14 | 15 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 16 | 17 | -------------------------------------------------------------------------------- /docs/Model/AccountResponse.md: -------------------------------------------------------------------------------- 1 | # AccountResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **account** | [**\Upcloud\ApiClient\Model\Account**](Account.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/AddIpRequest.md: -------------------------------------------------------------------------------- 1 | # AddIpRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/AssignIpResponse.md: -------------------------------------------------------------------------------- 1 | # AssignIpResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/AttachNetwork.md: -------------------------------------------------------------------------------- 1 | # AttachNetwork 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | **string[]** | | 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/AttachStorageDeviceRequest.md: -------------------------------------------------------------------------------- 1 | # AttachStorageDeviceRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/AvailablePlanListResponse.md: -------------------------------------------------------------------------------- 1 | # AvailablePlanListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **plans** | [**\Upcloud\ApiClient\Model\AvailablePlanListResponsePlans**](AvailablePlanListResponsePlans.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/AvailablePlanListResponsePlans.md: -------------------------------------------------------------------------------- 1 | # AvailablePlanListResponsePlans 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **plan** | [**\Upcloud\ApiClient\Model\Plan[]**](Plan.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/BackupRule.md: -------------------------------------------------------------------------------- 1 | # BackupRule 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interval** | **string** | | [optional] 7 | **time** | **string** | | [optional] 8 | **retention** | **float** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/CloneStorageRequest.md: -------------------------------------------------------------------------------- 1 | # CloneStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ConfigurationListResponse.md: -------------------------------------------------------------------------------- 1 | # ConfigurationListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server_sizes** | [**\Upcloud\ApiClient\Model\ConfigurationListResponseServerSizes**](ConfigurationListResponseServerSizes.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ConfigurationListResponseServerSizes.md: -------------------------------------------------------------------------------- 1 | # ConfigurationListResponseServerSizes 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server_size** | [**\Upcloud\ApiClient\Model\ServerSize[]**](ServerSize.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateBackupStorageRequest.md: -------------------------------------------------------------------------------- 1 | # CreateBackupStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateNetworkInterfaceRequest.md: -------------------------------------------------------------------------------- 1 | # CreateNetworkInterfaceRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateNetworkRequest.md: -------------------------------------------------------------------------------- 1 | # CreateNetworkRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateNewTagResponse.md: -------------------------------------------------------------------------------- 1 | # CreateNewTagResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateObjectStorageRequest.md: -------------------------------------------------------------------------------- 1 | # CreateObjectStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateServerRequest.md: -------------------------------------------------------------------------------- 1 | # CreateServerRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateServerResponse.md: -------------------------------------------------------------------------------- 1 | # CreateServerResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateStorageRequest.md: -------------------------------------------------------------------------------- 1 | # CreateStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/CreateStorageResponse.md: -------------------------------------------------------------------------------- 1 | # CreateStorageResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Error.md: -------------------------------------------------------------------------------- 1 | # Error 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **error** | [**\Upcloud\ApiClient\Model\ErrorError**](ErrorError.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ErrorCode.md: -------------------------------------------------------------------------------- 1 | # ErrorCode 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/ErrorError.md: -------------------------------------------------------------------------------- 1 | # ErrorError 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **error_code** | [**\Upcloud\ApiClient\Model\ErrorCode**](ErrorCode.md) | | [optional] 7 | **error_status** | [**\Upcloud\ApiClient\Model\ErrorStatus**](ErrorStatus.md) | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/ErrorStatus.md: -------------------------------------------------------------------------------- 1 | # ErrorStatus 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/FirewallRule.md: -------------------------------------------------------------------------------- 1 | # FirewallRule 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **direction** | **string** | The direction of network traffic this rule will be applied to. | 7 | **action** | **string** | Action to take if the rule conditions are met. | 8 | **position** | **float** | Add the firewall rule to this position in the server's firewall list. | [optional] 9 | **family** | **string** | if protocol is set The address family of new firewall rule | 10 | **protocol** | **string** | The protocol this rule will be applied to. | [optional] 11 | **icmp_type** | **string** | The ICMP type. | [optional] 12 | **destination_address_start** | **string** | The destination address range starts from this address. | [optional] 13 | **destination_address_end** | **string** | The destination address range ends to this address. | [optional] 14 | **destination_port_start** | **float** | The destination port range starts from this port number. | [optional] 15 | **destination_port_end** | **float** | The destination port range ends to this port number. | [optional] 16 | **source_address_start** | **string** | The source address range starts from this address. | [optional] 17 | **source_address_end** | **string** | The source address range ends to this address. | [optional] 18 | **source_port_start** | **float** | The source port range starts from this port number. | [optional] 19 | **source_port_end** | **float** | The source port range ends to this port number. | [optional] 20 | **comment** | **string** | Freeform comment string for the rule. | [optional] 21 | 22 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 23 | 24 | 25 | -------------------------------------------------------------------------------- /docs/Model/FirewallRuleCreateResponse.md: -------------------------------------------------------------------------------- 1 | # FirewallRuleCreateResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule**](FirewallRule.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/FirewallRuleListResponse.md: -------------------------------------------------------------------------------- 1 | # FirewallRuleListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **firewall_rules** | [**\Upcloud\ApiClient\Model\FirewallRuleListResponseFirewallRules**](FirewallRuleListResponseFirewallRules.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/FirewallRuleListResponseFirewallRules.md: -------------------------------------------------------------------------------- 1 | # FirewallRuleListResponseFirewallRules 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule[]**](FirewallRule.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/FirewallRuleRequest.md: -------------------------------------------------------------------------------- 1 | # FirewallRuleRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **firewall_rule** | [**\Upcloud\ApiClient\Model\FirewallRule**](FirewallRule.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Host.md: -------------------------------------------------------------------------------- 1 | # Host 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **int** | | 7 | **description** | **string** | | 8 | **zone** | **string** | | 9 | **windows_enabled** | **string** | | 10 | **stats** | [**\Upcloud\ApiClient\Model\Stats**](Stats.md) | | 11 | 12 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 13 | -------------------------------------------------------------------------------- /docs/Model/HostListResponse.md: -------------------------------------------------------------------------------- 1 | # HostListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **hosts** | [**\Upcloud\ApiClient\Model\Hosts**](Hosts.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/HostResponse.md: -------------------------------------------------------------------------------- 1 | # HostResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **host** | [**\Upcloud\ApiClient\Model\Host**](Host.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/Hosts.md: -------------------------------------------------------------------------------- 1 | # Hosts 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **host** | [**\Upcloud\ApiClient\Model\Host[]**](Host.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/IpAddress.md: -------------------------------------------------------------------------------- 1 | # IpAddress 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **access** | **string** | Is address for private or public network. | [optional] 7 | **address** | **string** | | [optional] 8 | **family** | **string** | The address family of new IP address. | [optional] 9 | **ptr_record** | **string** | | [optional] 10 | **server** | **string** | | [optional] 11 | **part_of_plan** | **string** | | [optional] 12 | **mac** | **string** | MAC address of server interface to assign address to. Required for non-floating addresses. | [varies] 13 | **floating** | **string** | Whether the address to be assigned is a floating one. | [optional] 14 | **zone** | **string** | Zone of address, required when assigning a detached floating IP address. | [varies] 15 | 16 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 17 | 18 | 19 | -------------------------------------------------------------------------------- /docs/Model/IpAddressListResponse.md: -------------------------------------------------------------------------------- 1 | # IpAddressListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_addresses** | [**\Upcloud\ApiClient\Model\IpAddresses**](IpAddresses.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IpAddressListResponseIpAddresses.md: -------------------------------------------------------------------------------- 1 | # IpAddressListResponseIpAddresses 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_address** | [**\Upcloud\ApiClient\Model\IpAddress[]**](IpAddress.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IpAddresses.md: -------------------------------------------------------------------------------- 1 | # IpAddresses 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_address** | [**\Upcloud\ApiClient\Model\IpAddress[]**](IpAddress.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/IpNetwork.md: -------------------------------------------------------------------------------- 1 | # IpNetwork 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **family** | **string** | The address family of new IP address. | [optional] 7 | **address** | **string** | | [optional] 8 | **dhcp** | **string** | | [optional] 9 | **dhcp_default_route** | **string** | | [optional] 10 | **dhcp_dns** | **string[]** | | [optional] 11 | **gateway** | **string** | | [optional] 12 | **dhcp_bootfile_url** | **string** | | [varies] 13 | 14 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 15 | 16 | 17 | -------------------------------------------------------------------------------- /docs/Model/ModifyHostRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyHostRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **host** | [**\Upcloud\ApiClient\Model\Host**](Host.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyIpRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyIpRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_address** | [**\Upcloud\ApiClient\Model\IpAddress**](IpAddress.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyNetworkInterfaceRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyNetworkInterfaceRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyNetworkRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyNetworkRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyObjectStorageRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyObjectStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyServerRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyServerRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | [**\Upcloud\ApiClient\Model\Server**](Server.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-for-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyStorageRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ModifyTagRequest.md: -------------------------------------------------------------------------------- 1 | # ModifyTagRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Network.md: -------------------------------------------------------------------------------- 1 | # Network 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | | 7 | **type** | **string** | | 8 | **uuid** | **string**| | 9 | **zone** | **string** | | 10 | **router** | **string** | | 11 | **used_space** | **int** | | 12 | **ip_networks** | [**\Upcloud\ApiClient\Model\ipNetworks**](ipNetworks.md) | | 13 | **servers** | [**\Upcloud\ApiClient\Model\Servers**](Servers.md) | | 14 | 15 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 16 | -------------------------------------------------------------------------------- /docs/Model/NetworkInterface.md: -------------------------------------------------------------------------------- 1 | # NetworkInterface 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | **string** | Virtual network ID to join | [required] 7 | **type** | **string** | Set the type of the network | [required] 8 | **index** | **integer** | Interface index | [optional] [default to Next available] 9 | **ip_addresses** | [**\Upcloud\ApiClient\Model\IpAddresses**](IpAddresses.md) | Array of IP addresses under ip_address | [required] 10 | **source_ip_filtering** | **string** | Whether source IP filtering is enabled on the interface. Disabling it is allowed only for SDN private interfaces. | [optional] [default to 'yes'] 11 | **bootable** | **string** |Whether to try booting through the interface. | [optional] [default to 'no'] 12 | 13 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/Model/NetworkInterfaceList.md: -------------------------------------------------------------------------------- 1 | # NetworkInterfaceList 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interfaces** | [**\Upcloud\ApiClient\Model\NetworkInterfaces**](NetworkInterfaces.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/NetworkInterfaceResponse.md: -------------------------------------------------------------------------------- 1 | # NetworkInterfaceResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interface** | [**\Upcloud\ApiClient\Model\NetworkInterface**](NetworkInterface.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/NetworkInterfaces.md: -------------------------------------------------------------------------------- 1 | # NetworkInterfaces 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **interface** | [**\Upcloud\ApiClient\Model\NetworkInterface[]**](NetworkInterface.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/NetworkResponse.md: -------------------------------------------------------------------------------- 1 | # NetworkResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | [**\Upcloud\ApiClient\Model\Network**](Network.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/Networks.md: -------------------------------------------------------------------------------- 1 | # Networks 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **network** | [**\Upcloud\ApiClient\Model\Network[]**](Network.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/NetworksListResponse.md: -------------------------------------------------------------------------------- 1 | # NetworksListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **networks** | [**\Upcloud\ApiClient\Model\Networks**](Networks.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/ObjectStorage.md: -------------------------------------------------------------------------------- 1 | # ObjectStorage 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **uuid** | **string**| | 7 | **name** | **string** | | 8 | **description** | **string** | | 9 | **zone** | **string** | | 10 | **size** | **int** | | 11 | **used_space** | **int** | | 12 | **state** | **string** | | 13 | **url** | **string** | | 14 | **created** | **string** | | 15 | **access_key** | **string** | | 16 | **secret_key** | **string** | | 17 | 18 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 19 | -------------------------------------------------------------------------------- /docs/Model/ObjectStorageListResponse.md: -------------------------------------------------------------------------------- 1 | # ObjectStorageListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **object_storages** | [**\Upcloud\ApiClient\Model\ObjectStorages**](ObjectStorages.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/ObjectStorageResponse.md: -------------------------------------------------------------------------------- 1 | # ObjectStorageResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage**](ObjectStorage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/ObjectStorages.md: -------------------------------------------------------------------------------- 1 | # ObjectStorages 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **object_storage** | [**\Upcloud\ApiClient\Model\ObjectStorage[]**](ObjectStorage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/Plan.md: -------------------------------------------------------------------------------- 1 | # Plan 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **core_number** | **float** | | [optional] 7 | **memory_amount** | **float** | | [optional] 8 | **name** | **string** | | [optional] 9 | **public_traffic_out** | **float** | | [optional] 10 | **storage_size** | **float** | | [optional] 11 | **storage_tier** | **string** | | [optional] 12 | 13 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 14 | 15 | 16 | -------------------------------------------------------------------------------- /docs/Model/Price.md: -------------------------------------------------------------------------------- 1 | # Price 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **amount** | **float** | | [optional] 7 | **price** | **float** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/PriceListResponse.md: -------------------------------------------------------------------------------- 1 | # PriceListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **prices** | [**\Upcloud\ApiClient\Model\PriceListResponsePrices**](PriceListResponsePrices.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/PriceListResponsePrice.md: -------------------------------------------------------------------------------- 1 | # PriceListResponsePrice 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **zone** | [**\Upcloud\ApiClient\Model\PriceZone[]**](PriceZone.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/PriceListResponsePrices.md: -------------------------------------------------------------------------------- 1 | # PriceListResponsePrices 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **zone** | [**\Upcloud\ApiClient\Model\PriceZone[]**](PriceZone.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/PriceZone.md: -------------------------------------------------------------------------------- 1 | # PriceZone 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | | [optional] 7 | **firewall** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 8 | **io_request_backup** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 9 | **io_request_hdd** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 10 | **io_request_maxiops** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 11 | **ipv4_address** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 12 | **ipv6_address** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 13 | **public_ipv4_bandwidth_in** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 14 | **public_ipv4_bandwidth_out** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 15 | **public_ipv6_bandwidth_in** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 16 | **public_ipv6_bandwidth_out** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 17 | **server_core** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 18 | **server_memory** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 19 | **storage_backup** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 20 | **storage_hdd** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 21 | **storage_maxiops** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 22 | **server_plan_1x_cpu_1_gb** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 23 | **server_plan_2x_cpu_2_gb** | [**\Upcloud\ApiClient\Model\Price**](Price.md) | | [optional] 24 | 25 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 26 | 27 | 28 | -------------------------------------------------------------------------------- /docs/Model/RestartServer.md: -------------------------------------------------------------------------------- 1 | # RestartServer 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **stop_type** | **string** | Restart type | [optional] [default to 'soft'] 7 | **timeout** | **float** | Stop timeout in seconds | [optional] 8 | **timeout_action** | **string** | Action to take if timeout limit is exceeded. | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/Router.md: -------------------------------------------------------------------------------- 1 | # Router 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | | 7 | **type** | **string** | | 8 | **uuid** | **string**| | 9 | **attached_networks** | [**\Upcloud\ApiClient\Model\AttachNetwork**](AttachNetwork.md) | | 10 | 11 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 12 | -------------------------------------------------------------------------------- /docs/Model/RouterRequest.md: -------------------------------------------------------------------------------- 1 | # Routers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **router** | [**\Upcloud\ApiClient\Model\Router**](Router.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/RouterResponse.md: -------------------------------------------------------------------------------- 1 | # Routers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **router** | [**\Upcloud\ApiClient\Model\Router**](Router.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/Routers.md: -------------------------------------------------------------------------------- 1 | # Routers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **router** | [**\Upcloud\ApiClient\Model\Router[]**](Router.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/RoutersListResponse.md: -------------------------------------------------------------------------------- 1 | # RoutersListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **routers** | [**\Upcloud\ApiClient\Model\Routers**](Routers.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/ServerListResponse.md: -------------------------------------------------------------------------------- 1 | # ServerListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **servers** | [**\Upcloud\ApiClient\Model\ServerListResponseServers**](ServerListResponseServers.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ServerListResponseServers.md: -------------------------------------------------------------------------------- 1 | # ServerListResponseServers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | [**\Upcloud\ApiClient\Model\Server[]**](Server.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ServerLoginUser.md: -------------------------------------------------------------------------------- 1 | # ServerLoginUser 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **create_password** | **string** | If set to "no", user can login only with SSH key | [optional] [default to 'yes'] 7 | **username** | **string** | | [optional] 8 | **ssh_keys** | [**\Upcloud\ApiClient\Model\ServerSshKey**](ServerSshKey.md) | 1-32 ssh_key attributes | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/ServerNetworksListResponse.md: -------------------------------------------------------------------------------- 1 | # ServerNetworksListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **networking** | [**\Upcloud\ApiClient\Model\NetworkInterfaceList**](NetworkInterfaceList.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/ServerSize.md: -------------------------------------------------------------------------------- 1 | # ServerSize 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **core_number** | **float** | | [optional] 7 | **memory_amount** | **float** | | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/ServerSshKey.md: -------------------------------------------------------------------------------- 1 | # ServerSshKey 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ssh_key** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ServerState.md: -------------------------------------------------------------------------------- 1 | # ServerState 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/ServerStorageDevices.md: -------------------------------------------------------------------------------- 1 | # ServerStorageDevices 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice[]**](StorageDevice.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ServerTags.md: -------------------------------------------------------------------------------- 1 | # ServerTags 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tag** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Servers.md: -------------------------------------------------------------------------------- 1 | # Servers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Stat.md: -------------------------------------------------------------------------------- 1 | # Stat 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | | 7 | **timestamp** | **string** | | 8 | **value** | **float** | | 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | -------------------------------------------------------------------------------- /docs/Model/Stats.md: -------------------------------------------------------------------------------- 1 | # Stats 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **stat** | [**\Upcloud\ApiClient\Model\Stat[]**](Stat.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | -------------------------------------------------------------------------------- /docs/Model/StopServer.md: -------------------------------------------------------------------------------- 1 | # StopServer 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **stop_server** | [**\Upcloud\ApiClient\Model\StopServerRequest**](StopServerRequest.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/StopServerRequest.md: -------------------------------------------------------------------------------- 1 | # StopServerRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **stop_type** | **string** | Type of stop operation performed on the server. | [optional] [default to 'soft'] 7 | **timeout** | **float** | The stop timeout in seconds. | [optional] 8 | 9 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 10 | 11 | 12 | -------------------------------------------------------------------------------- /docs/Model/Storage.md: -------------------------------------------------------------------------------- 1 | # Storage 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **access** | [**\Upcloud\ApiClient\Model\StorageAccessType**](StorageAccessType.md) | | [optional] 7 | **backup_rule** | [**\Upcloud\ApiClient\Model\BackupRule**](BackupRule.md) | | [optional] 8 | **backups** | [**\Upcloud\ApiClient\Model\StorageBackups**](StorageBackups.md) | | [optional] 9 | **license** | **float** | | [optional] 10 | **servers** | [**\Upcloud\ApiClient\Model\Servers**](Servers.md) | | [optional] 11 | **size** | **float** | | [optional] 12 | **state** | [**\Upcloud\ApiClient\Model\StorageState**](StorageState.md) | | [optional] 13 | **tier** | [**\Upcloud\ApiClient\Model\StorageTier**](StorageTier.md) | | [optional] 14 | **title** | **string** | | [optional] 15 | **type** | [**\Upcloud\ApiClient\Model\StorageType**](StorageType.md) | | [optional] 16 | **uuid** | **string** | | [optional] 17 | **zone** | **string** | | [optional] 18 | **origin** | **string** | | [optional] 19 | **created** | **string** | | [optional] 20 | 21 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 22 | 23 | 24 | -------------------------------------------------------------------------------- /docs/Model/StorageAccessType.md: -------------------------------------------------------------------------------- 1 | # StorageAccessType 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/StorageBackups.md: -------------------------------------------------------------------------------- 1 | # StorageBackups 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **backup** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/StorageDevice.md: -------------------------------------------------------------------------------- 1 | # StorageDevice 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **title** | **string** | | [optional] 7 | **size** | **float** | | [optional] 8 | **tier** | **string** | | [optional] 9 | **action** | **string** | | [optional] 10 | **address** | **string** | | [optional] 11 | **part_of_plan** | **string** | | [optional] 12 | **storage** | **string** | | [optional] 13 | **storage_size** | **float** | | [optional] 14 | **storage_title** | **string** | | [optional] 15 | **type** | **string** | | [optional] 16 | **boot_disk** | **string** | | [optional] 17 | 18 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 19 | 20 | 21 | -------------------------------------------------------------------------------- /docs/Model/StorageDeviceDetachRequest.md: -------------------------------------------------------------------------------- 1 | # StorageDeviceDetachRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/StorageDeviceLoadRequest.md: -------------------------------------------------------------------------------- 1 | # StorageDeviceLoadRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage_device** | [**\Upcloud\ApiClient\Model\StorageDevice**](StorageDevice.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/StorageState.md: -------------------------------------------------------------------------------- 1 | # StorageState 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/StorageTier.md: -------------------------------------------------------------------------------- 1 | # StorageTier 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/StorageType.md: -------------------------------------------------------------------------------- 1 | # StorageType 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | 7 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 8 | 9 | 10 | -------------------------------------------------------------------------------- /docs/Model/SuccessStoragesResponse.md: -------------------------------------------------------------------------------- 1 | # SuccessStoragesResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storages** | [**\Upcloud\ApiClient\Model\SuccessStoragesResponseStorages**](SuccessStoragesResponseStorages.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/SuccessStoragesResponseStorages.md: -------------------------------------------------------------------------------- 1 | # SuccessStoragesResponseStorages 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage[]**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Tag.md: -------------------------------------------------------------------------------- 1 | # Tag 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **name** | **string** | The new tag | 7 | **description** | **string** | Description of the tag | [optional] 8 | **servers** | [**\Upcloud\ApiClient\Model\TagServers**](TagServers.md) | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/TagCreateRequest.md: -------------------------------------------------------------------------------- 1 | # TagCreateRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tag** | [**\Upcloud\ApiClient\Model\Tag**](Tag.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TagListResponse.md: -------------------------------------------------------------------------------- 1 | # TagListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tags** | [**\Upcloud\ApiClient\Model\TagListResponseTags**](TagListResponseTags.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TagListResponseTags.md: -------------------------------------------------------------------------------- 1 | # TagListResponseTags 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **tag** | [**\Upcloud\ApiClient\Model\Tag[]**](Tag.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TagServers.md: -------------------------------------------------------------------------------- 1 | # TagServers 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **server** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation-for-api-endpoints) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TemplitizeStorageRequest.md: -------------------------------------------------------------------------------- 1 | # TemplitizeStorageRequest 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **storage** | [**\Upcloud\ApiClient\Model\Storage**](Storage.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TimezoneListResponse.md: -------------------------------------------------------------------------------- 1 | # TimezoneListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **timezones** | [**\Upcloud\ApiClient\Model\TimezoneListResponseTimezones**](TimezoneListResponseTimezones.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/TimezoneListResponseTimezones.md: -------------------------------------------------------------------------------- 1 | # TimezoneListResponseTimezones 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **timezone** | **string[]** | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/Zone.md: -------------------------------------------------------------------------------- 1 | # Zone 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **id** | **string** | Unique zone identifier | [optional] 7 | **description** | **string** | Description of the zone | [optional] 8 | **public** | **string** | | [optional] 9 | 10 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 11 | 12 | 13 | -------------------------------------------------------------------------------- /docs/Model/ZoneListResponse.md: -------------------------------------------------------------------------------- 1 | # ZoneListResponse 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **zones** | [**\Upcloud\ApiClient\Model\ZoneListResponseZones**](ZoneListResponseZones.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ZoneListResponseZones.md: -------------------------------------------------------------------------------- 1 | # ZoneListResponseZones 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **zone** | [**\Upcloud\ApiClient\Model\Zone[]**](Zone.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /docs/Model/ipNetworks.md: -------------------------------------------------------------------------------- 1 | # ipNetworks 2 | 3 | ## Properties 4 | Name | Type | Description | Notes 5 | ------------ | ------------- | ------------- | ------------- 6 | **ip_network** | [**\Upcloud\ApiClient\Model\IpNetwork[]**](IpNetwork.md) | | [optional] 7 | 8 | [[Back to Model list]](../../README.md#documentation-of-the-models) [[Back to API list]](../../README.md#documentation) [[Back to README]](../../README.md) 9 | 10 | 11 | -------------------------------------------------------------------------------- /lib/HttpClient/UpcloudApiRequest.php: -------------------------------------------------------------------------------- 1 | serializer = $serializer ?? new Serializer; 20 | } 21 | 22 | public function __toString() 23 | { 24 | return $this->serializer->serialize($this); 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /lib/Model/Account.php: -------------------------------------------------------------------------------- 1 | setCredits($data['credits'] ?? null); 31 | $this->setUsername($data['username'] ?? null); 32 | $this->setResourceLimits($data['resource_limits'] ?? null); 33 | } 34 | 35 | /** 36 | * Gets credits 37 | * @return float|null 38 | */ 39 | public function getCredits(): ?float 40 | { 41 | return $this->credits; 42 | } 43 | 44 | /** 45 | * Sets credits 46 | * @param float|null $credits 47 | * @return Account 48 | */ 49 | public function setCredits(?float $credits): Account 50 | { 51 | $this->credits = $credits; 52 | 53 | return $this; 54 | } 55 | 56 | /** 57 | * Gets username 58 | * @return string 59 | */ 60 | public function getUsername(): ?string 61 | { 62 | return $this->username; 63 | } 64 | 65 | /** 66 | * Sets username 67 | * @param string|null $username 68 | * @return Account 69 | */ 70 | public function setUsername(?string $username): Account 71 | { 72 | $this->username = $username; 73 | 74 | return $this; 75 | } 76 | 77 | /** 78 | * @return AccountResourceLimits|null 79 | */ 80 | public function getResourceLimits(): ?AccountResourceLimits 81 | { 82 | return $this->resourceLimits; 83 | } 84 | 85 | /** 86 | * @param AccountResourceLimits|array|null $resourceLimits 87 | * @return Account 88 | */ 89 | public function setResourceLimits($resourceLimits): Account 90 | { 91 | if (is_array($resourceLimits)) { 92 | $this->resourceLimits = new AccountResourceLimits($resourceLimits); 93 | } else { 94 | $this->resourceLimits = $resourceLimits; 95 | } 96 | 97 | return $this; 98 | } 99 | } 100 | -------------------------------------------------------------------------------- /lib/Model/AccountResponse.php: -------------------------------------------------------------------------------- 1 | setAccount($data['account'] ?? null); 17 | } 18 | 19 | /** 20 | * @return Account|null 21 | */ 22 | public function getAccount(): ?Account 23 | { 24 | return $this->account; 25 | } 26 | 27 | /** 28 | * @param Account|array|null $account 29 | * @return AccountResponse 30 | */ 31 | public function setAccount($account): AccountResponse 32 | { 33 | if (is_array($account)) { 34 | $this->account = new Account($account); 35 | } else { 36 | $this->account = $account; 37 | } 38 | 39 | return $this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/Model/AddIpRequest.php: -------------------------------------------------------------------------------- 1 | setIpAddress($data['ip_address'] ?? null); 24 | } 25 | 26 | /** 27 | * @return IpAddress|null 28 | */ 29 | public function getIpAddress(): ?IpAddress 30 | { 31 | return $this->ipAddress; 32 | } 33 | 34 | /** 35 | * @param IpAddress|array|null $ipAddress 36 | * @return AddIpRequest 37 | */ 38 | public function setIpAddress($ipAddress): AddIpRequest 39 | { 40 | if (is_array($ipAddress)) { 41 | $this->ipAddress = new IpAddress($ipAddress); 42 | } else { 43 | $this->ipAddress = $ipAddress; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/Model/AssignIpResponse.php: -------------------------------------------------------------------------------- 1 | setIpAddress($data['ip_address'] ?? null); 21 | } 22 | 23 | /** 24 | * @return IpAddress|null 25 | */ 26 | public function getIpAddress(): ?IpAddress 27 | { 28 | return $this->ipAddress; 29 | } 30 | 31 | /** 32 | * @param IpAddress|array|null $ipAddress 33 | * @return AssignIpResponse 34 | */ 35 | public function setIpAddress($ipAddress): AssignIpResponse 36 | { 37 | if (is_array($ipAddress)) { 38 | $this->ipAddress = new IpAddress($ipAddress); 39 | } else { 40 | $this->ipAddress = $ipAddress; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/AttachNetwork.php: -------------------------------------------------------------------------------- 1 | setNetwork($data['network'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getNetwork(): ?array 27 | { 28 | return $this->network; 29 | } 30 | 31 | /** 32 | * @param string[]|null $network 33 | * @return AttachNetwork 34 | */ 35 | public function setNetwork(?array $network): AttachNetwork 36 | { 37 | $this->network = $network; 38 | 39 | return $this; 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /lib/Model/AttachStorageDeviceRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'title', 'size', 'tier', 'action', 'partOfPlan', 'storageSize', 'storageTitle' 16 | ] 17 | ]); 18 | } 19 | } 20 | 21 | 22 | -------------------------------------------------------------------------------- /lib/Model/AvailablePlanListResponse.php: -------------------------------------------------------------------------------- 1 | setPlans($data['plans'] ?? null); 21 | } 22 | 23 | /** 24 | * @return AvailablePlanListResponsePlans|null 25 | */ 26 | public function getPlans(): ?AvailablePlanListResponsePlans 27 | { 28 | return $this->plans; 29 | } 30 | 31 | /** 32 | * @param AvailablePlanListResponsePlans|array|null $plans 33 | * @return AvailablePlanListResponse 34 | */ 35 | public function setPlans($plans): AvailablePlanListResponse 36 | { 37 | if (is_array($plans)) { 38 | $this->plans = new AvailablePlanListResponsePlans($plans); 39 | } else { 40 | $this->plans = $plans; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/AvailablePlanListResponsePlans.php: -------------------------------------------------------------------------------- 1 | setPlan($data['plan'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Plan[]|null 25 | */ 26 | public function getPlan(): ?array 27 | { 28 | return $this->plan; 29 | } 30 | 31 | /** 32 | * @param Plan[]|null $plan 33 | * @return AvailablePlanListResponsePlans 34 | */ 35 | public function setPlan(?array $plan): AvailablePlanListResponsePlans 36 | { 37 | if (is_array($plan)) { 38 | foreach ($plan as $item) { 39 | $this->plan[] = $item instanceof Plan 40 | ? $item 41 | : new Plan($item); 42 | } 43 | } else { 44 | $this->plan = $plan; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/CloneStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 15 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 16 | 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', 17 | 'type', 'uuid', 'origin', 'created' 18 | ] 19 | ]); 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/Model/ConfigurationListResponse.php: -------------------------------------------------------------------------------- 1 | serverSizes = $data['server_sizes'] ?? null; 21 | } 22 | 23 | /** 24 | * @return ConfigurationListResponseServerSizes|null 25 | */ 26 | public function getServerSizes(): ?ConfigurationListResponseServerSizes 27 | { 28 | return $this->serverSizes; 29 | } 30 | 31 | /** 32 | * @param ConfigurationListResponseServerSizes|array|null $serverSizes 33 | * @return ConfigurationListResponse 34 | */ 35 | public function setServerSizes($serverSizes): ConfigurationListResponse 36 | { 37 | if (is_array($serverSizes)) { 38 | $this->serverSizes = new ConfigurationListResponseServerSizes($serverSizes); 39 | } else { 40 | $this->serverSizes = $serverSizes; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/ConfigurationListResponseServerSizes.php: -------------------------------------------------------------------------------- 1 | setServerSize($data['server_size'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ServerSize[]|null 25 | */ 26 | public function getServerSize(): ?array 27 | { 28 | return $this->serverSize; 29 | } 30 | 31 | /** 32 | * @param ServerSize[]|array|null $serverSize 33 | * @return ConfigurationListResponseServerSizes 34 | */ 35 | public function setServerSize(?array $serverSize): ConfigurationListResponseServerSizes 36 | { 37 | if (is_array($serverSize)) { 38 | foreach ($serverSize as $item) { 39 | $this->serverSize[] = $item instanceof ServerSize 40 | ? $item 41 | : new ServerSize($item); 42 | } 43 | } else { 44 | $this->serverSize = $serverSize; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/CreateBackupStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 15 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 16 | 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', 17 | 'tier', 'type', 'uuid', 'zone', 'origin', 'created' 18 | ] 19 | ]); 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/Model/CreateNetworkInterfaceRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'mac' 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/CreateNetworkRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'type', 'uuid', 'servers', 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/CreateNewTagResponse.php: -------------------------------------------------------------------------------- 1 | setTag($data['tag'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Tag|null 25 | */ 26 | public function getTag(): ?Tag 27 | { 28 | return $this->tag; 29 | } 30 | 31 | /** 32 | * @param Tag|array|null $tag 33 | * @return CreateNewTagResponse 34 | */ 35 | public function setTag($tag): CreateNewTagResponse 36 | { 37 | if (is_array($tag)) { 38 | $this->tag = new Tag($tag); 39 | } else { 40 | $this->tag = $tag; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/CreateObjectStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'uuid', 'state', 'url', 'created', 'used_space' 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/CreateServerRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | // 'networking', 'ipAddresses', 16 | 'license', 'planIpv4Bytes', 'planIpv6Bytes', 'state', 'tags', 'uuid' 17 | ] 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/Model/CreateServerResponse.php: -------------------------------------------------------------------------------- 1 | setServer($data['server'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Server|null 25 | */ 26 | public function getServer(): ?Server 27 | { 28 | return $this->server; 29 | } 30 | 31 | /** 32 | * @param Server|array|null $server 33 | * @return CreateServerResponse 34 | */ 35 | public function setServer($server): CreateServerResponse 36 | { 37 | if (is_array($server)) { 38 | $this->server = new Server($server); 39 | } else { 40 | $this->server = $server; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/Model/CreateStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 15 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 16 | 'access', 'backups', 'license', 'servers', 'state', 17 | 'type', 'uuid', 'origin', 'created' 18 | ] 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/Model/CreateStorageResponse.php: -------------------------------------------------------------------------------- 1 | setStorage($data['storage'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Storage|null 25 | */ 26 | public function getStorage(): ?Storage 27 | { 28 | return $this->storage; 29 | } 30 | 31 | /** 32 | * @param Storage|array|null $storage 33 | * @return CreateStorageResponse 34 | */ 35 | public function setStorage($storage): CreateStorageResponse 36 | { 37 | if (is_array($storage)) { 38 | $this->storage = new Storage($storage); 39 | } else { 40 | $this->storage = $storage; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/Error.php: -------------------------------------------------------------------------------- 1 | setError($data['error'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ErrorError|null 25 | */ 26 | public function getError(): ?ErrorError 27 | { 28 | return $this->error; 29 | } 30 | 31 | /** 32 | * @param ErrorError|array|null $error 33 | * @return Error 34 | */ 35 | public function setError($error): Error 36 | { 37 | if (is_array($error)) { 38 | $this->error = new ErrorError($error); 39 | } else { 40 | $this->error = $error; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/ErrorError.php: -------------------------------------------------------------------------------- 1 | setErrorCode($data['error_code'] ?? null); 29 | $this->setErrorStatus($data['error_status'] ?? null); 30 | } 31 | 32 | /** 33 | * @return string|null 34 | */ 35 | public function getErrorCode(): ?string 36 | { 37 | return $this->errorCode; 38 | } 39 | 40 | /** 41 | * @param string|null $errorCode 42 | * @return ErrorError 43 | */ 44 | public function setErrorCode(?string $errorCode): ErrorError 45 | { 46 | if (!is_null($errorCode)) { 47 | Assert::oneOf($errorCode, ErrorCode::getAllowableEnumValues()); 48 | } 49 | 50 | $this->errorCode = $errorCode; 51 | 52 | return $this; 53 | } 54 | 55 | /** 56 | * @return string|null 57 | */ 58 | public function getErrorStatus(): ?string 59 | { 60 | return $this->errorStatus; 61 | } 62 | 63 | /** 64 | * @param string|null $errorStatus 65 | * @return ErrorError 66 | */ 67 | public function setErrorStatus(?string $errorStatus): ErrorError 68 | { 69 | if (!is_null($errorStatus)) { 70 | Assert::oneOf($errorStatus, ErrorStatus::getAllowableEnumValues()); 71 | } 72 | 73 | $this->errorStatus = $errorStatus; 74 | 75 | return $this; 76 | } 77 | } 78 | 79 | 80 | -------------------------------------------------------------------------------- /lib/Model/ErrorStatus.php: -------------------------------------------------------------------------------- 1 | setFirewallRule($data['firewall_rule'] ?? null); 21 | } 22 | 23 | /** 24 | * @return FirewallRule|null 25 | */ 26 | public function getFirewallRule(): ?FirewallRule 27 | { 28 | return $this->firewallRule; 29 | } 30 | 31 | /** 32 | * @param FirewallRule|array|null $firewallRule 33 | * @return FirewallRuleCreateResponse 34 | */ 35 | public function setFirewallRule($firewallRule): FirewallRuleCreateResponse 36 | { 37 | if (is_array($firewallRule)) { 38 | $this->firewallRule = new FirewallRule($firewallRule); 39 | } else { 40 | $this->firewallRule = $firewallRule; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/Model/FirewallRuleListResponse.php: -------------------------------------------------------------------------------- 1 | firewallRules = $data['firewall_rules'] ?? null; 21 | } 22 | 23 | /** 24 | * @return FirewallRuleListResponseFirewallRules|null 25 | */ 26 | public function getFirewallRules(): ?FirewallRuleListResponseFirewallRules 27 | { 28 | return $this->firewallRules; 29 | } 30 | 31 | /** 32 | * @param FirewallRuleListResponseFirewallRules|array|null $firewallRules 33 | * @return FirewallRuleListResponse 34 | */ 35 | public function setFirewallRules($firewallRules): FirewallRuleListResponse 36 | { 37 | if (is_array($firewallRules)) { 38 | $this->firewallRules = new FirewallRuleListResponseFirewallRules($firewallRules); 39 | } else { 40 | $this->firewallRules = $firewallRules; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/FirewallRuleListResponseFirewallRules.php: -------------------------------------------------------------------------------- 1 | setFirewallRule($data['firewall_rule'] ?? null); 21 | } 22 | 23 | /** 24 | * @return FirewallRule[]|null 25 | */ 26 | public function getFirewallRule(): ?array 27 | { 28 | return $this->firewallRule; 29 | } 30 | 31 | /** 32 | * @param FirewallRule[]|array|null $firewallRule 33 | * @return FirewallRuleListResponseFirewallRules 34 | */ 35 | public function setFirewallRule(?array $firewallRule): FirewallRuleListResponseFirewallRules 36 | { 37 | if (is_array($firewallRule)) { 38 | foreach ($firewallRule as $item) { 39 | $this->firewallRule[] = $item instanceof FirewallRule 40 | ? $item 41 | : new FirewallRule($item); 42 | } 43 | } else { 44 | $this->firewallRule = $firewallRule; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/Model/FirewallRuleRequest.php: -------------------------------------------------------------------------------- 1 | setFirewallRule($data['firewall_rule'] ?? null); 24 | } 25 | 26 | /** 27 | * @return FirewallRule|null 28 | */ 29 | public function getFirewallRule(): ?FirewallRule 30 | { 31 | return $this->firewallRule; 32 | } 33 | 34 | /** 35 | * @param FirewallRule|array|null $firewallRule 36 | * @return FirewallRuleRequest 37 | */ 38 | public function setFirewallRule($firewallRule): FirewallRuleRequest 39 | { 40 | if (is_array($firewallRule)) { 41 | $this->firewallRule = new FirewallRule($firewallRule); 42 | } else { 43 | $this->firewallRule = $firewallRule; 44 | } 45 | 46 | return $this; 47 | } 48 | 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/Model/FirewallRulesRequest.php: -------------------------------------------------------------------------------- 1 | [] 16 | ]; 17 | 18 | /** 19 | * Constructor 20 | * @param mixed[] $data 21 | */ 22 | public function __construct(array $data = null) 23 | { 24 | parent::__construct(); 25 | $this->setFirewallRules($data['firewall_rules'] ?? []); 26 | } 27 | 28 | /** 29 | * @return FirewallRule[] 30 | */ 31 | public function getFirewallRules(): array 32 | { 33 | return $this->firewallRules; 34 | } 35 | 36 | /** 37 | * @param FirewallRule[] $firewallRules 38 | * @return FirewallRulesRequest 39 | */ 40 | public function setFirewallRules(array $firewallRules): FirewallRulesRequest 41 | { 42 | $this->firewallRules['firewall_rule'] = $firewallRules; 43 | 44 | return $this; 45 | } 46 | } -------------------------------------------------------------------------------- /lib/Model/HostListResponse.php: -------------------------------------------------------------------------------- 1 | setHosts($data['hosts'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Hosts|null 25 | */ 26 | public function getHosts(): ?Hosts 27 | { 28 | return $this->hosts; 29 | } 30 | 31 | /** 32 | * @param Hosts|array|null $hosts 33 | * @return HostListResponse 34 | */ 35 | public function setHosts($hosts): HostListResponse 36 | { 37 | if (is_array($hosts)) { 38 | $this->hosts = new Hosts($hosts); 39 | } else { 40 | $this->hosts = $hosts; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/Model/HostResponse.php: -------------------------------------------------------------------------------- 1 | setHost($data['host'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Host|null 25 | */ 26 | public function getHost(): ?Host 27 | { 28 | return $this->host; 29 | } 30 | 31 | /** 32 | * @param Host|array|null $host 33 | * @return HostResponse 34 | */ 35 | public function setHost($host): HostResponse 36 | { 37 | if (is_array($host)) { 38 | $this->host =new Host($host); 39 | } else { 40 | $this->host = $host; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /lib/Model/Hosts.php: -------------------------------------------------------------------------------- 1 | setHost($data['host'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Host[]|null 25 | */ 26 | public function getHost(): ?array 27 | { 28 | return $this->host; 29 | } 30 | 31 | /** 32 | * @param Host[]|array|null $host 33 | * @return Hosts 34 | */ 35 | public function setHost(?array $host): Hosts 36 | { 37 | if (is_array($host)) { 38 | foreach ($host as $item) { 39 | $this->host[] = $item instanceof Host 40 | ? $item 41 | : new Host($item); 42 | } 43 | } else { 44 | $this->host = $host; 45 | } 46 | 47 | return $this; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /lib/Model/IpAddressListResponse.php: -------------------------------------------------------------------------------- 1 | setIpAddresses($data['ip_addresses'] ?? null); 21 | } 22 | 23 | /** 24 | * @return IpAddresses|null 25 | */ 26 | public function getIpAddresses(): ?IpAddresses 27 | { 28 | return $this->ipAddresses; 29 | } 30 | 31 | /** 32 | * @param IpAddresses|array|null $ipAddresses 33 | * 34 | * @return IpAddressListResponse 35 | */ 36 | public function setIpAddresses($ipAddresses): IpAddressListResponse 37 | { 38 | if (is_array($ipAddresses)) { 39 | $this->ipAddresses = new IpAddresses($ipAddresses); 40 | } else { 41 | $this->ipAddresses = $ipAddresses; 42 | } 43 | 44 | return $this; 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/IpAddresses.php: -------------------------------------------------------------------------------- 1 | setIpAddress($data['ip_address'] ?? null); 21 | } 22 | 23 | /** 24 | * @return IpAddress[]|null 25 | */ 26 | public function getIpAddress(): ?array 27 | { 28 | return $this->ipAddress; 29 | } 30 | 31 | /** 32 | * @param IpAddress[]|null $ipAddress 33 | * 34 | * @return IpAddresses 35 | */ 36 | public function setIpAddress(?array $ipAddress): IpAddresses 37 | { 38 | if (is_array($ipAddress)) { 39 | foreach ($ipAddress as $address) { 40 | $this->ipAddress[] = $address instanceof IpAddress 41 | ? $address 42 | : new IpAddress($address); 43 | } 44 | } else { 45 | $this->ipAddress = $ipAddress; 46 | } 47 | 48 | return $this; 49 | } 50 | 51 | 52 | } 53 | 54 | 55 | -------------------------------------------------------------------------------- /lib/Model/IpNetworks.php: -------------------------------------------------------------------------------- 1 | setIpNetwork($data['ip_network'] ?? null); 21 | } 22 | 23 | /** 24 | * @return IpNetwork[]|null 25 | */ 26 | public function getIpNetwork(): ?array 27 | { 28 | return $this->ipNetwork; 29 | } 30 | 31 | /** 32 | * @param IpNetwork[]|null $ipNetwork 33 | * @return IpNetworks 34 | */ 35 | public function setIpNetwork(?array $ipNetwork): IpNetworks 36 | { 37 | if (is_array($ipNetwork)) { 38 | foreach ($ipNetwork as $item) { 39 | $this->ipNetwork[] = $item instanceof IpNetwork 40 | ? $item 41 | : new IpNetwork($item); 42 | } 43 | } else { 44 | $this->ipNetwork = $ipNetwork; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/ModifyHostRequest.php: -------------------------------------------------------------------------------- 1 | setHost($data['host'] ?? null); 25 | } 26 | 27 | /** 28 | * @return Host|null 29 | */ 30 | public function getHost(): ?Host 31 | { 32 | return $this->host; 33 | } 34 | 35 | /** 36 | * @param Host|array|null $host 37 | * @return ModifyHostRequest 38 | */ 39 | public function setHost($host): ModifyHostRequest 40 | { 41 | if (is_array($host)) { 42 | $this->host = new Host($host); 43 | } else { 44 | $this->host = $host; 45 | } 46 | 47 | return $this; 48 | } 49 | 50 | public function __toString() 51 | { 52 | return $this->serializer->serialize($this, 'json', [ 53 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 54 | 'id', 'zone', 'windows_enabled', 'stats' 55 | ] 56 | ]); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/Model/ModifyIpRequest.php: -------------------------------------------------------------------------------- 1 | setIpAddress($data['ip_address'] ?? null); 25 | } 26 | 27 | /** 28 | * @return IpAddress|null 29 | */ 30 | public function getIpAddress(): ?IpAddress 31 | { 32 | return $this->ipAddress; 33 | } 34 | 35 | /** 36 | * @param IpAddress|array|null $ipAddress 37 | * @return ModifyIpRequest 38 | */ 39 | public function setIpAddress($ipAddress): ModifyIpRequest 40 | { 41 | if (is_array($ipAddress)) { 42 | $this->ipAddress = new IpAddress($ipAddress); 43 | } else { 44 | $this->ipAddress = $ipAddress; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/Model/ModifyNetworkInterfaceRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'network', 'type', 'mac' 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/ModifyNetworkRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'type', 'uuid', 'servers', 'zone', 'address' 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/ModifyObjectStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'uuid', 'name', 'zone', 'state', 'url', 'created', 'usedSpace' 16 | ] 17 | ]); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /lib/Model/ModifyServerRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'avoidHost', 'host', 'networking', 'loginUser', 'ipAddresses', 'license', 'metadata', 16 | 'passwordDelivery', 'planIpv4Bytes', 'planIpv6Bytes', 'state', 'storageDevices', 17 | 'tags', 'uuid', 'userData', 'zone' 18 | ] 19 | ]); 20 | } 21 | } 22 | 23 | 24 | -------------------------------------------------------------------------------- /lib/Model/ModifyStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'access', 'backups', 'license', 'servers', 'state', 16 | 'tier', 'type', 'uuid', 'zone', 'origin', 'created' 17 | ] 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/Model/ModifyTagRequest.php: -------------------------------------------------------------------------------- 1 | tag = $data['tag'] ?? null; 25 | } 26 | 27 | /** 28 | * @return Tag|null 29 | */ 30 | public function getTag(): ?Tag 31 | { 32 | return $this->tag; 33 | } 34 | 35 | /** 36 | * @param Tag|array|null $tag 37 | * @return ModifyTagRequest 38 | */ 39 | public function setTag($tag): ModifyTagRequest 40 | { 41 | if (is_array($tag)) { 42 | $this->tag = new Tag($tag); 43 | } else { 44 | $this->tag = $tag; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/NetworkInterfaceList.php: -------------------------------------------------------------------------------- 1 | setInterfaces($data['interfaces'] ?? null); 21 | } 22 | 23 | /** 24 | * @return NetworkInterfaces|null 25 | */ 26 | public function getInterfaces(): ?NetworkInterfaces 27 | { 28 | return $this->interfaces; 29 | } 30 | 31 | /** 32 | * @param NetworkInterfaces|array|null $interfaces 33 | * @return NetworkInterfaceList 34 | */ 35 | public function setInterfaces($interfaces): NetworkInterfaceList 36 | { 37 | if (is_array($interfaces)) { 38 | $this->interfaces = new NetworkInterfaces($interfaces); 39 | } else { 40 | $this->interfaces = $interfaces; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/Model/NetworkInterfaceRequest.php: -------------------------------------------------------------------------------- 1 | setInterface($data['interface'] ?? null); 24 | } 25 | 26 | /** 27 | * @return NetworkInterface|null 28 | */ 29 | public function getInterface(): ?NetworkInterface 30 | { 31 | return $this->interface; 32 | } 33 | 34 | /** 35 | * @param NetworkInterface|array|null $interface 36 | * @return NetworkInterfaceRequest 37 | */ 38 | public function setInterface(?array $interface): NetworkInterfaceRequest 39 | { 40 | if (is_array($interface)) { 41 | $this->interface = new NetworkInterface($interface); 42 | } else { 43 | $this->interface = $interface; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/NetworkInterfaceResponse.php: -------------------------------------------------------------------------------- 1 | setInterface($data['interface'] ?? null); 21 | } 22 | 23 | /** 24 | * @return NetworkInterface|null 25 | */ 26 | public function getInterface(): ?array 27 | { 28 | return $this->interface; 29 | } 30 | 31 | /** 32 | * @param NetworkInterface|array|null $interface 33 | * @return NetworkInterfaceResponse 34 | */ 35 | public function setInterface(?array $interface): NetworkInterfaceResponse 36 | { 37 | if (is_array($interface)) { 38 | $this->interface[] = $interface instanceof NetworkInterface 39 | ? $interface 40 | : new NetworkInterface($interface); 41 | } else { 42 | $this->interface = $interface; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/Model/NetworkInterfaces.php: -------------------------------------------------------------------------------- 1 | setInterface($data['interface'] ?? null); 21 | } 22 | 23 | /** 24 | * @return NetworkInterface[]|null 25 | */ 26 | public function getInterface(): ?array 27 | { 28 | return $this->interface; 29 | } 30 | 31 | /** 32 | * @param NetworkInterface[]|null $interface 33 | * @return NetworkInterfaces 34 | */ 35 | public function setInterface(?array $interface): NetworkInterfaces 36 | { 37 | if (is_array($interface)) { 38 | foreach ($interface as $item) { 39 | $this->interface[] = $item instanceof NetworkInterface ? $item : new NetworkInterface($item); 40 | } 41 | } else { 42 | $this->interface = $interface; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/Model/NetworkRequest.php: -------------------------------------------------------------------------------- 1 | setNetwork($data['network'] ?? null); 24 | } 25 | 26 | /** 27 | * @return Network|null 28 | */ 29 | public function getNetwork(): ?Network 30 | { 31 | return $this->network; 32 | } 33 | 34 | /** 35 | * @param Network|array|null $network 36 | * @return NetworkRequest 37 | */ 38 | public function setNetwork($network): NetworkRequest 39 | { 40 | if (is_array($network)) { 41 | $this->network = new Network($network); 42 | } else { 43 | $this->network = $network; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/NetworkResponse.php: -------------------------------------------------------------------------------- 1 | setNetwork($data['network'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Network|null 25 | */ 26 | public function getNetwork(): ?Network 27 | { 28 | return $this->network; 29 | } 30 | 31 | /** 32 | * @param Network|array|null $network 33 | * @return NetworkResponse 34 | */ 35 | public function setNetwork($network): NetworkResponse 36 | { 37 | if (is_array($network)) { 38 | $this->network = new Network($network); 39 | } else { 40 | $this->network = $network; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/Networks.php: -------------------------------------------------------------------------------- 1 | setNetwork($data['network'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Network[]|null 25 | */ 26 | public function getNetwork(): ?array 27 | { 28 | return $this->network; 29 | } 30 | 31 | /** 32 | * @param Network[]|null $network 33 | * @return Networks 34 | */ 35 | public function setNetwork(?array $network): Networks 36 | { 37 | if (is_array($network)) { 38 | foreach ($network as $item) { 39 | $this->network[] = $item instanceof Network 40 | ? $item 41 | : new Network($item); 42 | } 43 | } else { 44 | $this->network = $network; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/NetworksListResponse.php: -------------------------------------------------------------------------------- 1 | setNetworks($data['networks'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Networks|null 25 | */ 26 | public function getNetworks(): ?Networks 27 | { 28 | return $this->networks; 29 | } 30 | 31 | /** 32 | * @param Networks|array|null $networks 33 | * @return NetworksListResponse 34 | */ 35 | public function setNetworks($networks): NetworksListResponse 36 | { 37 | 38 | if (is_array($networks)) { 39 | $this->networks = new Networks($networks); 40 | } else { 41 | $this->networks = $networks; 42 | } 43 | 44 | return $this; 45 | } 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/ObjectStorageListResponse.php: -------------------------------------------------------------------------------- 1 | setObjectStorages($data['object_storages'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ObjectStorages|null 25 | */ 26 | public function getObjectStorages(): ?ObjectStorages 27 | { 28 | return $this->objectStorages; 29 | } 30 | 31 | /** 32 | * @param ObjectStorages|array|null $objectStorages 33 | * @return ObjectStorageListResponse 34 | */ 35 | public function setObjectStorages($objectStorages): ObjectStorageListResponse 36 | { 37 | if (is_array($objectStorages)) { 38 | $this->objectStorages = new ObjectStorages($objectStorages); 39 | } else { 40 | $this->objectStorages = $objectStorages; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | -------------------------------------------------------------------------------- /lib/Model/ObjectStorageRequest.php: -------------------------------------------------------------------------------- 1 | setObjectStorage($data['object_storage'] ?? null); 24 | } 25 | 26 | /** 27 | * @return ObjectStorage|null 28 | */ 29 | public function getObjectStorage(): ?ObjectStorage 30 | { 31 | return $this->objectStorage; 32 | } 33 | 34 | /** 35 | * @param ObjectStorage|array|null $objectStorage 36 | * @return $this 37 | */ 38 | public function setObjectStorage($objectStorage): self 39 | { 40 | if (is_array($objectStorage)) { 41 | $this->objectStorage = new ObjectStorage($objectStorage); 42 | } else { 43 | $this->objectStorage = $objectStorage; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/ObjectStorageResponse.php: -------------------------------------------------------------------------------- 1 | setObjectStorage($data['object_storage'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ObjectStorage|null 25 | */ 26 | public function getObjectStorage(): ?ObjectStorage 27 | { 28 | return $this->objectStorage; 29 | } 30 | 31 | /** 32 | * @param ObjectStorage|array|null $objectStorage 33 | * @return ObjectStorageResponse 34 | */ 35 | public function setObjectStorage($objectStorage): ObjectStorageResponse 36 | { 37 | if (is_array($objectStorage)) { 38 | $this->objectStorage =new ObjectStorage($objectStorage); 39 | } else { 40 | $this->objectStorage = $objectStorage; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /lib/Model/ObjectStorages.php: -------------------------------------------------------------------------------- 1 | setObjectStorage($data['object_storage'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ObjectStorage[]|null 25 | */ 26 | public function getObjectStorage(): ?array 27 | { 28 | return $this->objectStorage; 29 | } 30 | 31 | /** 32 | * @param ObjectStorage[]|array|null $objectStorage 33 | * @return ObjectStorages 34 | */ 35 | public function setObjectStorage(?array $objectStorage): ObjectStorages 36 | { 37 | if (is_array($objectStorage)) { 38 | foreach ($objectStorage as $item) { 39 | $this->objectStorage[] = $item instanceof ObjectStorage ? $item : new ObjectStorage($item); 40 | } 41 | } else { 42 | $this->objectStorage = $objectStorage; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /lib/Model/Price.php: -------------------------------------------------------------------------------- 1 | setAmount($data['amount'] ?? null); 26 | $this->setPrice($data['price'] ?? null); 27 | } 28 | 29 | /** 30 | * @return float|null 31 | */ 32 | public function getAmount(): ?float 33 | { 34 | return $this->amount; 35 | } 36 | 37 | /** 38 | * @param float|null $amount 39 | * @return Price 40 | */ 41 | public function setAmount(?float $amount): Price 42 | { 43 | $this->amount = $amount; 44 | 45 | return $this; 46 | } 47 | 48 | /** 49 | * @return float|null 50 | */ 51 | public function getPrice(): ?float 52 | { 53 | return $this->price; 54 | } 55 | 56 | /** 57 | * @param float|null $price 58 | * @return Price 59 | */ 60 | public function setPrice(?float $price): Price 61 | { 62 | $this->price = $price; 63 | 64 | return $this; 65 | } 66 | } 67 | 68 | 69 | -------------------------------------------------------------------------------- /lib/Model/PriceListResponse.php: -------------------------------------------------------------------------------- 1 | setPrices($data['prices'] ?? null); 21 | } 22 | 23 | /** 24 | * @return PriceListResponsePrices|null 25 | */ 26 | public function getPrices(): ?PriceListResponsePrices 27 | { 28 | return $this->prices; 29 | } 30 | 31 | /** 32 | * @param PriceListResponsePrices|array|null $prices 33 | * @return PriceListResponse 34 | */ 35 | public function setPrices($prices): PriceListResponse 36 | { 37 | if (is_array($prices)) { 38 | $this->prices = new PriceListResponsePrices($prices); 39 | } else { 40 | $this->prices = $prices; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/PriceListResponsePrices.php: -------------------------------------------------------------------------------- 1 | setZone($data['zone'] ?? null); 21 | } 22 | 23 | /** 24 | * @return PriceZone[]|null 25 | */ 26 | public function getZone(): ?array 27 | { 28 | return $this->zone; 29 | } 30 | 31 | /** 32 | * @param PriceZone[]|null $zone 33 | * @return PriceListResponsePrices 34 | */ 35 | public function setZone(?array $zone): PriceListResponsePrices 36 | { 37 | if (is_array($zone)) { 38 | foreach ($zone as $item) { 39 | $this->zone[] = $item instanceof PriceZone 40 | ? $item 41 | : new PriceZone($item); 42 | } 43 | } else { 44 | $this->zone = $zone; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/Model/RestartServer.php: -------------------------------------------------------------------------------- 1 | restartServer = $data['restart_server'] ?? 24 | new RestartServerRequest; 25 | } 26 | 27 | /** 28 | * @return RestartServerRequest 29 | */ 30 | public function getRestartServer(): RestartServerRequest 31 | { 32 | return $this->restartServer; 33 | } 34 | 35 | /** 36 | * @param RestartServerRequest|array $restartServer 37 | * @return RestartServer 38 | */ 39 | public function setRestartServer($restartServer): RestartServer 40 | { 41 | if (is_array($restartServer)) { 42 | $this->restartServer = new RestartServerRequest($restartServer); 43 | } else { 44 | $this->restartServer = $restartServer; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | 51 | 52 | -------------------------------------------------------------------------------- /lib/Model/RouterRequest.php: -------------------------------------------------------------------------------- 1 | setRouter($data['router'] ?? null); 25 | } 26 | 27 | /** 28 | * @return Router|null 29 | */ 30 | public function getRouter(): ?Router 31 | { 32 | return $this->router; 33 | } 34 | 35 | /** 36 | * @param Router|array|null $router 37 | * @return RouterRequest 38 | */ 39 | public function setRouter($router): RouterRequest 40 | { 41 | if (is_array($router)) { 42 | $this->router = new Router($router); 43 | } else { 44 | $this->router = $router; 45 | } 46 | 47 | return $this; 48 | } 49 | 50 | public function __toString() 51 | { 52 | return $this->serializer->serialize($this, 'json', [ 53 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 54 | 'attachedNetworks', 'uuid', 'type', 55 | ] 56 | ]); 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /lib/Model/RouterResponse.php: -------------------------------------------------------------------------------- 1 | setRouter($data['router'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Router|null 25 | */ 26 | public function getRouter(): ?Router 27 | { 28 | return $this->router; 29 | } 30 | 31 | /** 32 | * @param Router|array|null $router 33 | * @return RouterResponse 34 | */ 35 | public function setRouter($router): RouterResponse 36 | { 37 | if (is_array($router)) { 38 | $this->router = new Router($router); 39 | } else { 40 | $this->router = $router; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/Routers.php: -------------------------------------------------------------------------------- 1 | setRouter($data['router'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Router[]|null 25 | */ 26 | public function getRouter(): ?array 27 | { 28 | return $this->router; 29 | } 30 | 31 | /** 32 | * @param Router[]|null $router 33 | * @return Routers 34 | */ 35 | public function setRouter(?array $router): Routers 36 | { 37 | if (is_array($router)) { 38 | foreach ($router as $item) { 39 | $this->router[] = $item instanceof Router 40 | ? $item 41 | : new Router($item); 42 | } 43 | } else { 44 | $this->router = $router; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/RoutersListResponse.php: -------------------------------------------------------------------------------- 1 | setRouters($data['routers'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Routers|null 25 | */ 26 | public function getRouters(): ?Routers 27 | { 28 | return $this->routers; 29 | } 30 | 31 | /** 32 | * @param Routers|array|null $routers 33 | * @return RoutersListResponse 34 | */ 35 | public function setRouters($routers): RoutersListResponse 36 | { 37 | if (is_array($routers)) { 38 | $this->routers = new Routers($routers); 39 | } else { 40 | $this->routers = $routers; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/ServerListResponse.php: -------------------------------------------------------------------------------- 1 | servers = $data['servers'] ?? null; 22 | } 23 | 24 | /** 25 | * @return ServerListResponseServers|null 26 | */ 27 | public function getServers(): ?ServerListResponseServers 28 | { 29 | return $this->servers; 30 | } 31 | 32 | /** 33 | * @param ServerListResponseServers|array|null $servers 34 | * @return ServerListResponse 35 | */ 36 | public function setServers($servers): ServerListResponse 37 | { 38 | if (is_array($servers)) { 39 | $this->servers = new ServerListResponseServers($servers); 40 | } else { 41 | $this->servers = $servers; 42 | } 43 | 44 | return $this; 45 | } 46 | 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/ServerListResponseServers.php: -------------------------------------------------------------------------------- 1 | setServer($data['server'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Server[]|null 25 | */ 26 | public function getServer(): ?array 27 | { 28 | return $this->server; 29 | } 30 | 31 | /** 32 | * @param Server[]|null $server 33 | * @return ServerListResponseServers 34 | */ 35 | public function setServer(?array $server): ServerListResponseServers 36 | { 37 | if (is_array($server)) { 38 | foreach ($server as $item) { 39 | $this->server[] = $item instanceof Server ? $item : new Server($item); 40 | } 41 | } else { 42 | $this->server = $server; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/ServerNetworksListResponse.php: -------------------------------------------------------------------------------- 1 | setNetworking($data['networking'] ?? null); 21 | } 22 | 23 | /** 24 | * @return NetworkInterfaceList|null 25 | */ 26 | public function getNetworking(): ?NetworkInterfaceList 27 | { 28 | return $this->networking; 29 | } 30 | 31 | /** 32 | * @param NetworkInterfaceList|array|null $networking 33 | * @return ServerNetworksListResponse 34 | */ 35 | public function setNetworking($networking): ServerNetworksListResponse 36 | { 37 | if (is_array($networking)) { 38 | $this->networking = new NetworkInterfaceList($networking); 39 | } else { 40 | $this->networking = $networking; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/ServerRequest.php: -------------------------------------------------------------------------------- 1 | setServer($data['server'] ?? null); 24 | } 25 | 26 | /** 27 | * @return Server|null 28 | */ 29 | public function getServer(): ?Server 30 | { 31 | return $this->server; 32 | } 33 | 34 | /** 35 | * @param Server|array|null $server 36 | * @return $this 37 | */ 38 | public function setServer($server): self 39 | { 40 | if (is_array($server)) { 41 | $this->server = new Server($server); 42 | } else { 43 | $this->server = $server; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/ServerSize.php: -------------------------------------------------------------------------------- 1 | setCoreNumber($data['core_number'] ?? null); 26 | $this->setMemoryAmount($data['memory_amount'] ?? null); 27 | } 28 | 29 | /** 30 | * @return float|string|null 31 | */ 32 | public function getCoreNumber() 33 | { 34 | return $this->coreNumber; 35 | } 36 | 37 | /** 38 | * @param float|string|null $coreNumber 39 | * @return ServerSize 40 | */ 41 | public function setCoreNumber($coreNumber): ServerSize 42 | { 43 | $this->coreNumber = $coreNumber; 44 | 45 | return $this; 46 | } 47 | 48 | /** 49 | * @return float|string|null 50 | */ 51 | public function getMemoryAmount() 52 | { 53 | return $this->memoryAmount; 54 | } 55 | 56 | /** 57 | * @param float|string|null $memoryAmount 58 | * @return ServerSize 59 | */ 60 | public function setMemoryAmount($memoryAmount): ServerSize 61 | { 62 | $this->memoryAmount = $memoryAmount; 63 | 64 | return $this; 65 | } 66 | 67 | } 68 | 69 | 70 | -------------------------------------------------------------------------------- /lib/Model/ServerSshKey.php: -------------------------------------------------------------------------------- 1 | setSshKey($data['ssh_key'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getSshKey(): ?array 27 | { 28 | return $this->sshKey; 29 | } 30 | 31 | /** 32 | * @param string[]|null $sshKey 33 | * @return ServerSshKey 34 | */ 35 | public function setSshKey(?array $sshKey): ServerSshKey 36 | { 37 | if (is_array($sshKey)) { 38 | foreach ($sshKey as $item) { 39 | $this->sshKey[] = $item; 40 | } 41 | } else { 42 | $this->sshKey = $sshKey; 43 | } 44 | 45 | return $this; 46 | } 47 | 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/ServerState.php: -------------------------------------------------------------------------------- 1 | setStorageDevice($data['storage_device'] ?? null); 21 | } 22 | 23 | /** 24 | * @return StorageDevice[]|null 25 | */ 26 | public function getStorageDevice(): ?array 27 | { 28 | return $this->storageDevice; 29 | } 30 | 31 | /** 32 | * @param StorageDevice[]|null $storageDevice 33 | * @return ServerStorageDevices 34 | */ 35 | public function setStorageDevice(?array $storageDevice): ServerStorageDevices 36 | { 37 | if (is_array($storageDevice)) { 38 | foreach ($storageDevice as $item) { 39 | $this->storageDevice[] = $item instanceof StorageDevice ? $item : new StorageDevice($item); 40 | } 41 | } else { 42 | $this->storageDevice = $storageDevice; 43 | } 44 | 45 | return $this; 46 | } 47 | 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/Model/ServerTags.php: -------------------------------------------------------------------------------- 1 | setTag($data['tag'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getTag(): ?array 27 | { 28 | return $this->tag; 29 | } 30 | 31 | /** 32 | * @param string[]|null $tag 33 | * @return ServerTags 34 | */ 35 | public function setTag(?array $tag): ServerTags 36 | { 37 | if (is_array($tag)) { 38 | foreach ($tag as $item) { 39 | $this->tag[] = $item; 40 | } 41 | } else { 42 | $this->tag = $tag; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/Servers.php: -------------------------------------------------------------------------------- 1 | setServer($data['server'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getServer(): ?array 27 | { 28 | return $this->server; 29 | } 30 | 31 | /** 32 | * @param string[]|null $server 33 | * @return Servers 34 | */ 35 | public function setServer(?array $server): Servers 36 | { 37 | if (is_array($server)) { 38 | foreach ($server as $item) { 39 | $this->server[] = $item; 40 | } 41 | } else { 42 | $this->server = $server; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/Stat.php: -------------------------------------------------------------------------------- 1 | setName($data['name'] ?? null); 31 | $this->setTimestamp($data['timestamp'] ?? null); 32 | $this->setValue($data['value'] ?? null); 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getName(): ?string 39 | { 40 | return $this->name; 41 | } 42 | 43 | /** 44 | * @param string|null $name 45 | * @return Stat 46 | */ 47 | public function setName(?string $name): Stat 48 | { 49 | $this->name = $name; 50 | 51 | return $this; 52 | } 53 | 54 | /** 55 | * @return string|null 56 | */ 57 | public function getTimestamp(): ?string 58 | { 59 | return $this->timestamp; 60 | } 61 | 62 | /** 63 | * @param string|null $timestamp 64 | * @return Stat 65 | */ 66 | public function setTimestamp(?string $timestamp): Stat 67 | { 68 | $this->timestamp = $timestamp; 69 | 70 | return $this; 71 | } 72 | 73 | /** 74 | * @return float|string|null 75 | */ 76 | public function getValue() 77 | { 78 | return $this->value; 79 | } 80 | 81 | /** 82 | * @param float|string|null $value 83 | * @return Stat 84 | */ 85 | public function setValue($value): Stat 86 | { 87 | $this->value = $value; 88 | 89 | return $this; 90 | } 91 | 92 | } 93 | -------------------------------------------------------------------------------- /lib/Model/Stats.php: -------------------------------------------------------------------------------- 1 | setStat($data['stat'] ?? null); 22 | } 23 | 24 | /** 25 | * @return Stat[]|null 26 | */ 27 | public function getStat(): ?array 28 | { 29 | return $this->stat; 30 | } 31 | 32 | /** 33 | * @param Stat[]|array|null $stat 34 | * @return Stats 35 | */ 36 | public function setStat(?array $stat): Stats 37 | { 38 | if (is_array($stat)) { 39 | foreach ($stat as $item) { 40 | $this->stat[] = $item instanceof Stat ? $item : new Stat($item); 41 | } 42 | } else { 43 | $this->stat = $stat; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/StopServer.php: -------------------------------------------------------------------------------- 1 | setStopServer($data['stop_server'] ?? null); 24 | } 25 | 26 | /** 27 | * @return StopServerRequest|null 28 | */ 29 | public function getStopServer(): ?StopServerRequest 30 | { 31 | return $this->stopServer; 32 | } 33 | 34 | /** 35 | * @param StopServerRequest|array|null $stopServer 36 | * @return StopServer 37 | */ 38 | public function setStopServer($stopServer): StopServer 39 | { 40 | if (is_array($stopServer)) { 41 | $this->stopServer = new StopServerRequest($stopServer); 42 | } else { 43 | $this->stopServer = $stopServer; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/StopServerRequest.php: -------------------------------------------------------------------------------- 1 | setStopType($data['stop_type'] ?? self::STOP_TYPE_SOFT); 32 | $this->setTimeout($data['timeout'] ?? null); 33 | } 34 | 35 | /** 36 | * @return string 37 | */ 38 | public function getStopType(): string 39 | { 40 | return $this->stopType; 41 | } 42 | 43 | /** 44 | * @param string $stopType 45 | * @return StopServerRequest 46 | */ 47 | public function setStopType(string $stopType): StopServerRequest 48 | { 49 | Assert::oneOf($stopType, [ 50 | self::STOP_TYPE_SOFT, 51 | self::STOP_TYPE_HARD 52 | ]); 53 | 54 | $this->stopType = $stopType; 55 | 56 | return $this; 57 | } 58 | 59 | /** 60 | * @return float|string|null 61 | */ 62 | public function getTimeout() 63 | { 64 | return $this->timeout; 65 | } 66 | 67 | /** 68 | * @param float|string|null $timeout 69 | * @return StopServerRequest 70 | */ 71 | public function setTimeout($timeout): StopServerRequest 72 | { 73 | if (!is_null($timeout)) { 74 | Assert::range($timeout, '1', '600'); 75 | } 76 | 77 | $this->timeout = $timeout; 78 | 79 | return $this; 80 | } 81 | } 82 | 83 | 84 | -------------------------------------------------------------------------------- /lib/Model/StorageAccessType.php: -------------------------------------------------------------------------------- 1 | setBackup($data['backup'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getBackup(): ?array 27 | { 28 | return $this->backup; 29 | } 30 | 31 | /** 32 | * @param string[]|null $backup 33 | * @return StorageBackups 34 | */ 35 | public function setBackup(?array $backup): StorageBackups 36 | { 37 | if (is_array($backup)) { 38 | foreach ($backup as $item) { 39 | $this->backup[] = $item; 40 | } 41 | } else { 42 | $this->backup = $backup; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/StorageDeviceDetachRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'title', 'size', 'tier', 'action', 'partOfPlan', 'storage', 16 | 'storageSize', 'storageTitle', 'type', 'boot_disk' 17 | ] 18 | ]); 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /lib/Model/StorageDeviceLoadRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 15 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 16 | 'title', 'size', 'tier', 'action', 'address', 17 | 'partOfPlan', 'storageSize', 'storageTitle', 'type', 'bootDisk' 18 | ] 19 | ]); 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /lib/Model/StorageDeviceRequest.php: -------------------------------------------------------------------------------- 1 | storageDevice = $data['storage_device'] ?? null; 24 | } 25 | 26 | /** 27 | * @return StorageDevice|null 28 | */ 29 | public function getStorageDevice(): ?StorageDevice 30 | { 31 | return $this->storageDevice; 32 | } 33 | 34 | /** 35 | * @param StorageDevice|array|null $storageDevice 36 | * @return $this 37 | */ 38 | public function setStorageDevice($storageDevice): self 39 | { 40 | if (is_array($storageDevice)) { 41 | $this->storageDevice = new StorageDevice($storageDevice); 42 | } else { 43 | $this->storageDevice = $storageDevice; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/StorageRequest.php: -------------------------------------------------------------------------------- 1 | setStorage($data['storage'] ?? null); 24 | } 25 | 26 | /** 27 | * @return Storage|null 28 | */ 29 | public function getStorage(): ?Storage 30 | { 31 | return $this->storage; 32 | } 33 | 34 | /** 35 | * @param Storage|array|null $storage 36 | * @return $this 37 | */ 38 | public function setStorage($storage): self 39 | { 40 | if (is_array($storage)) { 41 | $this->storage = new Storage($storage); 42 | } else { 43 | $this->storage = $storage; 44 | } 45 | 46 | return $this; 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /lib/Model/StorageState.php: -------------------------------------------------------------------------------- 1 | setStorages($data['storages'] ?? null); 21 | } 22 | 23 | /** 24 | * @return SuccessStoragesResponseStorages|null 25 | */ 26 | public function getStorages(): ?SuccessStoragesResponseStorages 27 | { 28 | return $this->storages; 29 | } 30 | 31 | /** 32 | * @param SuccessStoragesResponseStorages|array|null $storages 33 | * @return SuccessStoragesResponse 34 | */ 35 | public function setStorages($storages): SuccessStoragesResponse 36 | { 37 | if (is_array($storages)) { 38 | $this->storages = new SuccessStoragesResponseStorages($storages); 39 | } else { 40 | $this->storages = $storages; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/SuccessStoragesResponseStorages.php: -------------------------------------------------------------------------------- 1 | setStorage($data['storage'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Storage[]|null 25 | */ 26 | public function getStorage(): ?array 27 | { 28 | return $this->storage; 29 | } 30 | 31 | /** 32 | * @param Storage[]|array|null $storage 33 | * @return SuccessStoragesResponseStorages 34 | */ 35 | public function setStorage(?array $storage): SuccessStoragesResponseStorages 36 | { 37 | if (is_array($storage)) { 38 | foreach ($storage as $item) { 39 | $this->storage[] = $item instanceof Storage ? $item : new Storage($item); 40 | } 41 | } else { 42 | $this->storage = $storage; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/Tag.php: -------------------------------------------------------------------------------- 1 | setName($data['name'] ?? null); 31 | $this->setDescription($data['description'] ?? null); 32 | $this->setServers($data['servers'] ?? null); 33 | } 34 | 35 | /** 36 | * @return string|null 37 | */ 38 | public function getName(): ?string 39 | { 40 | return $this->name; 41 | } 42 | 43 | /** 44 | * @param string|null $name 45 | * @return Tag 46 | */ 47 | public function setName(?string $name): Tag 48 | { 49 | $this->name = $name; 50 | 51 | return $this; 52 | } 53 | 54 | /** 55 | * @return string|null 56 | */ 57 | public function getDescription(): ?string 58 | { 59 | return $this->description; 60 | } 61 | 62 | /** 63 | * @param string|null $description 64 | * @return Tag 65 | */ 66 | public function setDescription(?string $description): Tag 67 | { 68 | $this->description = $description; 69 | 70 | return $this; 71 | } 72 | 73 | /** 74 | * @return TagServers|null 75 | */ 76 | public function getServers(): ?TagServers 77 | { 78 | return $this->servers; 79 | } 80 | 81 | /** 82 | * @param TagServers|array|null $servers 83 | * @return Tag 84 | */ 85 | public function setServers($servers): Tag 86 | { 87 | if (is_array($servers)) { 88 | $this->servers = new TagServers($servers); 89 | } else { 90 | $this->servers = $servers; 91 | } 92 | 93 | return $this; 94 | } 95 | } 96 | 97 | 98 | -------------------------------------------------------------------------------- /lib/Model/TagCreateRequest.php: -------------------------------------------------------------------------------- 1 | tag = $data['tag'] ?? null; 25 | } 26 | 27 | /** 28 | * @return Tag|null 29 | */ 30 | public function getTag(): ?Tag 31 | { 32 | return $this->tag; 33 | } 34 | 35 | /** 36 | * @param Tag|array|null $tag 37 | * @return TagCreateRequest 38 | */ 39 | public function setTag($tag): TagCreateRequest 40 | { 41 | if (is_array($tag)) { 42 | $this->tag = new Tag($tag); 43 | } else { 44 | $this->tag = $tag; 45 | } 46 | 47 | return $this; 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /lib/Model/TagListResponse.php: -------------------------------------------------------------------------------- 1 | tags = $data['tags'] ?? null; 21 | } 22 | 23 | /** 24 | * @return TagListResponseTags|null 25 | */ 26 | public function getTags(): ?TagListResponseTags 27 | { 28 | return $this->tags; 29 | } 30 | 31 | /** 32 | * @param TagListResponseTags|array|null $tags 33 | * @return TagListResponse 34 | */ 35 | public function setTags($tags): TagListResponse 36 | { 37 | if (is_array($tags)) { 38 | $this->tags = new TagListResponseTags($tags); 39 | } else { 40 | $this->tags = $tags; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/TagListResponseTags.php: -------------------------------------------------------------------------------- 1 | setTag($data['tag'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Tag[]|null 25 | */ 26 | public function getTag(): ?array 27 | { 28 | return $this->tag; 29 | } 30 | 31 | /** 32 | * @param Tag[]|null $tag 33 | * @return TagListResponseTags 34 | */ 35 | public function setTag(?array $tag): TagListResponseTags 36 | { 37 | if (is_array($tag)) { 38 | foreach ($tag as $item) { 39 | $this->tag[] = $item instanceof Tag ? $item : new Tag($item); 40 | } 41 | } else { 42 | $this->tag = $tag; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/TagServers.php: -------------------------------------------------------------------------------- 1 | setServer($data['server'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getServer(): ?array 27 | { 28 | return $this->server; 29 | } 30 | 31 | /** 32 | * @param string[]|null $server 33 | * @return TagServers 34 | */ 35 | public function setServer(?array $server): TagServers 36 | { 37 | if (is_array($server)) { 38 | foreach ($server as $item) { 39 | $this->server[] = $item; 40 | } 41 | } else { 42 | $this->server = $server; 43 | } 44 | 45 | return $this; 46 | } 47 | 48 | } 49 | 50 | 51 | -------------------------------------------------------------------------------- /lib/Model/TemplitizeStorageRequest.php: -------------------------------------------------------------------------------- 1 | serializer->serialize($this, 'json', [ 14 | AbstractNormalizer::IGNORED_ATTRIBUTES => [ 15 | 'access', 'backupRule', 'backups', 'license', 'servers', 'size', 'state', 16 | 'tier', 'type', 'uuid', 'zone', 'origin', 'created' 17 | ] 18 | ]); 19 | } 20 | } 21 | 22 | 23 | -------------------------------------------------------------------------------- /lib/Model/TimezoneListResponse.php: -------------------------------------------------------------------------------- 1 | setTimezones($data['timezones'] ?? null); 21 | } 22 | 23 | /** 24 | * @return TimezoneListResponseTimezones|null 25 | */ 26 | public function getTimezones(): ?TimezoneListResponseTimezones 27 | { 28 | return $this->timezones; 29 | } 30 | 31 | /** 32 | * @param TimezoneListResponseTimezones|array|null $timezones 33 | * @return TimezoneListResponse 34 | */ 35 | public function setTimezones($timezones): TimezoneListResponse 36 | { 37 | if (is_array($timezones)) { 38 | $this->timezones = new TimezoneListResponseTimezones($timezones); 39 | } else { 40 | $this->timezones = $timezones; 41 | } 42 | 43 | return $this; 44 | } 45 | } 46 | 47 | 48 | -------------------------------------------------------------------------------- /lib/Model/TimezoneListResponseTimezones.php: -------------------------------------------------------------------------------- 1 | setTimezone($data['timezone'] ?? null); 21 | } 22 | 23 | /** 24 | * @return string[]|null 25 | */ 26 | public function getTimezone(): ?array 27 | { 28 | return $this->timezone; 29 | } 30 | 31 | /** 32 | * @param string[]|null $timezone 33 | * @return TimezoneListResponseTimezones 34 | */ 35 | public function setTimezone(?array $timezone): TimezoneListResponseTimezones 36 | { 37 | if (is_array($timezone)) { 38 | foreach ($timezone as $item) { 39 | $this->timezone[] = $item; 40 | } 41 | } else { 42 | $this->timezone = $timezone; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Model/Zone.php: -------------------------------------------------------------------------------- 1 | setId($data['id'] ?? null); 36 | $this->setDescription($data['description'] ?? null); 37 | $this->setPublic($data['public'] ?? null); 38 | } 39 | 40 | /** 41 | * @return string|null 42 | */ 43 | public function getId(): ?string 44 | { 45 | return $this->id; 46 | } 47 | 48 | /** 49 | * @param string|null $id 50 | * @return Zone 51 | */ 52 | public function setId(?string $id): Zone 53 | { 54 | $this->id = $id; 55 | 56 | return $this; 57 | } 58 | 59 | /** 60 | * @return string|null 61 | */ 62 | public function getDescription(): ?string 63 | { 64 | return $this->description; 65 | } 66 | 67 | /** 68 | * @param string|null $description 69 | * @return Zone 70 | */ 71 | public function setDescription(?string $description): Zone 72 | { 73 | $this->description = $description; 74 | 75 | return $this; 76 | } 77 | 78 | /** 79 | * @return string|null 80 | */ 81 | public function getPublic(): ?string 82 | { 83 | return $this->public; 84 | } 85 | 86 | /** 87 | * @param string|null $public 88 | * @return Zone 89 | */ 90 | public function setPublic(?string $public): Zone 91 | { 92 | if (!is_null($public)) { 93 | Assert::oneOf($public, [ 94 | self::PUBLIC_NO, 95 | self::PUBLIC_YES, 96 | ]); 97 | } 98 | 99 | $this->public = $public; 100 | 101 | return $this; 102 | } 103 | 104 | } 105 | 106 | 107 | -------------------------------------------------------------------------------- /lib/Model/ZoneListResponse.php: -------------------------------------------------------------------------------- 1 | setZones($data['zones'] ?? null); 21 | } 22 | 23 | /** 24 | * @return ZoneListResponseZones|null 25 | */ 26 | public function getZones(): ?ZoneListResponseZones 27 | { 28 | return $this->zones; 29 | } 30 | 31 | /** 32 | * @param ZoneListResponseZones|array|null $zones 33 | * @return ZoneListResponse 34 | */ 35 | public function setZones($zones): ZoneListResponse 36 | { 37 | if (is_array($zones)) { 38 | $this->zones = new ZoneListResponseZones($zones); 39 | } else { 40 | $this->zones = $zones; 41 | } 42 | 43 | return $this; 44 | } 45 | 46 | } 47 | 48 | 49 | -------------------------------------------------------------------------------- /lib/Model/ZoneListResponseZones.php: -------------------------------------------------------------------------------- 1 | setZone($data['zone'] ?? null); 21 | } 22 | 23 | /** 24 | * @return Zone[]|null 25 | */ 26 | public function getZone(): ?array 27 | { 28 | return $this->zone; 29 | } 30 | 31 | /** 32 | * @param Zone[]|array|null $zone 33 | * @return ZoneListResponseZones 34 | */ 35 | public function setZone(?array $zone): ZoneListResponseZones 36 | { 37 | if (is_array($zone)) { 38 | foreach ($zone as $item) { 39 | $this->zone[] = $item instanceof Zone ? $item : new Zone($item); 40 | } 41 | } else { 42 | $this->zone = $zone; 43 | } 44 | 45 | return $this; 46 | } 47 | } 48 | 49 | 50 | -------------------------------------------------------------------------------- /lib/Serializer.php: -------------------------------------------------------------------------------- 1 | serializer = new BaseSerializer([$normalizer], [new JsonEncoder()]); 26 | } 27 | 28 | public function deserialize(mixed $data, string $type, string $format = 'json', array $context = []): object|array 29 | { 30 | return $this->serializer->deserialize($data, $type, $format, $context); 31 | } 32 | 33 | public function serialize(mixed $data, string $format = 'json', array $context = []): string 34 | { 35 | return $this->serializer->serialize($data, $format, array_merge([ 36 | 'json_encode_options' => self::DEFAULT_ENCODING_OPTIONS, 37 | ObjectNormalizer::SKIP_NULL_VALUES => true 38 | ], $context)); 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /lib/SerializerInterface.php: -------------------------------------------------------------------------------- 1 | toCamelCase($key); 14 | 15 | return property_exists($this, $key); 16 | } 17 | 18 | public function offsetGet($key) 19 | { 20 | return $this->get($key); 21 | } 22 | 23 | public function offsetSet($key, $value) 24 | { 25 | $this->set($key, $value); 26 | } 27 | 28 | public function offsetUnset($key) 29 | { 30 | if ($this->offsetExists($key)) { 31 | $key = $this->toCamelCase($key); 32 | unset($this->{$key}); 33 | } 34 | } 35 | 36 | private function set($key, $value) 37 | { 38 | if (!$this->offsetExists($key)) { 39 | throw new InvalidArgumentException("Undefined index: {$key}"); 40 | } 41 | 42 | $key = $this->toCamelCase($key); 43 | 44 | $this->{$key} = $value; 45 | } 46 | 47 | private function get($key) 48 | { 49 | if (!$this->offsetExists($key)) { 50 | throw new InvalidArgumentException("Undefined index: {$key}"); 51 | } 52 | 53 | $key = $this->toCamelCase($key); 54 | 55 | return $this->{$key}; 56 | } 57 | 58 | private function toCamelCase($string) 59 | { 60 | return lcfirst(str_replace('_', '', ucwords($string, '_'))); 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /lib/Upcloud/BaseApi.php: -------------------------------------------------------------------------------- 1 | config = $config ?: Configuration::getDefaultConfiguration(); 29 | $this->client = new UpcloudHttpClient($client, $this->config); 30 | } 31 | 32 | /** 33 | * @return Configuration 34 | */ 35 | public function getConfig(): Configuration 36 | { 37 | return $this->config; 38 | } 39 | 40 | /** 41 | * @param string $path 42 | * @param array $parts 43 | * @return string 44 | */ 45 | protected function buildPath(string $path, array $parts = []): string 46 | { 47 | foreach ($parts as $search => $replace) { 48 | $path = str_replace('{' . $search . '}', $this->toPathValue($replace), $path); 49 | } 50 | return $path; 51 | } 52 | 53 | protected function toPathValue($value) 54 | { 55 | return rawurlencode($this->toString($value)); 56 | } 57 | 58 | protected function toString($value) 59 | { 60 | if ($value instanceof \DateTime) { // datetime in ISO8601 format 61 | return $value->format(\DateTime::ATOM); 62 | } else { 63 | return strval($value); 64 | } 65 | } 66 | } 67 | -------------------------------------------------------------------------------- /lib/Upcloud/ZoneApi.php: -------------------------------------------------------------------------------- 1 | listZonesWithHttpInfo(); 35 | return $response; 36 | } 37 | 38 | /** 39 | * Operation listZonesWithHttpInfo 40 | * 41 | * List available zones 42 | * 43 | * @throws ApiException on non-2xx response 44 | * @throws InvalidArgumentException|GuzzleException 45 | * @return array of ZoneListResponse, HTTP status code, HTTP response headers (array of strings) 46 | */ 47 | public function listZonesWithHttpInfo(): array 48 | { 49 | $request = new Request('GET', 'zone'); 50 | $response = $this->client->send($request); 51 | 52 | return $response->toArray(ZoneListResponse::class); 53 | } 54 | 55 | /** 56 | * Operation listZonesAsync 57 | * 58 | * List available zones 59 | * 60 | * @throws InvalidArgumentException 61 | * @return PromiseInterface 62 | */ 63 | public function listZonesAsync() 64 | { 65 | return $this->listZonesAsyncWithHttpInfo()->then(function ($response) { 66 | return $response[0]; 67 | }); 68 | } 69 | 70 | /** 71 | * Operation listZonesAsyncWithHttpInfo 72 | * 73 | * List available zones 74 | * 75 | * @throws InvalidArgumentException 76 | * @return PromiseInterface 77 | */ 78 | public function listZonesAsyncWithHttpInfo() 79 | { 80 | $request = new Request('GET', 'zone'); 81 | 82 | return $this->client->sendAsync($request)->then(function (UpcloudApiResponse $response) { 83 | return $response->toArray(ZoneListResponse::class); 84 | }); 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /phpconfig.ini: -------------------------------------------------------------------------------- 1 | xdebug.max_nesting_level=512 -------------------------------------------------------------------------------- /phpunit.xml.dist: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | ./test/Api 11 | 12 | 13 | 14 | 15 | 16 | ./lib/Upcloud 17 | ./lib/Model 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | -------------------------------------------------------------------------------- /test/Api/Fixtures/BaseFixture.php: -------------------------------------------------------------------------------- 1 | serializer = new Serializer; 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /test/Api/Fixtures/PlanApiFixture.php: -------------------------------------------------------------------------------- 1 | getList(), JSON_PRETTY_PRINT); 17 | } 18 | 19 | /** 20 | * @return AvailablePlanListResponse|mixed 21 | */ 22 | public function getResponse() 23 | { 24 | return $this->serializer->deserialize( 25 | $this->getResponseBody(), 26 | AvailablePlanListResponse::class 27 | ); 28 | } 29 | 30 | public function getList() 31 | { 32 | return [ 33 | 'plans' => [ 34 | 'plan' => [ 35 | [ 36 | 'core_number' => 1, 37 | 'memory_amount' => 2048, 38 | 'name' => '1xCPU-2GB', 39 | 'public_traffic_out' => 2048, 40 | 'storage_size' => 50, 41 | 'storage_tier' => 'maxiops', 42 | ], 43 | [ 44 | 'core_number' => 2, 45 | 'memory_amount' => 4096, 46 | 'name' => '2xCPU-4GB', 47 | 'public_traffic_out' => 4096, 48 | 'storage_size' => 80, 49 | 'storage_tier' => 'maxiops', 50 | ] 51 | ] 52 | ] 53 | ]; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /test/Api/Fixtures/TimezoneApiFixture.php: -------------------------------------------------------------------------------- 1 | getList(), JSON_PRETTY_PRINT); 17 | } 18 | 19 | /** 20 | * @return TimezoneListResponse|mixed 21 | */ 22 | public function getResponse() 23 | { 24 | return $this->serializer->deserialize( 25 | $this->getResponseBody(), 26 | TimezoneListResponse::class 27 | ); 28 | } 29 | 30 | public function getList() 31 | { 32 | return [ 33 | "timezones" => [ 34 | "timezone" => [ 35 | "Africa/Abidjan", 36 | "Africa/Accra", 37 | "Africa/Addis_Ababa", 38 | "Pacific/Truk", 39 | "Pacific/Wake", 40 | "Pacific/Wallis", 41 | "UTC", 42 | ] 43 | ] 44 | ]; 45 | } 46 | } 47 | -------------------------------------------------------------------------------- /test/Api/PlanApi/PlanApiTest.php: -------------------------------------------------------------------------------- 1 | mock = Mockery::mock(Client::class); 48 | $this->api = new PlanApi($this->mock); 49 | $this->fixture = new PlanApiFixture; 50 | } 51 | 52 | public function testListPlans(): void 53 | { 54 | $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 55 | $this->mock 56 | ->shouldReceive('send') 57 | ->once() 58 | ->andReturn($fakeResponse); 59 | 60 | $response = $this->api->listPlans(); 61 | 62 | $this->assertInstanceOf(AvailablePlanListResponse::class, $response); 63 | $this->assertEquals($response, $this->fixture->getResponse()); 64 | } 65 | 66 | public function testListPlansAsync(): void 67 | { 68 | $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 69 | 70 | $this->mock 71 | ->shouldReceive('sendAsync') 72 | ->once() 73 | ->andReturn(new FulfilledPromise($response)); 74 | 75 | $promise = $this->api->listPlansAsync(); 76 | 77 | $this->assertInstanceOf(PromiseInterface::class, $promise); 78 | $this->assertInstanceOf(AvailablePlanListResponse::class, $result = $promise->wait()); 79 | $this->assertEquals($result, $this->fixture->getResponse()); 80 | } 81 | } 82 | -------------------------------------------------------------------------------- /test/Api/PricesApi/PricesApiTest.php: -------------------------------------------------------------------------------- 1 | mock = Mockery::mock(Client::class); 47 | $this->api = new PricesApi($this->mock); 48 | $this->fixture = new PricesApiFixture; 49 | } 50 | 51 | public function testListPrices(): void 52 | { 53 | $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 54 | $this->mock 55 | ->shouldReceive('send') 56 | ->once() 57 | ->andReturn($fakeResponse); 58 | 59 | $response = $this->api->listPrices(); 60 | 61 | $this->assertInstanceOf(PriceListResponse::class, $response); 62 | $this->assertEquals($response, $this->fixture->getResponse()); 63 | } 64 | 65 | public function testListPricesAsync(): void 66 | { 67 | $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 68 | 69 | $this->mock 70 | ->shouldReceive('sendAsync') 71 | ->once() 72 | ->andReturn(new FulfilledPromise($response)); 73 | 74 | $promise = $this->api->listPricesAsync(); 75 | 76 | $this->assertInstanceOf(PromiseInterface::class, $promise); 77 | $this->assertInstanceOf(PriceListResponse::class, $result = $promise->wait()); 78 | $this->assertEquals($result, $this->fixture->getResponse()); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /test/Api/TimezoneApi/TimezoneApiTest.php: -------------------------------------------------------------------------------- 1 | mock = Mockery::mock(Client::class); 47 | $this->api = new TimezoneApi($this->mock); 48 | $this->fixture = new TimezoneApiFixture; 49 | } 50 | 51 | public function testListTimezones(): void 52 | { 53 | $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 54 | $this->mock 55 | ->shouldReceive('send') 56 | ->once() 57 | ->andReturn($fakeResponse); 58 | 59 | $response = $this->api->listTimezones(); 60 | 61 | $this->assertInstanceOf(TimezoneListResponse::class, $response); 62 | $this->assertEquals($response, $this->fixture->getResponse()); 63 | } 64 | 65 | public function testListTimezonesAsync(): void 66 | { 67 | $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 68 | 69 | $this->mock 70 | ->shouldReceive('sendAsync') 71 | ->once() 72 | ->andReturn(new FulfilledPromise($response)); 73 | 74 | $promise = $this->api->listTimezonesAsync(); 75 | 76 | $this->assertInstanceOf(PromiseInterface::class, $promise); 77 | $this->assertInstanceOf(TimezoneListResponse::class, $result = $promise->wait()); 78 | $this->assertEquals($result, $this->fixture->getResponse()); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /test/Api/ZoneApi/ZoneApiTest.php: -------------------------------------------------------------------------------- 1 | mock = Mockery::mock(Client::class); 47 | $this->api = new ZoneApi($this->mock); 48 | $this->fixture = new ZoneApiFixture; 49 | } 50 | 51 | public function testListZones(): void 52 | { 53 | $fakeResponse = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 54 | $this->mock 55 | ->shouldReceive('send') 56 | ->once() 57 | ->andReturn($fakeResponse); 58 | 59 | $response = $this->api->listZones(); 60 | 61 | $this->assertInstanceOf(ZoneListResponse::class, $response); 62 | $this->assertEquals($response, $this->fixture->getResponse()); 63 | } 64 | 65 | public function testListZonesAsync(): void 66 | { 67 | $response = new Response(200, $this->fakeHeadersAsArray, $this->fixture->getResponseBody()); 68 | 69 | $this->mock 70 | ->shouldReceive('sendAsync') 71 | ->once() 72 | ->andReturn(new FulfilledPromise($response)); 73 | 74 | $promise = $this->api->listZonesAsync(); 75 | 76 | $this->assertInstanceOf(PromiseInterface::class, $promise); 77 | $this->assertInstanceOf(ZoneListResponse::class, $result = $promise->wait()); 78 | $this->assertEquals($result, $this->fixture->getResponse()); 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /test/test-install-with-laravel.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh -xe 2 | 3 | laravel_version=${1:-9} 4 | dir="test-$laravel_version" 5 | 6 | mkdir -p tmp 7 | cd tmp 8 | rm -rf $dir 9 | 10 | composer create-project laravel/laravel $dir "^$laravel_version" 11 | cd $dir 12 | composer config repositories.dev path ../../ 13 | composer require upcloudltd/upcloud-php-api @dev 14 | --------------------------------------------------------------------------------