Class: OCI::Dif::Models::ServiceDetailResponse
- Inherits:
-
Object
- Object
- OCI::Dif::Models::ServiceDetailResponse
- Defined in:
- lib/oci/dif/models/service_detail_response.rb
Overview
Details of the cloud service.
Instance Attribute Summary collapse
- #additional_details ⇒ OCI::Dif::Models::AdditionalDetails
-
#current_artifact_path ⇒ String
name of the service.
-
#display_name ⇒ String
name of the service.
-
#instance_id ⇒ String
ID for the service instance.
-
#service_id ⇒ String
ID for the service.
-
#service_type ⇒ String
name of the cloud service.
-
#service_url ⇒ String
url for the service.
-
#status ⇒ String
state of the service.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ ServiceDetailResponse
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ ServiceDetailResponse
Initializes the object
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 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 88 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.instance_id = attributes[:'instanceId'] if attributes[:'instanceId'] raise 'You cannot provide both :instanceId and :instance_id' if attributes.key?(:'instanceId') && attributes.key?(:'instance_id') self.instance_id = attributes[:'instance_id'] if attributes[:'instance_id'] self.service_id = attributes[:'serviceId'] if attributes[:'serviceId'] raise 'You cannot provide both :serviceId and :service_id' if attributes.key?(:'serviceId') && attributes.key?(:'service_id') self.service_id = attributes[:'service_id'] if attributes[:'service_id'] self.display_name = attributes[:'displayName'] if attributes[:'displayName'] raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name') self.display_name = attributes[:'display_name'] if attributes[:'display_name'] self.current_artifact_path = attributes[:'currentArtifactPath'] if attributes[:'currentArtifactPath'] raise 'You cannot provide both :currentArtifactPath and :current_artifact_path' if attributes.key?(:'currentArtifactPath') && attributes.key?(:'current_artifact_path') self.current_artifact_path = attributes[:'current_artifact_path'] if attributes[:'current_artifact_path'] self.service_type = attributes[:'serviceType'] if attributes[:'serviceType'] raise 'You cannot provide both :serviceType and :service_type' if attributes.key?(:'serviceType') && attributes.key?(:'service_type') self.service_type = attributes[:'service_type'] if attributes[:'service_type'] self.service_url = attributes[:'serviceUrl'] if attributes[:'serviceUrl'] raise 'You cannot provide both :serviceUrl and :service_url' if attributes.key?(:'serviceUrl') && attributes.key?(:'service_url') self.service_url = attributes[:'service_url'] if attributes[:'service_url'] self.status = attributes[:'status'] if attributes[:'status'] self.additional_details = attributes[:'additionalDetails'] if attributes[:'additionalDetails'] raise 'You cannot provide both :additionalDetails and :additional_details' if attributes.key?(:'additionalDetails') && attributes.key?(:'additional_details') self.additional_details = attributes[:'additional_details'] if attributes[:'additional_details'] end |
Instance Attribute Details
#additional_details ⇒ OCI::Dif::Models::AdditionalDetails
40 41 42 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 40 def additional_details @additional_details end |
#current_artifact_path ⇒ String
name of the service
25 26 27 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 25 def current_artifact_path @current_artifact_path end |
#display_name ⇒ String
name of the service
21 22 23 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 21 def display_name @display_name end |
#instance_id ⇒ String
ID for the service instance.
13 14 15 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 13 def instance_id @instance_id end |
#service_id ⇒ String
ID for the service
17 18 19 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 17 def service_id @service_id end |
#service_type ⇒ String
name of the cloud service
29 30 31 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 29 def service_type @service_type end |
#service_url ⇒ String
url for the service
33 34 35 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 33 def service_url @service_url end |
#status ⇒ String
state of the service
37 38 39 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 37 def status @status end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 43 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'instance_id': :'instanceId', 'service_id': :'serviceId', 'display_name': :'displayName', 'current_artifact_path': :'currentArtifactPath', 'service_type': :'serviceType', 'service_url': :'serviceUrl', 'status': :'status', 'additional_details': :'additionalDetails' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
59 60 61 62 63 64 65 66 67 68 69 70 71 72 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 59 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'instance_id': :'String', 'service_id': :'String', 'display_name': :'String', 'current_artifact_path': :'String', 'service_type': :'String', 'service_url': :'String', 'status': :'String', 'additional_details': :'OCI::Dif::Models::AdditionalDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
146 147 148 149 150 151 152 153 154 155 156 157 158 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 146 def ==(other) return true if equal?(other) self.class == other.class && instance_id == other.instance_id && service_id == other.service_id && display_name == other.display_name && current_artifact_path == other.current_artifact_path && service_type == other.service_type && service_url == other.service_url && status == other.status && additional_details == other.additional_details end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 183 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
163 164 165 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 163 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
172 173 174 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 172 def hash [instance_id, service_id, display_name, current_artifact_path, service_type, service_url, status, additional_details].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
216 217 218 219 220 221 222 223 224 225 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 216 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
210 211 212 |
# File 'lib/oci/dif/models/service_detail_response.rb', line 210 def to_s to_hash.to_s end |