Class: Verizon::MECPlatformResource
- Defined in:
- lib/verizon/models/mec_platform_resource.rb
Overview
5G Edge platform used for deployment of a service. The ern of each platform contains the name of the matching AWS Wavelength zone that can be used when deploying.
Instance Attribute Summary collapse
-
#ern ⇒ String
Edge Resource Name.
-
#properties ⇒ Object
Status of the MEC Platform (default is ‘unknown’).
-
#region ⇒ String
MEC region name.
-
#status ⇒ MECPlatformStatusEnum
Status of the MEC Platform (default is ‘unknown’).
-
#zone ⇒ String
Unique identifier representing a zone.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(ern = SKIP, zone = SKIP, region = SKIP, status = MECPlatformStatusEnum::UNKNOWN, properties = SKIP) ⇒ MECPlatformResource
constructor
A new instance of MECPlatformResource.
Methods inherited from BaseModel
Constructor Details
#initialize(ern = SKIP, zone = SKIP, region = SKIP, status = MECPlatformStatusEnum::UNKNOWN, properties = SKIP) ⇒ MECPlatformResource
Returns a new instance of MECPlatformResource.
64 65 66 67 68 69 70 71 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 64 def initialize(ern = SKIP, zone = SKIP, region = SKIP, status = MECPlatformStatusEnum::UNKNOWN, properties = SKIP) @ern = ern unless ern == SKIP @zone = zone unless zone == SKIP @region = region unless region == SKIP @status = status unless status == SKIP @properties = properties unless properties == SKIP end |
Instance Attribute Details
#ern ⇒ String
Edge Resource Name. A string identifier for a set of edge resources.
16 17 18 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 16 def ern @ern end |
#properties ⇒ Object
Status of the MEC Platform (default is ‘unknown’)
33 34 35 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 33 def properties @properties end |
#region ⇒ String
MEC region name. Current valid values are US_WEST_2 and US_EAST_1.
25 26 27 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 25 def region @region end |
#status ⇒ MECPlatformStatusEnum
Status of the MEC Platform (default is ‘unknown’)
29 30 31 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 29 def status @status end |
#zone ⇒ String
Unique identifier representing a zone. Note: This will have a null value as a placeholder.
21 22 23 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 21 def zone @zone end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 74 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. ern = hash.key?('ern') ? hash['ern'] : SKIP zone = hash.key?('zone') ? hash['zone'] : SKIP region = hash.key?('region') ? hash['region'] : SKIP status = hash['status'] ||= MECPlatformStatusEnum::UNKNOWN properties = hash.key?('properties') ? hash['properties'] : SKIP # Create object from extracted values. MECPlatformResource.new(ern, zone, region, status, properties) end |
.names ⇒ Object
A mapping from model property names to API property names.
36 37 38 39 40 41 42 43 44 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 36 def self.names @_hash = {} if @_hash.nil? @_hash['ern'] = 'ern' @_hash['zone'] = 'zone' @_hash['region'] = 'region' @_hash['status'] = 'status' @_hash['properties'] = 'properties' @_hash end |
.nullables ⇒ Object
An array for nullable fields
58 59 60 61 62 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 58 def self.nullables %w[ zone ] end |
.optionals ⇒ Object
An array for optional fields
47 48 49 50 51 52 53 54 55 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 47 def self.optionals %w[ ern zone region status properties ] end |