Class: OCI::GoldenGate::Models::DeploymentDiagnosticData

Inherits:
Object
  • Object
show all
Defined in:
lib/oci/golden_gate/models/deployment_diagnostic_data.rb

Overview

Information regarding the deployment diagnostic collection

Constant Summary collapse

DIAGNOSTIC_STATE_ENUM =
[
  DIAGNOSTIC_STATE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
  DIAGNOSTIC_STATE_SUCCEEDED = 'SUCCEEDED'.freeze,
  DIAGNOSTIC_STATE_FAILED = 'FAILED'.freeze,
  DIAGNOSTIC_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 = {}) ⇒ DeploymentDiagnosticData

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :namespace_name (String)

    The value to assign to the #namespace_name property

  • :bucket_name (String)

    The value to assign to the #bucket_name property

  • :object_name (String)

    The value to assign to the #object_name property

  • :diagnostic_state (String)

    The value to assign to the #diagnostic_state property

  • :time_diagnostic_start (DateTime)

    The value to assign to the #time_diagnostic_start property

  • :time_diagnostic_end (DateTime)

    The value to assign to the #time_diagnostic_end property



85
86
87
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
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 85

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

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

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

  self.bucket_name = attributes[:'bucketName'] if attributes[:'bucketName']

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

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

  self.object_name = attributes[:'objectName'] if attributes[:'objectName']

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

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

  self.diagnostic_state = attributes[:'diagnosticState'] if attributes[:'diagnosticState']

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

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

  self.time_diagnostic_start = attributes[:'timeDiagnosticStart'] if attributes[:'timeDiagnosticStart']

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

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

  self.time_diagnostic_end = attributes[:'timeDiagnosticEnd'] if attributes[:'timeDiagnosticEnd']

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

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

Instance Attribute Details

#bucket_nameString

[Required] Name of the bucket where the object is to be uploaded in the object storage

Returns:

  • (String)


26
27
28
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 26

def bucket_name
  @bucket_name
end

#diagnostic_stateString

[Required] The state of the deployment diagnostic collection.

Returns:

  • (String)


35
36
37
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 35

def diagnostic_state
  @diagnostic_state
end

#namespace_nameString

[Required] Name of namespace that serves as a container for all of your buckets

Returns:

  • (String)


22
23
24
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 22

def namespace_name
  @namespace_name
end

#object_nameString

[Required] Name of the diagnostic collected and uploaded to object storage

Returns:

  • (String)


30
31
32
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 30

def object_name
  @object_name
end

#time_diagnostic_endDateTime

The time until which the diagnostic collection should collect the logs. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


43
44
45
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 43

def time_diagnostic_end
  @time_diagnostic_end
end

#time_diagnostic_startDateTime

The time from which the diagnostic collection should collect the logs. The format is defined by RFC3339, such as 2016-08-25T21:10:29.600Z.

Returns:

  • (DateTime)


39
40
41
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 39

def time_diagnostic_start
  @time_diagnostic_start
end

Class Method Details

.attribute_mapObject

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



46
47
48
49
50
51
52
53
54
55
56
57
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 46

def self.attribute_map
  {
    # rubocop:disable Style/SymbolLiteral
    'namespace_name': :'namespaceName',
    'bucket_name': :'bucketName',
    'object_name': :'objectName',
    'diagnostic_state': :'diagnosticState',
    'time_diagnostic_start': :'timeDiagnosticStart',
    'time_diagnostic_end': :'timeDiagnosticEnd'
    # rubocop:enable Style/SymbolLiteral
  }
end

.swagger_typesObject

Attribute type mapping.



60
61
62
63
64
65
66
67
68
69
70
71
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 60

def self.swagger_types
  {
    # rubocop:disable Style/SymbolLiteral
    'namespace_name': :'String',
    'bucket_name': :'String',
    'object_name': :'String',
    'diagnostic_state': :'String',
    'time_diagnostic_start': :'DateTime',
    'time_diagnostic_end': :'DateTime'
    # 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



148
149
150
151
152
153
154
155
156
157
158
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 148

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

  self.class == other.class &&
    namespace_name == other.namespace_name &&
    bucket_name == other.bucket_name &&
    object_name == other.object_name &&
    diagnostic_state == other.diagnostic_state &&
    time_diagnostic_start == other.time_diagnostic_start &&
    time_diagnostic_end == other.time_diagnostic_end
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



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/golden_gate/models/deployment_diagnostic_data.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

Parameters:

  • other (Object)

    the other object to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


163
164
165
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 163

def eql?(other)
  self == other
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



172
173
174
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 172

def hash
  [namespace_name, bucket_name, object_name, diagnostic_state, time_diagnostic_start, time_diagnostic_end].hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



216
217
218
219
220
221
222
223
224
225
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.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_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



210
211
212
# File 'lib/oci/golden_gate/models/deployment_diagnostic_data.rb', line 210

def to_s
  to_hash.to_s
end