class Saklient::Cloud::Models::Model_DiskPlan

ディスクプランを検索するための機能を備えたクラス.

Attributes

_hdd[RW]

@private @return [Saklient::Cloud::Resources::DiskPlan]

_ssd[RW]

@private @return [Saklient::Cloud::Resources::DiskPlan]

hdd[R]

標準プラン

@return [Saklient::Cloud::Resources::DiskPlan]

ssd[R]

SSDプラン

@return [Saklient::Cloud::Resources::DiskPlan]

Public Class Methods

new(client) click to toggle source

@private @param [Saklient::Cloud::Client] client

Calls superclass method Saklient::Cloud::Models::Model::new
# File lib/saklient/cloud/models/model_disk_plan.rb, line 108
def initialize(client)
  super(client)
  Saklient::Util::validate_type(client, 'Saklient::Cloud::Client')
  @_hdd = nil
  @_ssd = nil
end

Public Instance Methods

filter_by(key, value, multiple = false) click to toggle source

Web APIのフィルタリング設定を直接指定します.

@param [String] key キー @param [any] value 値 @param [bool] multiple valueに配列を与え, OR条件で完全一致検索する場合にtrueを指定します. 通常, valueはスカラ値であいまい検索されます. @return [Model_DiskPlan]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 77
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
find() click to toggle source

リソースの検索リクエストを実行し, 結果をリストで取得します.

@return [Array<Saklient::Cloud::Resources::DiskPlan>] リソースオブジェクトの配列

# File lib/saklient/cloud/models/model_disk_plan.rb, line 102
def find
  return _find
end
get_by_id(id) click to toggle source

指定したIDを持つ唯一のリソースを取得します.

@param [String] id @return [Saklient::Cloud::Resources::DiskPlan] リソースオブジェクト

# File lib/saklient/cloud/models/model_disk_plan.rb, line 94
def get_by_id(id)
  Saklient::Util::validate_type(id, 'String')
  return _get_by_id(id)
end
limit(count) click to toggle source

次に取得するリストの上限レコード数を指定します.

@param [Fixnum] count 上限レコード数 @return [Model_DiskPlan] this

# File lib/saklient/cloud/models/model_disk_plan.rb, line 66
def limit(count)
  Saklient::Util::validate_type(count, 'Fixnum')
  return _limit(count)
end
offset(offset) click to toggle source

次に取得するリストの開始オフセットを指定します.

@param [Fixnum] offset オフセット @return [Model_DiskPlan] this

# File lib/saklient/cloud/models/model_disk_plan.rb, line 57
def offset(offset)
  Saklient::Util::validate_type(offset, 'Fixnum')
  return _offset(offset)
end
reset() click to toggle source

次のリクエストのために設定されているステートをすべて破棄します.

@return [Model_DiskPlan] this

# File lib/saklient/cloud/models/model_disk_plan.rb, line 86
def reset
  return _reset
end

Protected Instance Methods

_api_path() click to toggle source

@private @return [String]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 20
def _api_path
  return '/product/disk'
end
_class_name() click to toggle source

@private @return [String]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 38
def _class_name
  return 'DiskPlan'
end
_create_resource_impl(obj, wrapped = false) click to toggle source

@private @param [any] obj @param [bool] wrapped @return [Saklient::Cloud::Resources::Resource]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 46
def _create_resource_impl(obj, wrapped = false)
  Saklient::Util::validate_type(wrapped, 'bool')
  return Saklient::Cloud::Resources::DiskPlan.new(@_client, obj, wrapped)
end
_root_key() click to toggle source

@private @return [String]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 26
def _root_key
  return 'DiskPlan'
end
_root_key_m() click to toggle source

@private @return [String]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 32
def _root_key_m
  return 'DiskPlans'
end
get_hdd() click to toggle source

@private @return [Saklient::Cloud::Resources::DiskPlan]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 123
def get_hdd
  @_hdd = get_by_id('2') if (@_hdd).nil?
  return @_hdd
end
get_ssd() click to toggle source

@private @return [Saklient::Cloud::Resources::DiskPlan]

# File lib/saklient/cloud/models/model_disk_plan.rb, line 147
def get_ssd
  @_ssd = get_by_id('4') if (@_ssd).nil?
  return @_ssd
end