Class: Verizon::ResourcesServiceProfile

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

Overview

Information about the resource requirements and service characteristics of an edge application. The ‘maxLatencyMs` and `clientType` parameters are both required in the request body. Note: The `maxLatencyMs` value must be submitted in multiples of 5. Does not include serviceProfileId

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(client_type = nil, ecsp_filter = SKIP, client_schedule = SKIP, client_service_area = SKIP, network_resources = SKIP, compute_resources = SKIP, properties = SKIP) ⇒ ResourcesServiceProfile

Returns a new instance of ResourcesServiceProfile.



75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/verizon/models/resources_service_profile.rb', line 75

def initialize(client_type = nil, ecsp_filter = SKIP,
               client_schedule = SKIP, client_service_area = SKIP,
               network_resources = SKIP, compute_resources = SKIP,
               properties = SKIP)
  @client_type = client_type
  @ecsp_filter = ecsp_filter unless ecsp_filter == SKIP
  @client_schedule = client_schedule unless client_schedule == SKIP
  @client_service_area = client_service_area unless client_service_area == SKIP
  @network_resources = network_resources unless network_resources == SKIP
  @compute_resources = compute_resources unless compute_resources == SKIP
  @properties = properties unless properties == SKIP
end

Instance Attribute Details

#client_scheduleString

The expected operation schedule of the application client (e.g. time windows).

Returns:

  • (String)


26
27
28
# File 'lib/verizon/models/resources_service_profile.rb', line 26

def client_schedule
  @client_schedule
end

#client_service_areaString

The expected location(s) (e.g. route) of the hosting UE during the Client’s operation schedule.

Returns:

  • (String)


31
32
33
# File 'lib/verizon/models/resources_service_profile.rb', line 31

def client_service_area
  @client_service_area
end

#client_typeClientTypeEnum

The category of application client.

Returns:



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

def client_type
  @client_type
end

#compute_resourcesComputeResourcesType

Compute resources of a service profile.



39
40
41
# File 'lib/verizon/models/resources_service_profile.rb', line 39

def compute_resources
  @compute_resources
end

#ecsp_filterString

Identity of the preferred Edge Computing Service Provider.

Returns:

  • (String)


21
22
23
# File 'lib/verizon/models/resources_service_profile.rb', line 21

def ecsp_filter
  @ecsp_filter
end

#network_resourcesNetworkResourcesType

Network resources of a service profile.



35
36
37
# File 'lib/verizon/models/resources_service_profile.rb', line 35

def network_resources
  @network_resources
end

#propertiesMECPlatformsAdditionalSupportInfo

Additional service support information for the MEC platform.



43
44
45
# File 'lib/verizon/models/resources_service_profile.rb', line 43

def properties
  @properties
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
# File 'lib/verizon/models/resources_service_profile.rb', line 89

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  client_type = hash.key?('clientType') ? hash['clientType'] : nil
  ecsp_filter = hash.key?('ecspFilter') ? hash['ecspFilter'] : SKIP
  client_schedule =
    hash.key?('clientSchedule') ? hash['clientSchedule'] : SKIP
  client_service_area =
    hash.key?('clientServiceArea') ? hash['clientServiceArea'] : SKIP
  network_resources = NetworkResourcesType.from_hash(hash['networkResources']) if
    hash['networkResources']
  compute_resources = ComputeResourcesType.from_hash(hash['computeResources']) if
    hash['computeResources']
  properties = MECPlatformsAdditionalSupportInfo.from_hash(hash['properties']) if
    hash['properties']

  # Create object from extracted values.
  ResourcesServiceProfile.new(client_type,
                              ecsp_filter,
                              client_schedule,
                              client_service_area,
                              network_resources,
                              compute_resources,
                              properties)
end

.namesObject

A mapping from model property names to API property names.



46
47
48
49
50
51
52
53
54
55
56
# File 'lib/verizon/models/resources_service_profile.rb', line 46

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['client_type'] = 'clientType'
  @_hash['ecsp_filter'] = 'ecspFilter'
  @_hash['client_schedule'] = 'clientSchedule'
  @_hash['client_service_area'] = 'clientServiceArea'
  @_hash['network_resources'] = 'networkResources'
  @_hash['compute_resources'] = 'computeResources'
  @_hash['properties'] = 'properties'
  @_hash
end

.nullablesObject

An array for nullable fields



71
72
73
# File 'lib/verizon/models/resources_service_profile.rb', line 71

def self.nullables
  []
end

.optionalsObject

An array for optional fields



59
60
61
62
63
64
65
66
67
68
# File 'lib/verizon/models/resources_service_profile.rb', line 59

def self.optionals
  %w[
    ecsp_filter
    client_schedule
    client_service_area
    network_resources
    compute_resources
    properties
  ]
end