Class: OCI::JmsUtils::Models::PerformanceTuningAnalysis

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

Overview

To use any of the API operations, you must be authorized by an IAM policy. If you're not authorized, talk to an administrator. If you're an administrator who needs to write policies to give users access, see Getting Started with Policies.

Constant Summary collapse

RESULT_ENUM =
[
  RESULT_ACTION_RECOMMENDED = 'ACTION_RECOMMENDED'.freeze,
  RESULT_NO_WARNINGS = 'NO_WARNINGS'.freeze,
  RESULT_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ PerformanceTuningAnalysis

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



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
196
197
198
199
200
201
202
203
204
205
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 136

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)


35
36
37
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 35

def analysis_project_name
  @analysis_project_name
end

#artifact_object_storage_pathString

[Required] Object storage path to the artifact.

Returns:

  • (String)


51
52
53
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 51

def artifact_object_storage_path
  @artifact_object_storage_path
end

#compartment_idString

[Required] The OCID of the compartment.

Returns:

  • (String)


31
32
33
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 31

def compartment_id
  @compartment_id
end

#created_byOCI::JmsUtils::Models::Principal

This attribute is required.



76
77
78
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 76

def created_by
  @created_by
end

#idString

[Required] The OCID of the Performance Tuning Analysis.

Returns:

  • (String)


23
24
25
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 23

def id
  @id
end

#resultString

[Required] Possible Performance Tuning Result statuses.

Returns:

  • (String)


43
44
45
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 43

def result
  @result
end

#result_object_storage_pathString

[Required] Object storage path to the analysis.

Returns:

  • (String)


47
48
49
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 47

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)


58
59
60
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 58

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)


72
73
74
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 72

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)


65
66
67
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 65

def time_started
  @time_started
end

#warning_countInteger

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

Returns:

  • (Integer)


39
40
41
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 39

def warning_count
  @warning_count
end

#work_request_idString

[Required] The OCID of the Work Request.

Returns:

  • (String)


27
28
29
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 27

def work_request_id
  @work_request_id
end

Class Method Details

.attribute_mapObject

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



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

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.



99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 99

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



227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 227

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



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 268

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


248
249
250
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 248

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



257
258
259
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 257

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



301
302
303
304
305
306
307
308
309
310
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 301

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



295
296
297
# File 'lib/oci/jms_utils/models/performance_tuning_analysis.rb', line 295

def to_s
  to_hash.to_s
end