Class: Saklient::Cloud::Resources::ServerPlan

Inherits:
Resource
  • Object
show all
Defined in:
lib/saklient/cloud/resources/server_plan.rb

Overview

サーバプラン情報の1レコードに対応するクラス.

Instance Attribute Summary collapse

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#api_deserialize, #api_serialize, create_with, #destroy, #dump, #exists, #request_retry, #set_param

Constructor Details

#initialize(client, obj, wrapped = false) ⇒ ServerPlan

Returns a new instance of ServerPlan.

Parameters:



78
79
80
81
82
83
# File 'lib/saklient/cloud/resources/server_plan.rb', line 78

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

Instance Attribute Details

#cpuFixnum (readonly)

仮想コア数

Returns:

  • (Fixnum)


169
170
171
# File 'lib/saklient/cloud/resources/server_plan.rb', line 169

def cpu
  @cpu
end

#idString (readonly)

ID

Returns:

  • (String)


121
122
123
# File 'lib/saklient/cloud/resources/server_plan.rb', line 121

def id
  @id
end

#memory_gibFixnum (readonly)

Returns:

  • (Fixnum)


97
98
99
# File 'lib/saklient/cloud/resources/server_plan.rb', line 97

def memory_gib
  @memory_gib
end

#memory_mibFixnum (readonly)

Returns:

  • (Fixnum)


193
194
195
# File 'lib/saklient/cloud/resources/server_plan.rb', line 193

def memory_mib
  @memory_mib
end

#nameString (readonly)

名前

Returns:

  • (String)


145
146
147
# File 'lib/saklient/cloud/resources/server_plan.rb', line 145

def name
  @name
end

#service_classString (readonly)

サービスクラス

Returns:

  • (String)


217
218
219
# File 'lib/saklient/cloud/resources/server_plan.rb', line 217

def service_class
  @service_class
end

Instance Method Details

#_class_nameString

Returns:

  • (String)


64
65
66
# File 'lib/saklient/cloud/resources/server_plan.rb', line 64

def _class_name
  return 'ServerPlan'
end

#_idString

Returns:

  • (String)


70
71
72
# File 'lib/saklient/cloud/resources/server_plan.rb', line 70

def _id
  return get_id
end