class Saklient::Cloud::Models::Model_Appliance
アプライアンスを検索・作成するための機能を備えたクラス.
Public Class Methods
@private @param [Saklient::Cloud::Client] client
Saklient::Cloud::Models::Model::new
# File lib/saklient/cloud/models/model_appliance.rb, line 190 def initialize(client) super(client) Saklient::Util::validate_type(client, 'Saklient::Cloud::Client') end
Public Instance Methods
@param [Saklient::Cloud::Resources::Swytch] swytch @param [Fixnum] vrid @param [Array<String>] realIps @param [bool] isHighSpec @return [Saklient::Cloud::Resources::LoadBalancer]
# File lib/saklient/cloud/models/model_appliance.rb, line 102 def create_load_balancer(swytch, vrid, realIps, isHighSpec = false) Saklient::Util::validate_type(swytch, 'Saklient::Cloud::Resources::Swytch') Saklient::Util::validate_type(vrid, 'Fixnum') Saklient::Util::validate_type(realIps, 'Array') Saklient::Util::validate_type(isHighSpec, 'bool') ret = Saklient::Cloud::Resources::LoadBalancer.new(@_client, nil) return ret.set_initial_params(swytch, vrid, realIps, isHighSpec) end
@return [Saklient::Cloud::Resources::VpcRouter]
# File lib/saklient/cloud/models/model_appliance.rb, line 112 def create_vpc_router ret = Saklient::Cloud::Resources::VpcRouter.new(@_client, nil) return ret end
Web APIのフィルタリング設定を直接指定します.
@param [String] key キー @param [any] value 値 @param [bool] multiple valueに配列を与え, OR条件で完全一致検索する場合にtrueを指定します. 通常, valueはスカラ値であいまい検索されます. @return [Model_Appliance]
# File lib/saklient/cloud/models/model_appliance.rb, line 84 def filter_by(key, value, multiple = false) Saklient::Util::validate_type(key, 'String') Saklient::Util::validate_type(multiple, 'bool') return _filter_by(key, value, multiple) end
リソースの検索リクエストを実行し, 結果をリストで取得します.
@return [Array<Saklient::Cloud::Resources::Appliance>] リソースオブジェクトの配列
# File lib/saklient/cloud/models/model_appliance.rb, line 129 def find return _find end
指定したIDを持つ唯一のリソースを取得します.
@param [String] id @return [Saklient::Cloud::Resources::Appliance] リソースオブジェクト
# File lib/saklient/cloud/models/model_appliance.rb, line 121 def get_by_id(id) Saklient::Util::validate_type(id, 'String') return _get_by_id(id) end
次に取得するリストの上限レコード数を指定します.
@param [Fixnum] count 上限レコード数 @return [Model_Appliance] this
# File lib/saklient/cloud/models/model_appliance.rb, line 73 def limit(count) Saklient::Util::validate_type(count, 'Fixnum') return _limit(count) end
次に取得するリストの開始オフセットを指定します.
@param [Fixnum] offset オフセット @return [Model_Appliance] this
# File lib/saklient/cloud/models/model_appliance.rb, line 64 def offset(offset) Saklient::Util::validate_type(offset, 'Fixnum') return _offset(offset) end
次のリクエストのために設定されているステートをすべて破棄します.
@return [Model_Appliance] this
# File lib/saklient/cloud/models/model_appliance.rb, line 93 def reset return _reset end
名前でソートします.
@todo Implement test case @param [bool] reverse @return [Model_Appliance]
# File lib/saklient/cloud/models/model_appliance.rb, line 183 def sort_by_name(reverse = false) Saklient::Util::validate_type(reverse, 'bool') return _sort_by_name(reverse) end
指定した文字列を名前に含むリソースに絞り込みます.
大文字・小文字は区別されません. 半角スペースで区切られた複数の文字列は, それらをすべて含むことが条件とみなされます.
@todo Implement test case @param [String] name @return [Model_Appliance]
# File lib/saklient/cloud/models/model_appliance.rb, line 141 def with_name_like(name) Saklient::Util::validate_type(name, 'String') return _with_name_like(name) end
指定したタグを持つリソースに絞り込みます.
複数のタグを指定する場合は withTags() を利用してください.
@todo Implement test case @param [String] tag @return [Model_Appliance]
# File lib/saklient/cloud/models/model_appliance.rb, line 153 def with_tag(tag) Saklient::Util::validate_type(tag, 'String') return _with_tag(tag) end
指定したDNFに合致するタグを持つリソースに絞り込みます.
@todo Implement test case @param [Array<Array<String>>] dnf @return [Model_Appliance]
# File lib/saklient/cloud/models/model_appliance.rb, line 173 def with_tag_dnf(dnf) Saklient::Util::validate_type(dnf, 'Array') return _with_tag_dnf(dnf) end
Protected Instance Methods
@private @return [String]
# File lib/saklient/cloud/models/model_appliance.rb, line 23 def _api_path return '/appliance' end
@private @return [String]
# File lib/saklient/cloud/models/model_appliance.rb, line 41 def _class_name return 'Appliance' end
@private @param [any] obj @param [bool] wrapped @return [Saklient::Cloud::Resources::Resource]
# File lib/saklient/cloud/models/model_appliance.rb, line 49 def _create_resource_impl(obj, wrapped = false) Saklient::Util::validate_type(wrapped, 'bool') ret = Saklient::Cloud::Resources::Appliance.new(@_client, obj, wrapped) clazz = ret.clazz return Saklient::Cloud::Resources::LoadBalancer.new(@_client, obj, wrapped) if clazz == 'loadbalancer' return Saklient::Cloud::Resources::VpcRouter.new(@_client, obj, wrapped) if clazz == 'vpcrouter' return ret end
@private @return [String]
# File lib/saklient/cloud/models/model_appliance.rb, line 29 def _root_key return 'Appliance' end
@private @return [String]
# File lib/saklient/cloud/models/model_appliance.rb, line 35 def _root_key_m return 'Appliances' end