forked from zepgram/module-rest
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathParameters.php
executable file
·149 lines (130 loc) · 3 KB
/
Parameters.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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
<?php
/**
* This file is part of Zepgram\Rest\Model
*
* @package Zepgram\Rest\Model
* @file Parameters.php
* @date 04 11 2021 23:28
*
* @author Benjamin Calef <[email protected]>
* @copyright 2021 Zepgram Copyright (c) (https://github.com/zepgram)
* @license MIT License
**/
declare(strict_types=1);
namespace Zepgram\Rest\Model;
use Magento\Framework\DataObject;
class Parameters extends DataObject implements ParametersInterface
{
/**
* {@inheritDoc}
*/
public function getServiceName(): string
{
return $this->getData(self::SERVICE_NAME);
}
/**
* {@inheritDoc}
*/
public function setServiceName(string $serviceName): ParametersInterface
{
return $this->setData(self::SERVICE_NAME, $serviceName);
}
/**
* {@inheritDoc}
*/
public function getUri(): string
{
return $this->getData(self::URI);
}
/**
* {@inheritDoc}
*/
public function setUri(string $uri): ParametersInterface
{
return $this->setData(self::URI, $uri);
}
/**
* {@inheritDoc}
*/
public function getMethod(): string
{
return $this->getData(self::METHOD);
}
/**
* {@inheritDoc}
*/
public function setMethod(string $method): ParametersInterface
{
return $this->setData(self::METHOD, $method);
}
/**
* {@inheritDoc}
*/
public function getIsJsonRequest(): bool
{
return $this->getData(self::IS_JSON_REQUEST);
}
/**
* {@inheritDoc}
*/
public function setIsJsonRequest(bool $isJsonRequest): ParametersInterface
{
return $this->setData(self::IS_JSON_REQUEST, $isJsonRequest);
}
/**
* {@inheritDoc}
*/
public function getIsJsonResponse(): bool
{
return $this->getData(self::IS_JSON_RESPONSE);
}
/**
* {@inheritDoc}
*/
public function setIsJsonResponse(bool $isJsonResponse): ParametersInterface
{
return $this->setData(self::IS_JSON_RESPONSE, $isJsonResponse);
}
/**
* {@inheritDoc}
*/
public function getOptions(): array
{
return $this->getData(self::OPTIONS);
}
/**
* {@inheritDoc}
*/
public function setOptions(array $options): ParametersInterface
{
return $this->setData(self::OPTIONS, $options);
}
/**
* {@inheritDoc}
*/
public function getCacheKey(): ?string
{
return $this->getData(self::CACHE_KEY);
}
/**
* {@inheritDoc}
*/
public function setCacheKey(?string $cacheKey): ParametersInterface
{
return $this->setData(self::CACHE_KEY, $cacheKey);
}
/**
* {@inheritDoc}
*/
public function getConfig(): ConfigRequest
{
return $this->getData(self::CONFIG);
}
/**
* {@inheritDoc}
*/
public function setConfig(ConfigRequest $configRequest): ParametersInterface
{
return $this->setData(self::CONFIG, $configRequest);
}
}