Class: Verizon::ResourcesServiceProfileWithId

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

Overview

Information about the resource requirements and service characteristics of an edge application. Includes serviceProfileId. Used when retrieving a service profile.

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, service_profile_id = SKIP, ecsp_filter = SKIP, client_schedule = SKIP, client_service_area = SKIP, network_resources = SKIP, compute_resources = SKIP, properties = SKIP) ⇒ ResourcesServiceProfileWithId

Returns a new instance of ResourcesServiceProfileWithId.



80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 80

def initialize(client_type = nil,
               service_profile_id = SKIP,
               ecsp_filter = SKIP,
               client_schedule = SKIP,
               client_service_area = SKIP,
               network_resources = SKIP,
               compute_resources = SKIP,
               properties = SKIP)
  @service_profile_id = service_profile_id unless service_profile_id == 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)


29
30
31
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 29

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)


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

def client_service_area
  @client_service_area
end

#client_typeClientTypeEnum

The category of application client.

Returns:



20
21
22
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 20

def client_type
  @client_type
end

#compute_resourcesComputeResourcesType

Compute resources of a service profile.



42
43
44
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 42

def compute_resources
  @compute_resources
end

#ecsp_filterString

Identity of the preferred Edge Computing Service Provider.

Returns:

  • (String)


24
25
26
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 24

def ecsp_filter
  @ecsp_filter
end

#network_resourcesNetworkResourcesType

Network resources of a service profile.



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

def network_resources
  @network_resources
end

#propertiesMECPlatformsAdditionalSupportInfo

Additional service support information for the MEC platform.



46
47
48
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 46

def properties
  @properties
end

#service_profile_idString

Unique identifier for a service profile.

Returns:

  • (String)


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

def service_profile_id
  @service_profile_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 99

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  client_type = hash.key?('clientType') ? hash['clientType'] : nil
  service_profile_id =
    hash.key?('serviceProfileId') ? hash['serviceProfileId'] : SKIP
  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.
  ResourcesServiceProfileWithId.new(client_type,
                                    service_profile_id,
                                    ecsp_filter,
                                    client_schedule,
                                    client_service_area,
                                    network_resources,
                                    compute_resources,
                                    properties)
end

.namesObject

A mapping from model property names to API property names.



49
50
51
52
53
54
55
56
57
58
59
60
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 49

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['service_profile_id'] = 'serviceProfileId'
  @_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



76
77
78
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 76

def self.nullables
  []
end

.optionalsObject

An array for optional fields



63
64
65
66
67
68
69
70
71
72
73
# File 'lib/verizon/models/resources_service_profile_with_id.rb', line 63

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