Class: OCI::DataSafe::Models::ReportDefinition

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/data_safe/models/report_definition.rb

Overview

Description of report definition.

Constant Summary collapse

CATEGORY_ENUM =
[
  CATEGORY_CUSTOM_REPORTS = 'CUSTOM_REPORTS'.freeze,
  CATEGORY_SUMMARY = 'SUMMARY'.freeze,
  CATEGORY_ACTIVITY_AUDITING = 'ACTIVITY_AUDITING'.freeze,
  CATEGORY_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
DATA_SOURCE_ENUM =
[
  DATA_SOURCE_EVENTS = 'EVENTS'.freeze,
  DATA_SOURCE_ALERTS = 'ALERTS'.freeze,
  DATA_SOURCE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze
LIFECYCLE_STATE_ENUM =
[
  LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
  LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
  LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
  LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
  LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
  LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ ReportDefinition

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
# File 'lib/oci/data_safe/models/report_definition.rb', line 203

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

  self.parent_id = attributes[:'parentId'] if attributes[:'parentId']

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

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

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

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

  self.data_source = attributes[:'dataSource'] if attributes[:'dataSource']

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

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

  self.is_seeded = attributes[:'isSeeded'] unless attributes[:'isSeeded'].nil?

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

  self.is_seeded = attributes[:'is_seeded'] unless attributes[:'is_seeded'].nil?

  self.display_order = attributes[:'displayOrder'] if attributes[:'displayOrder']

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

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

  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_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated']

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

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

  self.scim_filter = attributes[:'scimFilter'] if attributes[:'scimFilter']

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

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

  self.column_info = attributes[:'columnInfo'] if attributes[:'columnInfo']

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

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

  self.column_filters = attributes[:'columnFilters'] if attributes[:'columnFilters']

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

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

  self.column_sortings = attributes[:'columnSortings'] if attributes[:'columnSortings']

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

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

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

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

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

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

  self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']

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

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

  self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']

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

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

  self.system_tags = attributes[:'systemTags'] if attributes[:'systemTags']

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

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

Instance Attribute Details

#categoryString

Specifies the name of the category that this report belongs to.

Returns:

  • (String)


47
48
49
# File 'lib/oci/data_safe/models/report_definition.rb', line 47

def category
  @category
end

#column_filtersArray<OCI::DataSafe::Models::ColumnFilter>

An array of column filter objects. A column Filter object stores all information about a column filter including field name, an operator, one or more expressions, if the filter is enabled, or if the filter is hidden.



83
84
85
# File 'lib/oci/data_safe/models/report_definition.rb', line 83

def column_filters
  @column_filters
end

#column_infoArray<OCI::DataSafe::Models::Column>

An array of column objects in the order (left to right) displayed in the report. A column object stores all information about a column, including the name displayed on the UI, corresponding field name in the data source, data type of the column, and column visibility (if the column is visible to the user).

Returns:



79
80
81
# File 'lib/oci/data_safe/models/report_definition.rb', line 79

def column_info
  @column_info
end

#column_sortingsArray<OCI::DataSafe::Models::ColumnSorting>

An array of column sorting objects. Each column sorting object stores the column name to be sorted and if the sorting is in ascending order; sorting is done by the first column in the array, then by the second column in the array, etc.



87
88
89
# File 'lib/oci/data_safe/models/report_definition.rb', line 87

def column_sortings
  @column_sortings
end

#compartment_idString

[Required] The OCID of the compartment containing the report definition.

Returns:

  • (String)


95
96
97
# File 'lib/oci/data_safe/models/report_definition.rb', line 95

def compartment_id
  @compartment_id
end

#data_sourceString

Specifies the name of a resource that provides data for the report. For example alerts, events.

Returns:

  • (String)


55
56
57
# File 'lib/oci/data_safe/models/report_definition.rb', line 55

def data_source
  @data_source
end

#defined_tagsHash<String, Hash<String, Object>>

Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm)

Example: ‘{"CostCenter": "42"}`

Returns:

  • (Hash<String, Hash<String, Object>>)


113
114
115
# File 'lib/oci/data_safe/models/report_definition.rb', line 113

def defined_tags
  @defined_tags
end

#descriptionString

A description of the report definition.

Returns:

  • (String)


51
52
53
# File 'lib/oci/data_safe/models/report_definition.rb', line 51

def description
  @description
end

#display_nameString

[Required] Name of the report definition.

Returns:

  • (String)


35
36
37
# File 'lib/oci/data_safe/models/report_definition.rb', line 35

def display_name
  @display_name
end

#display_orderInteger

Specifies how the report definitions are ordered in the display.

Returns:

  • (Integer)


63
64
65
# File 'lib/oci/data_safe/models/report_definition.rb', line 63

def display_order
  @display_order
end

#freeform_tagsHash<String, String>

Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](docs.cloud.oracle.com/iaas/Content/General/Concepts/resourcetags.htm)

Example: ‘"Finance"`

Returns:

  • (Hash<String, String>)


106
107
108
# File 'lib/oci/data_safe/models/report_definition.rb', line 106

def freeform_tags
  @freeform_tags
end

#idString

[Required] The OCID of the report definition.

Returns:

  • (String)


39
40
41
# File 'lib/oci/data_safe/models/report_definition.rb', line 39

def id
  @id
end

#is_seededBOOLEAN

Signifies whether the definition is seeded or user defined. Values can either be ‘true’ or ‘false’.

Returns:

  • (BOOLEAN)


59
60
61
# File 'lib/oci/data_safe/models/report_definition.rb', line 59

def is_seeded
  @is_seeded
end

#lifecycle_stateString

[Required] The current state of the report.

Returns:

  • (String)


99
100
101
# File 'lib/oci/data_safe/models/report_definition.rb', line 99

def lifecycle_state
  @lifecycle_state
end

#parent_idString

The OCID of the parent report definition. In the case of seeded report definition, this is same as definition OCID.

Returns:

  • (String)


43
44
45
# File 'lib/oci/data_safe/models/report_definition.rb', line 43

def parent_id
  @parent_id
end

#scim_filterString

Additional scim filters used to specialize the report.

Returns:

  • (String)


75
76
77
# File 'lib/oci/data_safe/models/report_definition.rb', line 75

def scim_filter
  @scim_filter
end

#summaryArray<OCI::DataSafe::Models::Summary>

An array of report summary objects in the order (left to right) displayed in the report. A report summary object stores all information about summary of report to be displayed, including the name displayed on UI, the display order, corresponding group by and count of values, summary visibility (if the summary is visible to user).

Returns:



91
92
93
# File 'lib/oci/data_safe/models/report_definition.rb', line 91

def summary
  @summary
end

#system_tagsHash<String, Hash<String, Object>>

System tags for this resource. Each key is predefined and scoped to a namespace. For more information, see Resource Tags. Example: ‘{"free-tier-retained": "true"}`

Returns:

  • (Hash<String, Hash<String, Object>>)


119
120
121
# File 'lib/oci/data_safe/models/report_definition.rb', line 119

def system_tags
  @system_tags
end

#time_createdDateTime

Specifies the time at which the report definition was created.

Returns:

  • (DateTime)


67
68
69
# File 'lib/oci/data_safe/models/report_definition.rb', line 67

def time_created
  @time_created
end

#time_updatedDateTime

The date and time of the report definition update in Data Safe.

Returns:

  • (DateTime)


71
72
73
# File 'lib/oci/data_safe/models/report_definition.rb', line 71

def time_updated
  @time_updated
end

Class Method Details

.attribute_mapObject

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



122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
# File 'lib/oci/data_safe/models/report_definition.rb', line 122

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'displayName',
    'id': :'id',
    'parent_id': :'parentId',
    'category': :'category',
    'description': :'description',
    'data_source': :'dataSource',
    'is_seeded': :'isSeeded',
    'display_order': :'displayOrder',
    'time_created': :'timeCreated',
    'time_updated': :'timeUpdated',
    'scim_filter': :'scimFilter',
    'column_info': :'columnInfo',
    'column_filters': :'columnFilters',
    'column_sortings': :'columnSortings',
    'summary': :'summary',
    'compartment_id': :'compartmentId',
    'lifecycle_state': :'lifecycleState',
    'freeform_tags': :'freeformTags',
    'defined_tags': :'definedTags',
    'system_tags': :'systemTags'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



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
# File 'lib/oci/data_safe/models/report_definition.rb', line 150

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'display_name': :'String',
    'id': :'String',
    'parent_id': :'String',
    'category': :'String',
    'description': :'String',
    'data_source': :'String',
    'is_seeded': :'BOOLEAN',
    'display_order': :'Integer',
    'time_created': :'DateTime',
    'time_updated': :'DateTime',
    'scim_filter': :'String',
    'column_info': :'Array<OCI::DataSafe::Models::Column>',
    'column_filters': :'Array<OCI::DataSafe::Models::ColumnFilter>',
    'column_sortings': :'Array<OCI::DataSafe::Models::ColumnSorting>',
    'summary': :'Array<OCI::DataSafe::Models::Summary>',
    'compartment_id': :'String',
    'lifecycle_state': :'String',
    'freeform_tags': :'Hash<String, String>',
    'defined_tags': :'Hash<String, Hash<String, Object>>',
    'system_tags': :'Hash<String, Hash<String, Object>>'
    # 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



360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
# File 'lib/oci/data_safe/models/report_definition.rb', line 360

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

  self.class == other.class &&
    display_name == other.display_name &&
    id == other.id &&
    parent_id == other.parent_id &&
    category == other.category &&
    description == other.description &&
    data_source == other.data_source &&
    is_seeded == other.is_seeded &&
    display_order == other.display_order &&
    time_created == other.time_created &&
    time_updated == other.time_updated &&
    scim_filter == other.scim_filter &&
    column_info == other.column_info &&
    column_filters == other.column_filters &&
    column_sortings == other.column_sortings &&
    summary == other.summary &&
    compartment_id == other.compartment_id &&
    lifecycle_state == other.lifecycle_state &&
    freeform_tags == other.freeform_tags &&
    defined_tags == other.defined_tags &&
    system_tags == other.system_tags
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



409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
# File 'lib/oci/data_safe/models/report_definition.rb', line 409

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


389
390
391
# File 'lib/oci/data_safe/models/report_definition.rb', line 389

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



398
399
400
# File 'lib/oci/data_safe/models/report_definition.rb', line 398

def hash
  [display_name, id, parent_id, category, description, data_source, is_seeded, display_order, time_created, time_updated, scim_filter, column_info, column_filters, column_sortings, summary, compartment_id, lifecycle_state, freeform_tags, defined_tags, system_tags].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



442
443
444
445
446
447
448
449
450
451
# File 'lib/oci/data_safe/models/report_definition.rb', line 442

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



436
437
438
# File 'lib/oci/data_safe/models/report_definition.rb', line 436

def to_s
  to_hash.to_s
end