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/Cloud/Resources/Swytch.php";
 10: use \Saklient\Cloud\Resources\Swytch;
 11: require_once __DIR__ . "/../../../Saklient/Util.php";
 12: use \Saklient\Util;
 13: require_once __DIR__ . "/../../../Saklient/Errors/SaklientException.php";
 14: use \Saklient\Errors\SaklientException;
 15: 
 16: /**
 17:  * IPv6ネットワークの実体1つに対応し、属性の取得や操作を行うためのクラス。
 18:  * 
 19:  * @property-read string $id ID 
 20:  * @property-read string $prefix ネットワークプレフィックス 
 21:  * @property-read int $prefixLen ネットワークプレフィックス長 
 22:  * @property-read string $prefixTail このネットワーク範囲における最後のIPv6アドレス 
 23:  */
 24: class Ipv6Net extends Resource {
 25:     
 26:     /**
 27:      * ID
 28:      * 
 29:      * @access protected
 30:      * @ignore
 31:      * @var string
 32:      */
 33:     protected $m_id;
 34:     
 35:     /**
 36:      * ネットワークプレフィックス
 37:      * 
 38:      * @access protected
 39:      * @ignore
 40:      * @var string
 41:      */
 42:     protected $m_prefix;
 43:     
 44:     /**
 45:      * ネットワークプレフィックス長
 46:      * 
 47:      * @access protected
 48:      * @ignore
 49:      * @var int
 50:      */
 51:     protected $m_prefixLen;
 52:     
 53:     /**
 54:      * このネットワーク範囲における最後のIPv6アドレス
 55:      * 
 56:      * @access protected
 57:      * @ignore
 58:      * @var string
 59:      */
 60:     protected $m_prefixTail;
 61:     
 62:     /**
 63:      * @private
 64:      * @access protected
 65:      * @ignore
 66:      * @return string
 67:      */
 68:     protected function _apiPath()
 69:     {
 70:         return "/ipv6net";
 71:     }
 72:     
 73:     /**
 74:      * @private
 75:      * @access protected
 76:      * @ignore
 77:      * @return string
 78:      */
 79:     protected function _rootKey()
 80:     {
 81:         return "IPv6Net";
 82:     }
 83:     
 84:     /**
 85:      * @private
 86:      * @access protected
 87:      * @ignore
 88:      * @return string
 89:      */
 90:     protected function _rootKeyM()
 91:     {
 92:         return "IPv6Nets";
 93:     }
 94:     
 95:     /**
 96:      * @private
 97:      * @access public
 98:      * @ignore
 99:      * @return string
100:      */
101:     public function _className()
102:     {
103:         return "Ipv6Net";
104:     }
105:     
106:     /**
107:      * @private
108:      * @access public
109:      * @ignore
110:      * @return string
111:      */
112:     public function _id()
113:     {
114:         return $this->get_id();
115:     }
116:     
117:     /**
118:      * 最新のリソース情報を再取得します。
119:      * 
120:      * @access public
121:      * @return \Saklient\Cloud\Resources\Swytch this
122:      */
123:     public function reload()
124:     {
125:         return $this->_reload();
126:     }
127:     
128:     /**
129:      * @ignore
130:      * @access public
131:      * @param \Saklient\Cloud\Client $client
132:      * @param mixed $obj
133:      * @param boolean $wrapped=false
134:      */
135:     public function __construct(\Saklient\Cloud\Client $client, $obj, $wrapped=false)
136:     {
137:         parent::__construct($client);
138:         Util::validateArgCount(func_num_args(), 2);
139:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
140:         Util::validateType($wrapped, "boolean");
141:         $this->apiDeserialize($obj, $wrapped);
142:     }
143:     
144:     /**
145:      * @access private
146:      * @ignore
147:      * @var boolean
148:      */
149:     private $n_id = false;
150:     
151:     /**
152:      * (This method is generated in Translator_default#buildImpl)
153:      * 
154:      * @access private
155:      * @ignore
156:      * @return string
157:      */
158:     private function get_id()
159:     {
160:         return $this->m_id;
161:     }
162:     
163:     
164:     
165:     /**
166:      * @access private
167:      * @ignore
168:      * @var boolean
169:      */
170:     private $n_prefix = false;
171:     
172:     /**
173:      * (This method is generated in Translator_default#buildImpl)
174:      * 
175:      * @access private
176:      * @ignore
177:      * @return string
178:      */
179:     private function get_prefix()
180:     {
181:         return $this->m_prefix;
182:     }
183:     
184:     
185:     
186:     /**
187:      * @access private
188:      * @ignore
189:      * @var boolean
190:      */
191:     private $n_prefixLen = false;
192:     
193:     /**
194:      * (This method is generated in Translator_default#buildImpl)
195:      * 
196:      * @access private
197:      * @ignore
198:      * @return int
199:      */
200:     private function get_prefixLen()
201:     {
202:         return $this->m_prefixLen;
203:     }
204:     
205:     
206:     
207:     /**
208:      * @access private
209:      * @ignore
210:      * @var boolean
211:      */
212:     private $n_prefixTail = false;
213:     
214:     /**
215:      * (This method is generated in Translator_default#buildImpl)
216:      * 
217:      * @access private
218:      * @ignore
219:      * @return string
220:      */
221:     private function get_prefixTail()
222:     {
223:         return $this->m_prefixTail;
224:     }
225:     
226:     
227:     
228:     /**
229:      * (This method is generated in Translator_default#buildImpl)
230:      * 
231:      * @access protected
232:      * @ignore
233:      * @param mixed $r
234:      */
235:     protected function apiDeserializeImpl($r)
236:     {
237:         Util::validateArgCount(func_num_args(), 1);
238:         $this->isNew = $r == null;
239:         if ($this->isNew) {
240:             $r = (object)[];
241:         }
242:         $this->isIncomplete = false;
243:         if (Util::existsPath($r, "ID")) {
244:             $this->m_id = Util::getByPath($r, "ID") == null ? null : "" . Util::getByPath($r, "ID");
245:         }
246:         else {
247:             $this->m_id = null;
248:             $this->isIncomplete = true;
249:         }
250:         $this->n_id = false;
251:         if (Util::existsPath($r, "IPv6Prefix")) {
252:             $this->m_prefix = Util::getByPath($r, "IPv6Prefix") == null ? null : "" . Util::getByPath($r, "IPv6Prefix");
253:         }
254:         else {
255:             $this->m_prefix = null;
256:             $this->isIncomplete = true;
257:         }
258:         $this->n_prefix = false;
259:         if (Util::existsPath($r, "IPv6PrefixLen")) {
260:             $this->m_prefixLen = Util::getByPath($r, "IPv6PrefixLen") == null ? null : intval("" . Util::getByPath($r, "IPv6PrefixLen"));
261:         }
262:         else {
263:             $this->m_prefixLen = null;
264:             $this->isIncomplete = true;
265:         }
266:         $this->n_prefixLen = false;
267:         if (Util::existsPath($r, "IPv6PrefixTail")) {
268:             $this->m_prefixTail = Util::getByPath($r, "IPv6PrefixTail") == null ? null : "" . Util::getByPath($r, "IPv6PrefixTail");
269:         }
270:         else {
271:             $this->m_prefixTail = null;
272:             $this->isIncomplete = true;
273:         }
274:         $this->n_prefixTail = false;
275:     }
276:     
277:     /**
278:      * @ignore
279:      * @access protected
280:      * @param boolean $withClean=false
281:      * @return mixed
282:      */
283:     protected function apiSerializeImpl($withClean=false)
284:     {
285:         Util::validateType($withClean, "boolean");
286:         $ret = (object)[];
287:         if ($withClean || $this->n_id) {
288:             Util::setByPath($ret, "ID", $this->m_id);
289:         }
290:         if ($withClean || $this->n_prefix) {
291:             Util::setByPath($ret, "IPv6Prefix", $this->m_prefix);
292:         }
293:         if ($withClean || $this->n_prefixLen) {
294:             Util::setByPath($ret, "IPv6PrefixLen", $this->m_prefixLen);
295:         }
296:         if ($withClean || $this->n_prefixTail) {
297:             Util::setByPath($ret, "IPv6PrefixTail", $this->m_prefixTail);
298:         }
299:         return $ret;
300:     }
301:     
302:     /**
303:      * @ignore
304:      */
305:     public function __get($key) {
306:         switch ($key) {
307:             case "id": return $this->get_id();
308:             case "prefix": return $this->get_prefix();
309:             case "prefixLen": return $this->get_prefixLen();
310:             case "prefixTail": return $this->get_prefixTail();
311:             default: return parent::__get($key);
312:         }
313:     }
314: 
315: }
316: 
317: 
API documentation generated by ApiGen 2.8.0