1 | <?php |
||
9 | class SecurityScheme extends AbstractModel implements Arrayable { |
||
10 | |||
11 | use DescriptionPart; |
||
12 | |||
13 | /** @var string */ |
||
14 | private $id; |
||
15 | |||
16 | /** @var string */ |
||
17 | private $name; |
||
18 | |||
19 | /** @var string */ |
||
20 | private $type; |
||
21 | 1 | ||
22 | 1 | /** @var string */ |
|
23 | 1 | private $in; |
|
24 | 1 | ||
25 | /** @var string */ |
||
26 | private $flow; |
||
27 | |||
28 | /** @var string */ |
||
29 | 1 | private $authorizationUrl; |
|
30 | 1 | ||
31 | 1 | /** @var string */ |
|
32 | 1 | private $tokenUrl; |
|
33 | |||
34 | /** @var Map */ |
||
35 | private $scopes; |
||
36 | |||
37 | 1 | /** |
|
38 | 1 | * @param string $id |
|
39 | * @param array $contents |
||
40 | */ |
||
41 | public function __construct($id, $contents = []) { |
||
45 | |||
46 | /** |
||
47 | * @param array $contents |
||
48 | */ |
||
49 | private function parse($contents = []) { |
||
62 | |||
63 | /** |
||
64 | * @return array |
||
65 | */ |
||
66 | public function toArray() { |
||
70 | |||
71 | /** |
||
72 | * Returns the id for this security scheme |
||
73 | * |
||
74 | * @return string |
||
75 | */ |
||
76 | public function getId() { |
||
79 | |||
80 | /** |
||
81 | * Return the name of the header or query parameter to be used |
||
82 | * |
||
83 | * @return string |
||
84 | */ |
||
85 | public function getName() { |
||
88 | |||
89 | /** |
||
90 | * Sets the name of the header or query parameter to be used |
||
91 | * |
||
92 | * @param string $name |
||
93 | * @return $this |
||
94 | */ |
||
95 | public function setName($name) { |
||
99 | |||
100 | /** |
||
101 | * Returns the type of the security scheme |
||
102 | * |
||
103 | * @return string |
||
104 | */ |
||
105 | public function getType() { |
||
108 | |||
109 | /** |
||
110 | * Sets the type of the security scheme |
||
111 | * |
||
112 | * @param string $type Valid values are "basic", "apiKey" or "oauth2" |
||
113 | * @return $this |
||
114 | */ |
||
115 | public function setType($type) { |
||
119 | |||
120 | /** |
||
121 | * Returns the location of the API key |
||
122 | * |
||
123 | * @return string |
||
124 | */ |
||
125 | public function getIn() { |
||
128 | |||
129 | /** |
||
130 | * Sets the location of the API key |
||
131 | * |
||
132 | * @param string $in Valid values are "query" or "header" |
||
133 | * @return $this |
||
134 | */ |
||
135 | public function setIn($in) { |
||
139 | |||
140 | /** |
||
141 | * Retunrs the flow used by the OAuth2 security scheme |
||
142 | * |
||
143 | * @return string |
||
144 | */ |
||
145 | public function getFlow() { |
||
148 | |||
149 | /** |
||
150 | * Sets the flow used by the OAuth2 security scheme |
||
151 | * |
||
152 | * @param string $flow Valid values are "implicit", "password", "application" or "accessCode" |
||
153 | * @return $this |
||
154 | */ |
||
155 | public function setFlow($flow) { |
||
159 | |||
160 | /** |
||
161 | * Returns the authorization URL to be used for this flow |
||
162 | * |
||
163 | * @return string |
||
164 | */ |
||
165 | public function getAuthorizationUrl() { |
||
168 | |||
169 | /** |
||
170 | * Sets the authorization URL to be used for this flow |
||
171 | * |
||
172 | * @param string $authorizationUrl |
||
173 | * @return $this |
||
174 | */ |
||
175 | public function setAuthorizationUrl($authorizationUrl) { |
||
179 | |||
180 | /** |
||
181 | * Returns the token URL to be used for this flow |
||
182 | * |
||
183 | * @return string |
||
184 | */ |
||
185 | public function getTokenUrl() { |
||
188 | |||
189 | /** |
||
190 | * Sets the token URL to be used for this flow |
||
191 | * |
||
192 | * @param string $tokenUrl |
||
193 | * @return $this |
||
194 | */ |
||
195 | public function setTokenUrl($tokenUrl) { |
||
199 | |||
200 | /** |
||
201 | * Returns the scopes |
||
202 | * |
||
203 | * @return Map |
||
204 | */ |
||
205 | public function getScopes() { |
||
208 | |||
209 | } |
||
210 |