class Saklient::Cloud::Resources::Icon
アイコンの実体1つに対応し, 属性の取得や操作を行うためのクラス.
Attributes
ID
@return [String]
ID
@return [String]
名前
@return [String]
スコープ {Saklient::Cloud::Enums::EScope}
@return [String]
URL
@return [String]
@return [bool]
@return [bool]
@return [bool]
@return [bool]
名前
@return [String]
スコープ {Saklient::Cloud::Enums::EScope}
@return [String]
URL
@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/icon.rb, line 88 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/icon.rb, line 60 def _class_name return 'Icon' end
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 66 def _id return get_id end
# File lib/saklient/cloud/resources/icon.rb, line 179 def name=(v) set_name(v) end
最新のリソース情報を再取得します.
@return [Icon] this
# File lib/saklient/cloud/resources/icon.rb, line 80 def reload return _reload end
このローカルオブジェクトに現在設定されているリソース情報をAPIに送信し, 新規作成または上書き保存します.
@return [Icon] this
# File lib/saklient/cloud/resources/icon.rb, line 73 def save return _save end
Protected Instance Methods
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 40 def _api_path return '/icon' end
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 46 def _root_key return 'Icon' end
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 52 def _root_key_m return 'Icons' end
(This method is generated in Translator_default#buildImpl)
@param [any] r
# File lib/saklient/cloud/resources/icon.rb, line 212 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, 'Scope') @m_scope = (Saklient::Util::get_by_path(r, 'Scope')).nil? ? nil : Saklient::Util::get_by_path(r, 'Scope').to_s else @m_scope = nil @is_incomplete = true end @n_scope = 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, 'URL') @m_url = (Saklient::Util::get_by_path(r, 'URL')).nil? ? nil : Saklient::Util::get_by_path(r, 'URL').to_s else @m_url = nil @is_incomplete = true end @n_url = false end
@private @param [bool] withClean @return [any]
# File lib/saklient/cloud/resources/icon.rb, line 249 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 Saklient::Util::set_by_path(ret, 'Scope', @m_scope) if withClean || @n_scope 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, 'URL', @m_url) if withClean || @n_url raise Saklient::Errors::SaklientException.new('required_field', 'Required fields must be set before the Icon 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/icon.rb, line 104 def get_id return @m_id end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 152 def get_name return @m_name end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 128 def get_scope return @m_scope end
(This method is generated in Translator_default#buildImpl)
@private @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 192 def get_url return @m_url end
(This method is generated in Translator_default#buildImpl)
@private @param [String] v @return [String]
# File lib/saklient/cloud/resources/icon.rb, line 161 def set_name(v) Saklient::Util::validate_type(v, 'String') @m_name = v @n_name = true return @m_name end