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