Class: OCI::JmsUtils::Models::PerformanceTuningAnalysisSummary

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb

Overview

Summary information about a Performance Tuning Analysis.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PerformanceTuningAnalysisSummary

Initializes the object

Parameters:

  • attributes (Hash) (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):



126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 126

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.id = attributes[:'id'] if attributes[:'id']

  self.work_request_id = attributes[:'workRequestId'] if attributes[:'workRequestId']

  raise 'You cannot provide both :workRequestId and :work_request_id' if attributes.key?(:'workRequestId') && attributes.key?(:'work_request_id')

  self.work_request_id = attributes[:'work_request_id'] if attributes[:'work_request_id']

  self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']

  raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')

  self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']

  self.analysis_project_name = attributes[:'analysisProjectName'] if attributes[:'analysisProjectName']

  raise 'You cannot provide both :analysisProjectName and :analysis_project_name' if attributes.key?(:'analysisProjectName') && attributes.key?(:'analysis_project_name')

  self.analysis_project_name = attributes[:'analysis_project_name'] if attributes[:'analysis_project_name']

  self.warning_count = attributes[:'warningCount'] if attributes[:'warningCount']

  raise 'You cannot provide both :warningCount and :warning_count' if attributes.key?(:'warningCount') && attributes.key?(:'warning_count')

  self.warning_count = attributes[:'warning_count'] if attributes[:'warning_count']

  self.result = attributes[:'result'] if attributes[:'result']

  self.result_object_storage_path = attributes[:'resultObjectStoragePath'] if attributes[:'resultObjectStoragePath']

  raise 'You cannot provide both :resultObjectStoragePath and :result_object_storage_path' if attributes.key?(:'resultObjectStoragePath') && attributes.key?(:'result_object_storage_path')

  self.result_object_storage_path = attributes[:'result_object_storage_path'] if attributes[:'result_object_storage_path']

  self.artifact_object_storage_path = attributes[:'artifactObjectStoragePath'] if attributes[:'artifactObjectStoragePath']

  raise 'You cannot provide both :artifactObjectStoragePath and :artifact_object_storage_path' if attributes.key?(:'artifactObjectStoragePath') && attributes.key?(:'artifact_object_storage_path')

  self.artifact_object_storage_path = attributes[:'artifact_object_storage_path'] if attributes[:'artifact_object_storage_path']

  self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']

  raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')

  self.time_created = attributes[:'time_created'] if attributes[:'time_created']

  self.time_started = attributes[:'timeStarted'] if attributes[:'timeStarted']

  raise 'You cannot provide both :timeStarted and :time_started' if attributes.key?(:'timeStarted') && attributes.key?(:'time_started')

  self.time_started = attributes[:'time_started'] if attributes[:'time_started']

  self.time_finished = attributes[:'timeFinished'] if attributes[:'timeFinished']

  raise 'You cannot provide both :timeFinished and :time_finished' if attributes.key?(:'timeFinished') && attributes.key?(:'time_finished')

  self.time_finished = attributes[:'time_finished'] if attributes[:'time_finished']

  self.created_by = attributes[:'createdBy'] if attributes[:'createdBy']

  raise 'You cannot provide both :createdBy and :created_by' if attributes.key?(:'createdBy') && attributes.key?(:'created_by')

  self.created_by = attributes[:'created_by'] if attributes[:'created_by']
end

Instance Attribute Details

#analysis_project_nameString

[Required] Name of the analysis project.

Returns:

  • (String)


25
26
27
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 25

def analysis_project_name
  @analysis_project_name
end

#artifact_object_storage_pathString

[Required] Object storage path to the artifact.

Returns:

  • (String)


41
42
43
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 41

def artifact_object_storage_path
  @artifact_object_storage_path
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


21
22
23
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 21

def compartment_id
  @compartment_id
end

#created_byOCI::JmsUtils::Models::Principal

This attribute is required.



66
67
68
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 66

