PluginProbe
Media Cloud Sync / 1.2.2
Media Cloud Sync v1.2.2
1.4.1 1.4.0 1.3.12 1.3.11 1.3.10 trunk 1.0.0 1.0.1 1.0.2 1.0.3 1.1.0 1.1.1 1.2.0 1.2.10 1.2.11 1.2.12 1.2.13 1.2.2 1.2.3 1.2.4 1.2.5 1.2.6 1.2.7 1.2.8 1.2.9 All 35 releases
media-cloud-sync / includes / sdk / s3 / Aws / Api / Operation.php

Operation.php in Media Cloud Sync 1.2.2, at includes/sdk/s3/Aws/Api/Operation.php

88 lines 2.2 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 namespace Dudlewebs\WPMCS\s3\Aws\Api;
4
5 /**
6 * Represents an API operation.
7 */
8 class Operation extends AbstractModel
9 {
10 private $input;
11 private $output;
12 private $errors;
13 public function __construct(array $definition, ShapeMap $shapeMap)
14 {
15 $definition['type'] = 'structure';
16 if (!isset($definition['http']['method'])) {
17 $definition['http']['method'] = 'POST';
18 }
19 if (!isset($definition['http']['requestUri'])) {
20 $definition['http']['requestUri'] = '/';
21 }
22 parent::__construct($definition, $shapeMap);
23 }
24 /**
25 * Returns an associative array of the HTTP attribute of the operation:
26 *
27 * - method: HTTP method of the operation
28 * - requestUri: URI of the request (can include URI template placeholders)
29 *
30 * @return array
31 */
32 public function getHttp()
33 {
34 return $this->definition['http'];
35 }
36 /**
37 * Get the input shape of the operation.
38 *
39 * @return StructureShape
40 */
41 public function getInput()
42 {
43 if (!$this->input) {
44 if ($input = $this['input']) {
45 $this->input = $this->shapeFor($input);
46 } else {
47 $this->input = new StructureShape([], $this->shapeMap);
48 }
49 }
50 return $this->input;
51 }
52 /**
53 * Get the output shape of the operation.
54 *
55 * @return StructureShape
56 */
57 public function getOutput()
58 {
59 if (!$this->output) {
60 if ($output = $this['output']) {
61 $this->output = $this->shapeFor($output);
62 } else {
63 $this->output = new StructureShape([], $this->shapeMap);
64 }
65 }
66 return $this->output;
67 }
68 /**
69 * Get an array of operation error shapes.
70 *
71 * @return Shape[]
72 */
73 public function getErrors()
74 {
75 if ($this->errors === null) {
76 if ($errors = $this['errors']) {
77 foreach ($errors as $key => $error) {
78 $errors[$key] = $this->shapeFor($error);
79 }
80 $this->errors = $errors;
81 } else {
82 $this->errors = [];
83 }
84 }
85 return $this->errors;
86 }
87 }
88