Class: Verizon::ListMECPlatformsResult

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/verizon/models/list_mec_platforms_result.rb

Overview

Response to return the optimal 5G Edge platforms for deployment based on a region, service profile of the service that you want to deploy or user equipment.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(mec_platforms = SKIP) ⇒ ListMECPlatformsResult

Returns a new instance of ListMECPlatformsResult.



38
39
40
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 38

def initialize(mec_platforms = SKIP)
  @mec_platforms = mec_platforms unless mec_platforms == SKIP
end

Instance Attribute Details

#mec_platformsArray[MECPlatformResource]

A list of optimal MEC Platforms where you can register your deployed application.

Returns:



17
18
19
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 17

def mec_platforms
  @mec_platforms
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 43

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  # Parameter is an array, so we need to iterate through it
  mec_platforms = nil
  unless hash['MECPlatforms'].nil?
    mec_platforms = []
    hash['MECPlatforms'].each do |structure|
      mec_platforms << (MECPlatformResource.from_hash(structure) if structure)
    end
  end

  mec_platforms = SKIP unless hash.key?('MECPlatforms')

  # Create object from extracted values.
  ListMECPlatformsResult.new(mec_platforms)
end

.namesObject

A mapping from model property names to API property names.



20
21
22
23
24
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 20

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['mec_platforms'] = 'MECPlatforms'
  @_hash
end

.nullablesObject

An array for nullable fields



34
35
36
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 34

def self.nullables
  []
end

.optionalsObject

An array for optional fields



27
28
29
30
31
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 27

def self.optionals
  %w[
    mec_platforms
  ]
end