def created_by
  @created_by
end

#idString

[Required] The OCID of the Performance Tuning Analysis.

Returns:

  • (String)


13
14
15
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 13

def id
  @id
end

#resultString

[Required] Possible Performance Tuning Result statuses.

Returns:

  • (String)


33
34
35
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 33

def result
  @result
end

#result_object_storage_pathString

[Required] Object storage path to the analysis.

Returns:

  • (String)


37
38
39
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 37

def result_object_storage_path
  @result_object_storage_path
end

#time_createdDateTime

[Required] The date and time the Performance Tuning Analysis was created, in the format defined by RFC 3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


48
49
50
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 48

def time_created
  @time_created
end

#time_finishedDateTime

[Required] The date and time the Performance Tuning Analysis was finished, in the format defined by RFC 3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


62
63
64
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 62

def time_finished
  @time_finished
end

#time_startedDateTime

[Required] The date and time the Performance Tuning Analysis was started, in the format defined by RFC 3339.

Example: 2016-08-25T21:10:29.600Z

Returns:

  • (DateTime)


55
56
57
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 55

def time_started
  @time_started
end

#warning_countInteger

[Required] Number of warnings in the Performance Tuning Analysis.

Returns:

  • (Integer)


29
30
31
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 29

def warning_count
  @warning_count
end

#work_request_idString

[Required] The OCID of the Work Request.

Returns:

  • (String)


17
18
19
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 17

def work_request_id
  @work_request_id
end

Class Method Details

.attribute_mapObject

Attribute mapping from ruby-style variable name to JSON key.



69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 69

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'id',
    'work_request_id': :'workRequestId',
    'compartment_id': :'compartmentId',
    'analysis_project_name': :'analysisProjectName',
    'warning_count': :'warningCount',
    'result': :'result',
    'result_object_storage_path': :'resultObjectStoragePath',
    'artifact_object_storage_path': :'artifactObjectStoragePath',
    'time_created': :'timeCreated',
    'time_started': :'timeStarted',
    'time_finished': :'timeFinished',
    'created_by': :'createdBy'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 89

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'id': :'String',
    'work_request_id': :'String',
    'compartment_id': :'String',
    'analysis_project_name': :'String',
    'warning_count': :'Integer',
    'result': :'String',
    'result_object_storage_path': :'String',
    'artifact_object_storage_path': :'String',
    'time_created': :'DateTime',
    'time_started': :'DateTime',
    'time_finished': :'DateTime',
    'created_by': :'OCI::JmsUtils::Models::Principal'
    # rubocop:enable Style/SymbolLiteral
  }
end

Instance Method Details

#==(other) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • other (Object)

    the other object to be compared



204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 204

def ==(other)
  return true if equal?(other)

  self.class == other.class &&
    id == other.id &&
    work_request_id == other.work_request_id &&
    compartment_id == other.compartment_id &&
    analysis_project_name == other.analysis_project_name &&
    warning_count == other.warning_count &&
    result == other.result &&
    result_object_storage_path == other.result_object_storage_path &&
    artifact_object_storage_path == other.artifact_object_storage_path &&
    time_created == other.time_created &&
    time_started == other.time_started &&
    time_finished == other.time_finished &&
    created_by == other.created_by
end

#build_from_hash(attributes) ⇒ Object

Builds the object from hash

Parameters:

  • attributes (Hash)

    Model attributes in the form of hash

Returns:

  • (Object)

    Returns the model itself



245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 245

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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


225
226
227
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 225

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



234
235
236
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 234

def hash
  [id, work_request_id, compartment_id, analysis_project_name, warning_count, result, result_object_storage_path, artifact_object_storage_path, time_created, time_started, time_finished, created_by].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



278
279
280
281
282
283
284
285
286
287
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 278

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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



272
273
274
# File 'lib/oci/jms_utils/models/performance_tuning_analysis_summary.rb', line 272

def to_s
  to_hash.to_s
end