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 ⇒ MecPlatformStatus
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.
-
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
Instance Method Summary collapse
-
#initialize(ern: SKIP, zone: SKIP, region: SKIP, status: MecPlatformStatus::UNKNOWN, properties: SKIP) ⇒ MecPlatformResource
constructor
A new instance of MecPlatformResource.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(ern: SKIP, zone: SKIP, region: SKIP, status: MecPlatformStatus::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: MecPlatformStatus::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 ⇒ MecPlatformStatus
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 91 92 |
# 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'] ||= MecPlatformStatus::UNKNOWN properties = hash.key?('properties') ? APIHelper.deserialize_union_type( UnionTypeLookUp.get(:MecPlatformResourceProperties), hash['properties'] ) : SKIP # Create object from extracted values. MecPlatformResource.new(ern: ern, zone: zone, region: region, status: status, properties: 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 |
.validate(value) ⇒ Object
Validates an instance of the object from a given value.
96 97 98 99 100 101 102 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 96 def self.validate(value) return true if value.instance_of? self return false unless value.instance_of? Hash true end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
112 113 114 115 116 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 112 def inspect class_name = self.class.name.split('::').last "<#{class_name} ern: #{@ern.inspect}, zone: #{@zone.inspect}, region: #{@region.inspect},"\ " status: #{@status.inspect}, properties: #{@properties.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
105 106 107 108 109 |
# File 'lib/verizon/models/mec_platform_resource.rb', line 105 def to_s class_name = self.class.name.split('::').last "<#{class_name} ern: #{@ern}, zone: #{@zone}, region: #{@region}, status: #{@status},"\ " properties: #{@properties}>" end |