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

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #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: 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

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



69
70
71
72
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 69

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} mec_platforms: #{@mec_platforms.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



63
64
65
66
# File 'lib/verizon/models/list_mec_platforms_result.rb', line 63

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} mec_platforms: #{@mec_platforms}>"
end