Overview

Namespaces

  • PHP
  • Saklient
    • Cloud
      • Enums
      • Errors
      • Models
      • Resources
    • Errors

Classes

  • Model_Appliance
  • Model_Archive
  • Model_Bridge
  • Model_Disk
  • Model_DiskPlan
  • Model_Icon
  • Model_Iface
  • Model_Ipv6Net
  • Model_IsoImage
  • Model_License
  • Model_LicenseInfo
  • Model_Region
  • Model_Router
  • Model_RouterPlan
  • Model_Script
  • Model_Server
  • Model_ServerPlan
  • Model_Swytch
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Saklient\Cloud\Models;
  4: 
  5: require_once __DIR__ . "/../../../Saklient/Cloud/Client.php";
  6: use \Saklient\Cloud\Client;
  7: require_once __DIR__ . "/../../../Saklient/Cloud/Models/Model.php";
  8: use \Saklient\Cloud\Models\Model;
  9: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Resource.php";
 10: use \Saklient\Cloud\Resources\Resource;
 11: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Archive.php";
 12: use \Saklient\Cloud\Resources\Archive;
 13: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/LoadBalancer.php";
 14: use \Saklient\Cloud\Resources\LoadBalancer;
 15: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/VpcRouter.php";
 16: use \Saklient\Cloud\Resources\VpcRouter;
 17: require_once __DIR__ . "/../../../Saklient/Cloud/Enums/EScope.php";
 18: use \Saklient\Cloud\Enums\EScope;
 19: require_once __DIR__ . "/../../../Saklient/Util.php";
 20: use \Saklient\Util;
 21: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
 22: use \Saklient\Errors\SaklientException;
 23: 
 24: /** アーカイブを検索・作成するための機能を備えたクラス。 */
 25: class Model_Archive extends Model {
 26:     
 27:     /**
 28:      * @private
 29:      * @access protected
 30:      * @ignore
 31:      * @return string
 32:      */
 33:     protected function _apiPath()
 34:     {
 35:         return "/archive";
 36:     }
 37:     
 38:     /**
 39:      * @private
 40:      * @access protected
 41:      * @ignore
 42:      * @return string
 43:      */
 44:     protected function _rootKey()
 45:     {
 46:         return "Archive";
 47:     }
 48:     
 49:     /**
 50:      * @private
 51:      * @access protected
 52:      * @ignore
 53:      * @return string
 54:      */
 55:     protected function _rootKeyM()
 56:     {
 57:         return "Archives";
 58:     }
 59:     
 60:     /**
 61:      * @private
 62:      * @access protected
 63:      * @ignore
 64:      * @return string
 65:      */
 66:     protected function _className()
 67:     {
 68:         return "Archive";
 69:     }
 70:     
 71:     /**
 72:      * @private
 73:      * @access protected
 74:      * @ignore
 75:      * @param mixed $obj
 76:      * @param boolean $wrapped=false
 77:      * @return \Saklient\Cloud\Resources\Resource
 78:      */
 79:     protected function _createResourceImpl($obj, $wrapped=false)
 80:     {
 81:         Util::validateArgCount(func_num_args(), 1);
 82:         Util::validateType($wrapped, "boolean");
 83:         return new Archive($this->_client, $obj, $wrapped);
 84:     }
 85:     
 86:     /**
 87:      * 次に取得するリストの開始オフセットを指定します。
 88:      * 
 89:      * @access public
 90:      * @param int $offset オフセット
 91:      * @return \Saklient\Cloud\Models\Model_Archive this
 92:      */
 93:     public function offset($offset)
 94:     {
 95:         Util::validateArgCount(func_num_args(), 1);
 96:         Util::validateType($offset, "int");
 97:         return $this->_offset($offset);
 98:     }
 99:     
100:     /**
101:      * 次に取得するリストの上限レコード数を指定します。
102:      * 
103:      * @access public
104:      * @param int $count 上限レコード数
105:      * @return \Saklient\Cloud\Models\Model_Archive this
106:      */
107:     public function limit($count)
108:     {
109:         Util::validateArgCount(func_num_args(), 1);
110:         Util::validateType($count, "int");
111:         return $this->_limit($count);
112:     }
113:     
114:     /**
115:      * Web APIのフィルタリング設定を直接指定します。
116:      * 
117:      * @access public
118:      * @param string $key キー
119:      * @param mixed $value 値
120:      * @param boolean $multiple=false valueに配列を与え、OR条件で完全一致検索する場合にtrueを指定します。通常、valueはスカラ値であいまい検索されます。
121:      * @return \Saklient\Cloud\Models\Model_Archive
122:      */
123:     public function filterBy($key, $value, $multiple=false)
124:     {
125:         Util::validateArgCount(func_num_args(), 2);
126:         Util::validateType($key, "string");
127:         Util::validateType($multiple, "boolean");
128:         return $this->_filterBy($key, $value, $multiple);
129:     }
130:     
131:     /**
132:      * 次のリクエストのために設定されているステートをすべて破棄します。
133:      * 
134:      * @access public
135:      * @return \Saklient\Cloud\Models\Model_Archive this
136:      */
137:     public function reset()
138:     {
139:         return $this->_reset();
140:     }
141:     
142:     /**
143:      * 新規リソース作成用のオブジェクトを用意します。
144:      * 
145:      * 返り値のオブジェクトにパラメータを設定し、save() を呼ぶことで実際のリソースが作成されます。
146:      * 
147:      * @access public
148:      * @return \Saklient\Cloud\Resources\Archive リソースオブジェクト
149:      */
150:     public function create()
151:     {
152:         return $this->_create();
153:     }
154:     
155:     /**
156:      * 指定したIDを持つ唯一のリソースを取得します。
157:      * 
158:      * @access public
159:      * @param string $id
160:      * @return \Saklient\Cloud\Resources\Archive リソースオブジェクト
161:      */
162:     public function getById($id)
163:     {
164:         Util::validateArgCount(func_num_args(), 1);
165:         Util::validateType($id, "string");
166:         return $this->_getById($id);
167:     }
168:     
169:     /**
170:      * リソースの検索リクエストを実行し、結果をリストで取得します。
171:      * 
172:      * @access public
173:      * @return \Saklient\Cloud\Resources\Archive[] リソースオブジェクトの配列
174:      */
175:     public function find()
176:     {
177:         return $this->_find();
178:     }
179:     
180:     /**
181:      * 指定した文字列を名前に含むリソースに絞り込みます。
182:      * 
183:      * 大文字・小文字は区別されません。
184:      * 半角スペースで区切られた複数の文字列は、それらをすべて含むことが条件とみなされます。
185:      * 
186:      * @todo Implement test case
187:      * @access public
188:      * @param string $name
189:      * @return \Saklient\Cloud\Models\Model_Archive
190:      */
191:     public function withNameLike($name)
192:     {
193:         Util::validateArgCount(func_num_args(), 1);
194:         Util::validateType($name, "string");
195:         return $this->_withNameLike($name);
196:     }
197:     
198:     /**
199:      * 指定したタグを持つリソースに絞り込みます。
200:      * 
201:      * 複数のタグを指定する場合は withTags() を利用してください。
202:      * 
203:      * @todo Implement test case
204:      * @access public
205:      * @param string $tag
206:      * @return \Saklient\Cloud\Models\Model_Archive
207:      */
208:     public function withTag($tag)
209:     {
210:         Util::validateArgCount(func_num_args(), 1);
211:         Util::validateType($tag, "string");
212:         return $this->_withTag($tag);
213:     }
214:     
215:     /**
216:      * 指定したすべてのタグを持つリソースに絞り込みます。
217:      * 
218:      * @todo Implement test case
219:      * @access public
220:      * @param string[] $tags
221:      * @return \Saklient\Cloud\Models\Model_Archive
222:      */
223:     public function withTags($tags)
224:     {
225:         Util::validateArgCount(func_num_args(), 1);
226:         Util::validateType($tags, "\\ArrayObject");
227:         return $this->_withTags($tags);
228:     }
229:     
230:     /**
231:      * 指定したDNFに合致するタグを持つリソースに絞り込みます。
232:      * 
233:      * @todo Implement test case
234:      * @access public
235:      * @param string[][] $dnf
236:      * @return \Saklient\Cloud\Models\Model_Archive
237:      */
238:     public function withTagDnf($dnf)
239:     {
240:         Util::validateArgCount(func_num_args(), 1);
241:         Util::validateType($dnf, "\\ArrayObject");
242:         return $this->_withTagDnf($dnf);
243:     }
244:     
245:     /**
246:      * 名前でソートします。
247:      * 
248:      * @todo Implement test case
249:      * @access public
250:      * @param boolean $reverse=false
251:      * @return \Saklient\Cloud\Models\Model_Archive
252:      */
253:     public function sortByName($reverse=false)
254:     {
255:         Util::validateType($reverse, "boolean");
256:         return $this->_sortByName($reverse);
257:     }
258:     
259:     /**
260:      * @ignore
261:      * @access public
262:      * @param \Saklient\Cloud\Client $client
263:      */
264:     public function __construct(\Saklient\Cloud\Client $client)
265:     {
266:         parent::__construct($client);
267:         Util::validateArgCount(func_num_args(), 1);
268:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
269:     }
270:     
271:     /**
272:      * 指定したサイズのアーカイブに絞り込みます。
273:      * 
274:      * @access public
275:      * @param int $sizeGib
276:      * @return \Saklient\Cloud\Models\Model_Archive
277:      */
278:     public function withSizeGib($sizeGib)
279:     {
280:         Util::validateArgCount(func_num_args(), 1);
281:         Util::validateType($sizeGib, "int");
282:         $this->_filterBy("SizeMB", new \ArrayObject([$sizeGib * 1024]));
283:         return $this;
284:     }
285:     
286:     /**
287:      * パブリックアーカイブに絞り込みます。
288:      * 
289:      * @access public
290:      * @return \Saklient\Cloud\Models\Model_Archive
291:      */
292:     public function withSharedScope()
293:     {
294:         $this->_filterBy("Scope", new \ArrayObject([EScope::shared]));
295:         return $this;
296:     }
297:     
298:     /**
299:      * プライベートアーカイブに絞り込みます。
300:      * 
301:      * @access public
302:      * @return \Saklient\Cloud\Models\Model_Archive
303:      */
304:     public function withUserScope()
305:     {
306:         $this->_filterBy("Scope", new \ArrayObject([EScope::user]));
307:         return $this;
308:     }
309:     
310:     /**
311:      * サイズでソートします。
312:      * 
313:      * @access public
314:      * @param boolean $reverse=false
315:      * @return \Saklient\Cloud\Models\Model_Archive
316:      */
317:     public function sortBySize($reverse=false)
318:     {
319:         Util::validateType($reverse, "boolean");
320:         $this->_sort("SizeMB", $reverse);
321:         return $this;
322:     }
323:     
324:     
325: 
326: }
327: 
328: 
API documentation generated by ApiGen 2.8.0