Overview

Namespaces

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

Classes

  • Activity
  • Appliance
  • Archive
  • Bridge
  • Disk
  • DiskActivity
  • DiskConfig
  • DiskPlan
  • FtpInfo
  • Icon
  • Iface
  • IfaceActivity
  • Ipv4Net
  • Ipv4Range
  • Ipv6Net
  • IsoImage
  • LbServer
  • LbVirtualIp
  • License
  • LicenseInfo
  • LoadBalancer
  • Region
  • Router
  • RouterActivity
  • RouterPlan
  • Script
  • Server
  • ServerActivity
  • ServerInstance
  • ServerPlan
  • Swytch
  • VpcRouter
  • Overview
  • Namespace
  • Class
  • Tree
  1: <?php
  2: 
  3: namespace Saklient\Cloud\Resources;
  4: 
  5: require_once __DIR__ . "/../../../Saklient/Cloud/Client.php";
  6: use \Saklient\Cloud\Client;
  7: require_once __DIR__ . "/../../../Saklient/Cloud/Resources/Resource.php";
  8: use \Saklient\Cloud\Resources\Resource;
  9: require_once __DIR__ . "/../../../Saklient/Util.php";
 10: use \Saklient\Util;
 11: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
 12: use \Saklient\Errors\SaklientException;
 13: 
 14: /**
 15:  * ルータ帯域プラン情報の1レコードに対応するクラス。
 16:  * 
 17:  * @property-read string $id ID 
 18:  * @property-read string $name 名前 
 19:  * @property-read int $bandWidthMbps 帯域幅 
 20:  * @property-read string $serviceClass サービスクラス 
 21:  */
 22: class RouterPlan extends Resource {
 23:     
 24:     /**
 25:      * ID
 26:      * 
 27:      * @access protected
 28:      * @ignore
 29:      * @var string
 30:      */
 31:     protected $m_id;
 32:     
 33:     /**
 34:      * 名前
 35:      * 
 36:      * @access protected
 37:      * @ignore
 38:      * @var string
 39:      */
 40:     protected $m_name;
 41:     
 42:     /**
 43:      * 帯域幅
 44:      * 
 45:      * @access protected
 46:      * @ignore
 47:      * @var int
 48:      */
 49:     protected $m_bandWidthMbps;
 50:     
 51:     /**
 52:      * サービスクラス
 53:      * 
 54:      * @access protected
 55:      * @ignore
 56:      * @var string
 57:      */
 58:     protected $m_serviceClass;
 59:     
 60:     /**
 61:      * @private
 62:      * @access protected
 63:      * @ignore
 64:      * @return string
 65:      */
 66:     protected function _apiPath()
 67:     {
 68:         return "/product/internet";
 69:     }
 70:     
 71:     /**
 72:      * @private
 73:      * @access protected
 74:      * @ignore
 75:      * @return string
 76:      */
 77:     protected function _rootKey()
 78:     {
 79:         return "InternetPlan";
 80:     }
 81:     
 82:     /**
 83:      * @private
 84:      * @access protected
 85:      * @ignore
 86:      * @return string
 87:      */
 88:     protected function _rootKeyM()
 89:     {
 90:         return "InternetPlans";
 91:     }
 92:     
 93:     /**
 94:      * @private
 95:      * @access public
 96:      * @ignore
 97:      * @return string
 98:      */
 99:     public function _className()
100:     {
101:         return "RouterPlan";
102:     }
103:     
104:     /**
105:      * @private
106:      * @access public
107:      * @ignore
108:      * @return string
109:      */
110:     public function _id()
111:     {
112:         return $this->get_id();
113:     }
114:     
115:     /**
116:      * @ignore
117:      * @access public
118:      * @param \Saklient\Cloud\Client $client
119:      * @param mixed $obj
120:      * @param boolean $wrapped=false
121:      */
122:     public function __construct(\Saklient\Cloud\Client $client, $obj, $wrapped=false)
123:     {
124:         parent::__construct($client);
125:         Util::validateArgCount(func_num_args(), 2);
126:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
127:         Util::validateType($wrapped, "boolean");
128:         $this->apiDeserialize($obj, $wrapped);
129:     }
130:     
131:     /**
132:      * @access private
133:      * @ignore
134:      * @var boolean
135:      */
136:     private $n_id = false;
137:     
138:     /**
139:      * (This method is generated in Translator_default#buildImpl)
140:      * 
141:      * @access private
142:      * @ignore
143:      * @return string
144:      */
145:     private function get_id()
146:     {
147:         return $this->m_id;
148:     }
149:     
150:     
151:     
152:     /**
153:      * @access private
154:      * @ignore
155:      * @var boolean
156:      */
157:     private $n_name = false;
158:     
159:     /**
160:      * (This method is generated in Translator_default#buildImpl)
161:      * 
162:      * @access private
163:      * @ignore
164:      * @return string
165:      */
166:     private function get_name()
167:     {
168:         return $this->m_name;
169:     }
170:     
171:     
172:     
173:     /**
174:      * @access private
175:      * @ignore
176:      * @var boolean
177:      */
178:     private $n_bandWidthMbps = false;
179:     
180:     /**
181:      * (This method is generated in Translator_default#buildImpl)
182:      * 
183:      * @access private
184:      * @ignore
185:      * @return int
186:      */
187:     private function get_bandWidthMbps()
188:     {
189:         return $this->m_bandWidthMbps;
190:     }
191:     
192:     
193:     
194:     /**
195:      * @access private
196:      * @ignore
197:      * @var boolean
198:      */
199:     private $n_serviceClass = false;
200:     
201:     /**
202:      * (This method is generated in Translator_default#buildImpl)
203:      * 
204:      * @access private
205:      * @ignore
206:      * @return string
207:      */
208:     private function get_serviceClass()
209:     {
210:         return $this->m_serviceClass;
211:     }
212:     
213:     
214:     
215:     /**
216:      * (This method is generated in Translator_default#buildImpl)
217:      * 
218:      * @access protected
219:      * @ignore
220:      * @param mixed $r
221:      */
222:     protected function apiDeserializeImpl($r)
223:     {
224:         Util::validateArgCount(func_num_args(), 1);
225:         $this->isNew = $r == null;
226:         if ($this->isNew) {
227:             $r = (object)[];
228:         }
229:         $this->isIncomplete = false;
230:         if (Util::existsPath($r, "ID")) {
231:             $this->m_id = Util::getByPath($r, "ID") == null ? null : "" . Util::getByPath($r, "ID");
232:         }
233:         else {
234:             $this->m_id = null;
235:             $this->isIncomplete = true;
236:         }
237:         $this->n_id = false;
238:         if (Util::existsPath($r, "Name")) {
239:             $this->m_name = Util::getByPath($r, "Name") == null ? null : "" . Util::getByPath($r, "Name");
240:         }
241:         else {
242:             $this->m_name = null;
243:             $this->isIncomplete = true;
244:         }
245:         $this->n_name = false;
246:         if (Util::existsPath($r, "BandWidthMbps")) {
247:             $this->m_bandWidthMbps = Util::getByPath($r, "BandWidthMbps") == null ? null : intval("" . Util::getByPath($r, "BandWidthMbps"));
248:         }
249:         else {
250:             $this->m_bandWidthMbps = null;
251:             $this->isIncomplete = true;
252:         }
253:         $this->n_bandWidthMbps = false;
254:         if (Util::existsPath($r, "ServiceClass")) {
255:             $this->m_serviceClass = Util::getByPath($r, "ServiceClass") == null ? null : "" . Util::getByPath($r, "ServiceClass");
256:         }
257:         else {
258:             $this->m_serviceClass = null;
259:             $this->isIncomplete = true;
260:         }
261:         $this->n_serviceClass = false;
262:     }
263:     
264:     /**
265:      * @ignore
266:      * @access protected
267:      * @param boolean $withClean=false
268:      * @return mixed
269:      */
270:     protected function apiSerializeImpl($withClean=false)
271:     {
272:         Util::validateType($withClean, "boolean");
273:         $ret = (object)[];
274:         if ($withClean || $this->n_id) {
275:             Util::setByPath($ret, "ID", $this->m_id);
276:         }
277:         if ($withClean || $this->n_name) {
278:             Util::setByPath($ret, "Name", $this->m_name);
279:         }
280:         if ($withClean || $this->n_bandWidthMbps) {
281:             Util::setByPath($ret, "BandWidthMbps", $this->m_bandWidthMbps);
282:         }
283:         if ($withClean || $this->n_serviceClass) {
284:             Util::setByPath($ret, "ServiceClass", $this->m_serviceClass);
285:         }
286:         return $ret;
287:     }
288:     
289:     /**
290:      * @ignore
291:      */
292:     public function __get($key) {
293:         switch ($key) {
294:             case "id": return $this->get_id();
295:             case "name": return $this->get_name();
296:             case "bandWidthMbps": return $this->get_bandWidthMbps();
297:             case "serviceClass": return $this->get_serviceClass();
298:             default: return parent::__get($key);
299:         }
300:     }
301: 
302: }
303: 
304: 
API documentation generated by ApiGen 2.8.0