Class: Verizon::MECPlatformResource

Inherits:
BaseModel
  • Object
show all
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

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

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

#ernString

Edge Resource Name. A string identifier for a set of edge resources.

Returns:

  • (String)


16
17
18
# File 'lib/verizon/models/mec_platform_resource.rb', line 16

def ern
  @ern
end

#propertiesObject

Status of the MEC Platform (default is ‘unknown’)

Returns:

  • (Object)


33
34
35
# File 'lib/verizon/models/mec_platform_resource.rb', line 33

def properties
  @properties
end

#regionString

MEC region name. Current valid values are US_WEST_2 and US_EAST_1.

Returns:

  • (String)


25
26
27
# File 'lib/verizon/models/mec_platform_resource.rb', line 25

def region
  @region
end

#statusMECPlatformStatusEnum

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

#zoneString

Unique identifier representing a zone. Note: This will have a null value as a placeholder.

Returns:

  • (String)


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

.namesObject

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

.nullablesObject

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

.optionalsObject

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