Class: Verizon::ResourcesEdgeHostedServiceWithProfileId

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

Overview

Edge hosted service represented by Service Endpoint definition.

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(ern: SKIP, service_endpoint: SKIP, application_server_provider_id: SKIP, application_id: SKIP, service_description: SKIP, service_profile_id: SKIP, additional_properties: nil) ⇒ ResourcesEdgeHostedServiceWithProfileId

Returns a new instance of ResourcesEdgeHostedServiceWithProfileId.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 65

def initialize(ern: SKIP, service_endpoint: SKIP,
               application_server_provider_id: SKIP, application_id: SKIP,
               service_description: SKIP, service_profile_id: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @ern = ern unless ern == SKIP
  @service_endpoint = service_endpoint unless service_endpoint == SKIP
  unless application_server_provider_id == SKIP
    @application_server_provider_id =
      application_server_provider_id
  end
  @application_id = application_id unless application_id == SKIP
  @service_description = service_description unless service_description == SKIP
  @service_profile_id = service_profile_id unless service_profile_id == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#application_idString

Unique ID representing the Edge Application.

Returns:

  • (String)


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

def application_id
  @application_id
end

#application_server_provider_idString

Unique ID representing the Edge Application Provider.

Returns:

  • (String)


22
23
24
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 22

def application_server_provider_id
  @application_server_provider_id
end

#ernString

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

Returns:

  • (String)


14
15
16
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 14

def ern
  @ern
end

#service_descriptionString

Unique ID representing the Edge Application.

Returns:

  • (String)


30
31
32
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 30

def service_description
  @service_description
end

#service_endpointResourcesServiceEndpoint

Service Endpoint path, address, and port.



18
19
20
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 18

def service_endpoint
  @service_endpoint
end

#service_profile_idString

The system assigned ID of the service profile.

Returns:

  • (String)


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

def service_profile_id
  @service_profile_id
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



85
86
87
88
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
115
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 85

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  ern = hash.key?('ern') ? hash['ern'] : SKIP
  service_endpoint = ResourcesServiceEndpoint.from_hash(hash['serviceEndpoint']) if
    hash['serviceEndpoint']
  application_server_provider_id =
    hash.key?('applicationServerProviderId') ? hash['applicationServerProviderId'] : SKIP
  application_id = hash.key?('applicationId') ? hash['applicationId'] : SKIP
  service_description =
    hash.key?('serviceDescription') ? hash['serviceDescription'] : SKIP
  service_profile_id =
    hash.key?('serviceProfileID') ? hash['serviceProfileID'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ResourcesEdgeHostedServiceWithProfileId.new(ern: ern,
                                              service_endpoint: service_endpoint,
                                              application_server_provider_id: application_server_provider_id,
                                              application_id: application_id,
                                              service_description: service_description,
                                              service_profile_id: service_profile_id,
                                              additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['ern'] = 'ern'
  @_hash['service_endpoint'] = 'serviceEndpoint'
  @_hash['application_server_provider_id'] = 'applicationServerProviderId'
  @_hash['application_id'] = 'applicationId'
  @_hash['service_description'] = 'serviceDescription'
  @_hash['service_profile_id'] = 'serviceProfileID'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



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

def self.optionals
  %w[
    ern
    service_endpoint
    application_server_provider_id
    application_id
    service_description
    service_profile_id
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



127
128
129
130
131
132
133
134
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 127

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} ern: #{@ern.inspect}, service_endpoint: #{@service_endpoint.inspect},"\
  " application_server_provider_id: #{@application_server_provider_id.inspect},"\
  " application_id: #{@application_id.inspect}, service_description:"\
  " #{@service_description.inspect}, service_profile_id: #{@service_profile_id.inspect},"\
  " additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



118
119
120
121
122
123
124
# File 'lib/verizon/models/resources_edge_hosted_service_with_profile_id.rb', line 118

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} ern: #{@ern}, service_endpoint: #{@service_endpoint},"\
  " application_server_provider_id: #{@application_server_provider_id}, application_id:"\
  " #{@application_id}, service_description: #{@service_description}, service_profile_id:"\
  " #{@service_profile_id}, additional_properties: #{@additional_properties}>"
end