Passed
Push — master ( 0676a7...01ab94 )
by Artem
11:54
created

getSupportedFields()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 8
Code Lines 6

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 6
dl 0
loc 8
c 0
b 0
f 0
rs 10
cc 1
nc 1
nop 0
1
<?php
2
3
// ---------------------------------------------------------------------
4
//
5
//  Copyright (C) 2018-2024 Artem Rodygin
6
//
7
//  You should have received a copy of the MIT License along with
8
//  this file. If not, see <https://opensource.org/licenses/MIT>.
9
//
10
// ---------------------------------------------------------------------
11
12
namespace Linode\ObjectStorage\Repository;
13
14
use Linode\Entity;
15
use Linode\Internal\AbstractRepository;
16
use Linode\ObjectStorage\ObjectStorageCluster;
17
use Linode\ObjectStorage\ObjectStorageClusterRepositoryInterface;
18
19
/**
20
 * @codeCoverageIgnore This class was autogenerated.
21
 */
22
class ObjectStorageClusterRepository extends AbstractRepository implements ObjectStorageClusterRepositoryInterface
23
{
24
    protected function getBaseUri(): string
25
    {
26
        return 'beta/object-storage/clusters';
27
    }
28
29
    protected function getSupportedFields(): array
30
    {
31
        return [
32
            ObjectStorageCluster::FIELD_ID,
33
            ObjectStorageCluster::FIELD_DOMAIN,
34
            ObjectStorageCluster::FIELD_STATUS,
35
            ObjectStorageCluster::FIELD_REGION,
36
            ObjectStorageCluster::FIELD_STATIC_SITE_DOMAIN,
37
        ];
38
    }
39
40
    protected function jsonToEntity(array $json): Entity
41
    {
42
        return new ObjectStorageCluster($this->client, $json);
43
    }
44
}
45