Class: OCI::Jms::Models::UpdateExportSettingDetails

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/jms/models/update_export_setting_details.rb

Overview

Attributes to update a Export setting.

Constant Summary collapse

EXPORT_DURATION_ENUM =
[
  EXPORT_DURATION_LAST_30_DAYS = 'LAST_30_DAYS'.freeze,
  EXPORT_DURATION_LAST_60_DAYS = 'LAST_60_DAYS'.freeze,
  EXPORT_DURATION_LAST_90_DAYS = 'LAST_90_DAYS'.freeze
].freeze
EXPORT_RESOURCES_ENUM =
[
  EXPORT_RESOURCES_MANAGED_INSTANCE = 'MANAGED_INSTANCE'.freeze,
  EXPORT_RESOURCES_MANAGED_INSTANCE_PLUS_JAVA_RUNTIME = 'MANAGED_INSTANCE_PLUS_JAVA_RUNTIME'.freeze,
  EXPORT_RESOURCES_MANAGED_INSTANCE_PLUS_JAVA_RUNTIME_PLUS_APPLICATION = 'MANAGED_INSTANCE_PLUS_JAVA_RUNTIME_PLUS_APPLICATION'.freeze
].freeze
EXPORT_FREQUENCY_ENUM =
[
  EXPORT_FREQUENCY_DAILY = 'DAILY'.freeze,
  EXPORT_FREQUENCY_WEEKLY = 'WEEKLY'.freeze,
  EXPORT_FREQUENCY_MONTHLY = 'MONTHLY'.freeze
].freeze

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ UpdateExportSettingDetails

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):



114
115
116
117
118
119
120
121
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
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 114

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

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

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

  self.export_resources = attributes[:'exportResources'] if attributes[:'exportResources']

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

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

  self.is_cross_region_acknowledged = attributes[:'isCrossRegionAcknowledged'] unless attributes[:'isCrossRegionAcknowledged'].nil?
  self.is_cross_region_acknowledged = false if is_cross_region_acknowledged.nil? && !attributes.key?(:'isCrossRegionAcknowledged') # rubocop:disable Style/StringLiterals

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

  self.is_cross_region_acknowledged = attributes[:'is_cross_region_acknowledged'] unless attributes[:'is_cross_region_acknowledged'].nil?
  self.is_cross_region_acknowledged = false if is_cross_region_acknowledged.nil? && !attributes.key?(:'isCrossRegionAcknowledged') && !attributes.key?(:'is_cross_region_acknowledged') # rubocop:disable Style/StringLiterals

  self.target_bucket_name = attributes[:'targetBucketName'] if attributes[:'targetBucketName']

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

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

  self.target_bucket_namespace = attributes[:'targetBucketNamespace'] if attributes[:'targetBucketNamespace']

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

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

  self.target_bucket_region = attributes[:'targetBucketRegion'] if attributes[:'targetBucketRegion']

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

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

  self.export_frequency = attributes[:'exportFrequency'] if attributes[:'exportFrequency']

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

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

  self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil?
  self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') # rubocop:disable Style/StringLiterals

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

  self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil?
  self.is_enabled = false if is_enabled.nil? && !attributes.key?(:'isEnabled') && !attributes.key?(:'is_enabled') # rubocop:disable Style/StringLiterals
end

Instance Attribute Details

#export_durationString

The duration of data to be exported for fleets.

Returns:

  • (String)


32
33
34
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 32

def export_duration
  @export_duration
end

#export_frequencyString

Schedule at which data will be exported.

Returns:

  • (String)


62
63
64
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 62

def export_frequency
  @export_frequency
end

#export_resourcesString

Resource to export data associated from the fleets.

Returns:

  • (String)


37
38
39
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 37

def export_resources
  @export_resources
end

#is_cross_region_acknowledgedBOOLEAN

Acknowledgement for cross region target bucket configuration.

Returns:

  • (BOOLEAN)


42
43
44
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 42

def is_cross_region_acknowledged
  @is_cross_region_acknowledged
end

#is_enabledBOOLEAN

[Required] ExportSetting flag to store enabled or disabled status.

Returns:

  • (BOOLEAN)


66
67
68
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 66

def is_enabled
  @is_enabled
end

#target_bucket_nameString

The name of the bucket where data will be exported.

Returns:

  • (String)


47
48
49
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 47

def target_bucket_name
  @target_bucket_name
end

#target_bucket_namespaceString

The namespace of the bucket where data will be exported.

Returns:

  • (String)


52
53
54
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 52

def target_bucket_namespace
  @target_bucket_namespace
end

#target_bucket_regionString

The namespace of the bucket where data will be exported.

Returns:

  • (String)


57
58
59
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 57

def target_bucket_region
  @target_bucket_region
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
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 69

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'export_duration': :'exportDuration',
    'export_resources': :'exportResources',
    'is_cross_region_acknowledged': :'isCrossRegionAcknowledged',
    'target_bucket_name': :'targetBucketName',
    'target_bucket_namespace': :'targetBucketNamespace',
    'target_bucket_region': :'targetBucketRegion',
    'export_frequency': :'exportFrequency',
    'is_enabled': :'isEnabled'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 85

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'export_duration': :'String',
    'export_resources': :'String',
    'is_cross_region_acknowledged': :'BOOLEAN',
    'target_bucket_name': :'String',
    'target_bucket_namespace': :'String',
    'target_bucket_region': :'String',
    'export_frequency': :'String',
    'is_enabled': :'BOOLEAN'
    # 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
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 204

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

  self.class == other.class &&
    export_duration == other.export_duration &&
    export_resources == other.export_resources &&
    is_cross_region_acknowledged == other.is_cross_region_acknowledged &&
    target_bucket_name == other.target_bucket_name &&
    target_bucket_namespace == other.target_bucket_namespace &&
    target_bucket_region == other.target_bucket_region &&
    export_frequency == other.export_frequency &&
    is_enabled == other.is_enabled
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



241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 241

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


221
222
223
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 221

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



230
231
232
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 230

def hash
  [export_duration, export_resources, is_cross_region_acknowledged, target_bucket_name, target_bucket_namespace, target_bucket_region, export_frequency, is_enabled].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



274
275
276
277
278
279
280
281
282
283
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 274

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



268
269
270
# File 'lib/oci/jms/models/update_export_setting_details.rb', line 268

def to_s
  to_hash.to_s
end