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/Enums/EStorageClass.php";
 10: use \Saklient\Cloud\Enums\EStorageClass;
 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:  * ディスクプラン情報の1レコードに対応するクラス。
 18:  * 
 19:  * @property-read string $id ID 
 20:  * @property-read string $name 名前 
 21:  * @property-read string $storageClass ストレージクラス {@link \Saklient\Cloud\Enums\EStorageClass} 
 22:  */
 23: class DiskPlan extends Resource {
 24:     
 25:     /**
 26:      * ID
 27:      * 
 28:      * @access protected
 29:      * @ignore
 30:      * @var string
 31:      */
 32:     protected $m_id;
 33:     
 34:     /**
 35:      * 名前
 36:      * 
 37:      * @access protected
 38:      * @ignore
 39:      * @var string
 40:      */
 41:     protected $m_name;
 42:     
 43:     /**
 44:      * ストレージクラス {@link \Saklient\Cloud\Enums\EStorageClass}
 45:      * 
 46:      * @access protected
 47:      * @ignore
 48:      * @var string
 49:      */
 50:     protected $m_storageClass;
 51:     
 52:     /**
 53:      * @private
 54:      * @access protected
 55:      * @ignore
 56:      * @return string
 57:      */
 58:     protected function _apiPath()
 59:     {
 60:         return "/product/disk";
 61:     }
 62:     
 63:     /**
 64:      * @private
 65:      * @access protected
 66:      * @ignore
 67:      * @return string
 68:      */
 69:     protected function _rootKey()
 70:     {
 71:         return "DiskPlan";
 72:     }
 73:     
 74:     /**
 75:      * @private
 76:      * @access protected
 77:      * @ignore
 78:      * @return string
 79:      */
 80:     protected function _rootKeyM()
 81:     {
 82:         return "DiskPlans";
 83:     }
 84:     
 85:     /**
 86:      * @private
 87:      * @access public
 88:      * @ignore
 89:      * @return string
 90:      */
 91:     public function _className()
 92:     {
 93:         return "DiskPlan";
 94:     }
 95:     
 96:     /**
 97:      * @private
 98:      * @access public
 99:      * @ignore
100:      * @return string
101:      */
102:     public function _id()
103:     {
104:         return $this->get_id();
105:     }
106:     
107:     /**
108:      * @ignore
109:      * @access public
110:      * @param \Saklient\Cloud\Client $client
111:      * @param mixed $obj
112:      * @param boolean $wrapped=false
113:      */
114:     public function __construct(\Saklient\Cloud\Client $client, $obj, $wrapped=false)
115:     {
116:         parent::__construct($client);
117:         Util::validateArgCount(func_num_args(), 2);
118:         Util::validateType($client, "\\Saklient\\Cloud\\Client");
119:         Util::validateType($wrapped, "boolean");
120:         $this->apiDeserialize($obj, $wrapped);
121:     }
122:     
123:     /**
124:      * @access private
125:      * @ignore
126:      * @var boolean
127:      */
128:     private $n_id = false;
129:     
130:     /**
131:      * (This method is generated in Translator_default#buildImpl)
132:      * 
133:      * @access private
134:      * @ignore
135:      * @return string
136:      */
137:     private function get_id()
138:     {
139:         return $this->m_id;
140:     }
141:     
142:     
143:     
144:     /**
145:      * @access private
146:      * @ignore
147:      * @var boolean
148:      */
149:     private $n_name = 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_name()
159:     {
160:         return $this->m_name;
161:     }
162:     
163:     
164:     
165:     /**
166:      * @access private
167:      * @ignore
168:      * @var boolean
169:      */
170:     private $n_storageClass = 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_storageClass()
180:     {
181:         return $this->m_storageClass;
182:     }
183:     
184:     
185:     
186:     /**
187:      * (This method is generated in Translator_default#buildImpl)
188:      * 
189:      * @access protected
190:      * @ignore
191:      * @param mixed $r
192:      */
193:     protected function apiDeserializeImpl($r)
194:     {
195:         Util::validateArgCount(func_num_args(), 1);
196:         $this->isNew = $r == null;
197:         if ($this->isNew) {
198:             $r = (object)[];
199:         }
200:         $this->isIncomplete = false;
201:         if (Util::existsPath($r, "ID")) {
202:             $this->m_id = Util::getByPath($r, "ID") == null ? null : "" . Util::getByPath($r, "ID");
203:         }
204:         else {
205:             $this->m_id = null;
206:             $this->isIncomplete = true;
207:         }
208:         $this->n_id = false;
209:         if (Util::existsPath($r, "Name")) {
210:             $this->m_name = Util::getByPath($r, "Name") == null ? null : "" . Util::getByPath($r, "Name");
211:         }
212:         else {
213:             $this->m_name = null;
214:             $this->isIncomplete = true;
215:         }
216:         $this->n_name = false;
217:         if (Util::existsPath($r, "StorageClass")) {
218:             $this->m_storageClass = Util::getByPath($r, "StorageClass") == null ? null : "" . Util::getByPath($r, "StorageClass");
219:         }
220:         else {
221:             $this->m_storageClass = null;
222:             $this->isIncomplete = true;
223:         }
224:         $this->n_storageClass = false;
225:     }
226:     
227:     /**
228:      * @ignore
229:      * @access protected
230:      * @param boolean $withClean=false
231:      * @return mixed
232:      */
233:     protected function apiSerializeImpl($withClean=false)
234:     {
235:         Util::validateType($withClean, "boolean");
236:         $ret = (object)[];
237:         if ($withClean || $this->n_id) {
238:             Util::setByPath($ret, "ID", $this->m_id);
239:         }
240:         if ($withClean || $this->n_name) {
241:             Util::setByPath($ret, "Name", $this->m_name);
242:         }
243:         if ($withClean || $this->n_storageClass) {
244:             Util::setByPath($ret, "StorageClass", $this->m_storageClass);
245:         }
246:         return $ret;
247:     }
248:     
249:     /**
250:      * @ignore
251:      */
252:     public function __get($key) {
253:         switch ($key) {
254:             case "id": return $this->get_id();
255:             case "name": return $this->get_name();
256:             case "storageClass": return $this->get_storageClass();
257:             default: return parent::__get($key);
258:         }
259:     }
260: 
261: }
262: 
263: 
API documentation generated by ApiGen 2.8.0