forked from upmind/provision-provider-seo
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCreateResult.php
53 lines (46 loc) · 1.33 KB
/
CreateResult.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
<?php
declare(strict_types=1);
namespace Upmind\ProvisionProviders\Seo\Data;
use Upmind\ProvisionBase\Provider\DataSet\DataSet;
use Upmind\ProvisionBase\Provider\DataSet\ResultData;
use Upmind\ProvisionBase\Provider\DataSet\Rules;
/**
* @property-read mixed $username Username or other unique service identifier
* @property-read string $domain Domain name the account is for
* @property-read string|null $package_identifier Service package identifier, if any
*/
class CreateResult extends ResultData
{
public static function rules(): Rules
{
return new Rules([
'username' => ['required'],
'domain' => ['required', 'string'],
'package_identifier' => ['nullable', 'string'],
]);
}
/**
* Set the result username.
*/
public function setUsername(string $username): self
{
$this->setValue('username', $username);
return $this;
}
/**
* Set the account domain name.
*/
public function setDomain(?string $domain): self
{
$this->setValue('domain', $domain);
return $this;
}
/**
* Set the result package identifier.
*/
public function setPackageIdentifier(?string $packageIdentifier): self
{
$this->setValue('package_identifier', $packageIdentifier);
return $this;
}
}