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/DiskPlan.php";
 12: use \Saklient\Cloud\Resources\DiskPlan;
 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:  * ディスクプランを検索するための機能を備えたクラス。
 20:  * 
 21:  * @property-read \Saklient\Cloud\Resources\DiskPlan $hdd 標準プラン 
 22:  * @property-read \Saklient\Cloud\Resources\DiskPlan $ssd SSDプラン 
 23:  */
 24: class Model_DiskPlan extends Model {
 25:     
 26:     /**
 27:      * @private
 28:      * @access protected
 29:      * @ignore
 30:      * @return string
 31:      */
 32:     protected function _apiPath()
 33:     {
 34:         return "/product/disk";
 35:     }
 36:     
 37:     /**
 38:      * @private
 39:      * @access protected
 40:      * @ignore
 41:      * @return string
 42:      */
 43:     protected function _rootKey()
 44:     {
 45:         return "DiskPlan";
 46:     }
 47:     
 48:     /**
 49:      * @private
 50:      * @access protected
 51:      * @ignore
 52:      * @return string
 53:      */
 54:     protected function _rootKeyM()
 55:     {
 56:         return "DiskPlans";
 57:     }
 58:     
 59:     /**
 60:      * @private
 61:      * @access protected
 62:      * @ignore
 63:      * @return string
 64:      */
 65:     protected function _className()
 66:     {
 67:         return "DiskPlan";
 68:     }
 69:     
 70:     /**
 71:      * @private
 72:      * @access protected
 73:      * @ignore
 74:      * @param mixed $obj
 75:      * @param boolean $wrapped=false
 76:      * @return \Saklient\Cloud\Resources\Resource
 77:      */
 78:     protected function _createResourceImpl($obj, $wrapped=false)
 79:     {
 80:         Util::validateArgCount(func_num_args(), 1);
 81:         Util::validateType($wrapped, "boolean");
 82:         return new DiskPlan($this->_client, $obj, $wrapped);
 83:     }
 84:     
 85:     /**
 86:      * 次に取得するリストの開始オフセットを指定します。
 87:      * 
 88:      * @access public
 89:      * @param int $offset オフセット
 90:      * @return \Saklient\Cloud\Models\Model_DiskPlan this
 91:      */
 92:     public function offset($offset)
 93:     {
 94:         Util::validateArgCount(func_num_args(), 1);
 95:         Util::validateType($offset, "int");
 96:         return $this->_offset($offset);
 97:     }
 98:     
 99:     /**
100:      * 次に取得するリストの上限レコード数を指定します。
101:      * 
102:      * @access public
103:      * @param int $count 上限レコード数
104:      * @return \Saklient\Cloud\Models\Model_DiskPlan this
105:      */
106:     public function limit($count)
107:     {
108:         Util::validateArgCount(func_num_args(), 1);
109:         Util::validateType($count, "int");
110:         return $this->_limit($count);
111:     }
112:     
113:     /**
114:      * Web APIのフィルタリング設定を直接指定します。
115:      * 
116:      * @access public
117:      * @param string $key キー
118:      * @param mixed $value 値
119:      * @param boolean $multiple=false valueに配列を与え、OR条件で完全一致検索する場合にtrueを指定します。通常、valueはスカラ値であいまい検索されます。
120:      * @return \Saklient\Cloud\Models\Model_DiskPlan
121:      */
122:     public function filterBy($key, $value, $multiple=false)
123:     {
124:         Util::validateArgCount(func_num_args(), 2);
125:         Util::validateType($key, "string");
126:         Util::validateType($multiple, "boolean");
127:         return $this->_filterBy($key, $value, $multiple);
128:     }
129:     
130:     /**
131:      * 次のリクエストのために設定されているステートをすべて破棄します。
132:      * 
133:      * @access public
134:      * @return \Saklient\Cloud\Models\Model_DiskPlan this
135:      */
136:     public function reset()
137:     {
138:         return $this->_reset();
139:     }
140:     
141:     /**
142:      * 指定したIDを持つ唯一のリソースを取得します。
143:      * 
144:      * @access public
145:      * @param string $id
146:      * @return \Saklient\Cloud\Resources\DiskPlan リソースオブジェクト
147:      */
148:     public function getById($id)
149:     {
150:         Util::validateArgCount(func_num_args(), 1);
151:         Util::validateType($id, "string");
152:         return $this->_getById($id);
153:     }
154:     
155:     /**
156:      * リソースの検索リクエストを実行し、結果をリストで取得します。
157:      * 
158:      * @access public
159:      * @return \Saklient\Cloud\Resources\DiskPlan[] リソースオブジェクトの配列
160:      */
161:     public function find()
162:     {
163:         return $this->_find();
164:     }
165:     
166:     /**
167:      * @ignore
168:      * @access public
169:      * @param \Saklient\Cloud\Client $client
170:      */
171:     public function __construct(\Saklient\Cloud\Client $client)
172:     {
173:         parent::__construct($client);
174:         Util::validateArgCount(func_num_args(), 1);
175:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
176:         $this->_hdd = null;
177:         $this->_ssd = null;
178:     }
179:     
180:     /**
181:      * @private
182:      * @access protected
183:      * @ignore
184:      * @var DiskPlan
185:      */
186:     protected $_hdd;
187:     
188:     /**
189:      * @access protected
190:      * @ignore
191:      * @return \Saklient\Cloud\Resources\DiskPlan
192:      */
193:     protected function get_hdd()
194:     {
195:         if ($this->_hdd == null) {
196:             $this->_hdd = $this->getById("2");
197:         }
198:         return $this->_hdd;
199:     }
200:     
201:     
202:     
203:     /**
204:      * @private
205:      * @access protected
206:      * @ignore
207:      * @var DiskPlan
208:      */
209:     protected $_ssd;
210:     
211:     /**
212:      * @access protected
213:      * @ignore
214:      * @return \Saklient\Cloud\Resources\DiskPlan
215:      */
216:     protected function get_ssd()
217:     {
218:         if ($this->_ssd == null) {
219:             $this->_ssd = $this->getById("4");
220:         }
221:         return $this->_ssd;
222:     }
223:     
224:     
225:     
226:     /**
227:      * @ignore
228:      */
229:     public function __get($key) {
230:         switch ($key) {
231:             case "hdd": return $this->get_hdd();
232:             case "ssd": return $this->get_ssd();
233:             default: return parent::__get($key);
234:         }
235:     }
236: 
237: }
238: 
239: 
API documentation generated by ApiGen 2.8.0