Method: OCI::Streaming::Models::CreateGroupCursorDetails#initialize

Defined in:
lib/oci/streaming/models/create_group_cursor_details.rb

#initialize(attributes = {}) ⇒ CreateGroupCursorDetails

Initializes the object

Parameters:

  • (defaults to: {})

    Model attributes in the form of hash

Options Hash (attributes):

  • :type (String)

    The value to assign to the #type property

  • :time (DateTime)

    The value to assign to the #time property

  • :group_name (String)

    The value to assign to the #group_name property

  • :instance_name (String)

    The value to assign to the #instance_name property

  • :timeout_in_ms (Integer)

    The value to assign to the #timeout_in_ms property

  • :commit_on_get (BOOLEAN)

    The value to assign to the #commit_on_get property



81
82
83
84
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
# File 'lib/oci/streaming/models/create_group_cursor_details.rb', line 81

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

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

  self.group_name = attributes[:'groupName'] if attributes[:'groupName']

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

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

  self.instance_name = attributes[:'instanceName'] if attributes[:'instanceName']

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

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

  self.timeout_in_ms = attributes[:'timeoutInMs'] if attributes[:'timeoutInMs']
  self.timeout_in_ms = 30000 if timeout_in_ms.nil? && !attributes.key?(:'timeoutInMs') # rubocop:disable Style/StringLiterals

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

  self.timeout_in_ms = attributes[:'timeout_in_ms'] if attributes[:'timeout_in_ms']
  self.timeout_in_ms = 30000 if timeout_in_ms.nil? && !attributes.key?(:'timeoutInMs') && !attributes.key?(:'timeout_in_ms') # rubocop:disable Style/StringLiterals

  self.commit_on_get = attributes[:'commitOnGet'] unless attributes[:'commitOnGet'].nil?
  self.commit_on_get = true if commit_on_get.nil? && !attributes.key?(:'commitOnGet') # rubocop:disable Style/StringLiterals

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

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