Class: Ionoscloud::Type
- Inherits:
-
Object
- Object
- Ionoscloud::Type
- Defined in:
- lib/ionoscloud/models/type.rb
Constant Summary collapse
- DATACENTER =
"datacenter".freeze
- SERVER =
"server".freeze
- VOLUME =
"volume".freeze
- NIC =
"nic".freeze
- LOADBALANCER =
"loadbalancer".freeze
- LOCATION =
"location".freeze
- FIREWALL_RULE =
"firewall-rule".freeze
- IMAGE =
"image".freeze
- SNAPSHOT =
"snapshot".freeze
- LAN =
"lan".freeze
- IPBLOCK =
"ipblock".freeze
- PCC =
"pcc".freeze
- CONTRACT =
"contract".freeze
- USER =
"user".freeze
- GROUP =
"group".freeze
- COLLECTION =
"collection".freeze
- RESOURCE =
"resource".freeze
- REQUEST =
"request".freeze
- REQUEST_STATUS =
"request-status".freeze
- S3KEY =
"s3key".freeze
- BACKUPUNIT =
"backupunit".freeze
- LABEL =
"label".freeze
- K8S =
"k8s".freeze
- NODEPOOL =
"nodepool".freeze
- NODE =
"node".freeze
Class Method Summary collapse
-
.build_from_hash(value) ⇒ String
Builds the enum from string.
Instance Method Summary collapse
-
#build_from_hash(value) ⇒ String
Builds the enum from string.
Class Method Details
.build_from_hash(value) ⇒ String
Builds the enum from string
47 48 49 |
# File 'lib/ionoscloud/models/type.rb', line 47 def self.build_from_hash(value) new.build_from_hash(value) end |
Instance Method Details
#build_from_hash(value) ⇒ String
Builds the enum from string
54 55 56 57 58 |
# File 'lib/ionoscloud/models/type.rb', line 54 def build_from_hash(value) constantValues = Type.constants.select { |c| Type::const_get(c) == value } raise "Invalid ENUM value #{value} for class #Type" if constantValues.empty? value end |