class Saklient::Cloud::Resources::Region
リージョン情報.
Attributes
説明
@return [String]
ID
@return [String]
説明
@return [String]
ID
@return [String]
名前
@return [String]
@return [bool]
@return [bool]
@return [bool]
名前
@return [String]
Public Class Methods
@private @param [Saklient::Cloud::Client] client @param [any] obj @param [bool] wrapped
Saklient::Cloud::Resources::Resource::new
# File lib/saklient/cloud/resources/region.rb, line 69 def initialize(client, obj, wrapped = false) super(client) Saklient::Util::validate_type(client, 'Saklient::Cloud::Client') Saklient::Util::validate_type(wrapped, 'bool') api_deserialize(obj, wrapped) end
Public Instance Methods
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 55 def _class_name return 'Region' end
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 61 def _id return get_id end
# File lib/saklient/cloud/resources/region.rb, line 176 def description=(v) set_description(v) end
# File lib/saklient/cloud/resources/region.rb, line 136 def name=(v) set_name(v) end
Protected Instance Methods
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 35 def _api_path return '/region' end
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 41 def _root_key return 'Region' end
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 47 def _root_key_m return 'Regions' end
(This method is generated in Translator_default#buildImpl)
@param [any] r
# File lib/saklient/cloud/resources/region.rb, line 185 def api_deserialize_impl(r) @is_new = (r).nil? r = {} if @is_new @is_incomplete = false if Saklient::Util::exists_path(r, 'ID') @m_id = (Saklient::Util::get_by_path(r, 'ID')).nil? ? nil : Saklient::Util::get_by_path(r, 'ID').to_s else @m_id = nil @is_incomplete = true end @n_id = false if Saklient::Util::exists_path(r, 'Name') @m_name = (Saklient::Util::get_by_path(r, 'Name')).nil? ? nil : Saklient::Util::get_by_path(r, 'Name').to_s else @m_name = nil @is_incomplete = true end @n_name = false if Saklient::Util::exists_path(r, 'Description') @m_description = (Saklient::Util::get_by_path(r, 'Description')).nil? ? nil : Saklient::Util::get_by_path(r, 'Description').to_s else @m_description = nil @is_incomplete = true end @n_description = false end
@private @param [bool] withClean @return [any]
# File lib/saklient/cloud/resources/region.rb, line 215 def api_serialize_impl(withClean = false) Saklient::Util::validate_type(withClean, 'bool') missing = [] ret = {} Saklient::Util::set_by_path(ret, 'ID', @m_id) if withClean || @n_id if withClean || @n_name Saklient::Util::set_by_path(ret, 'Name', @m_name) else missing << 'name' if @is_new end Saklient::Util::set_by_path(ret, 'Description', @m_description) if withClean || @n_description raise Saklient::Errors::SaklientException.new('required_field', 'Required fields must be set before the Region creation: ' + missing.join(', ')) if missing.length > 0 return ret end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 149 def get_description return @m_description end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 85 def get_id return @m_id end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/region.rb, line 109 def get_name return @m_name end
(This method is generated in Translator_default#buildImpl)
@private @param [String] v @return [String]
# File lib/saklient/cloud/resources/region.rb, line 158 def set_description(v) Saklient::Util::validate_type(v, 'String') @m_description = v @n_description = true return @m_description end
(This method is generated in Translator_default#buildImpl)
@private @param [String] v @return [String]
# File lib/saklient/cloud/resources/region.rb, line 118 def set_name(v) Saklient::Util::validate_type(v, 'String') @m_name = v @n_name = true return @m_name end