Method: OCI::Waas::Models::Captcha#initialize

Defined in:
lib/oci/waas/models/captcha.rb

#initialize(attributes = {}) ⇒ Captcha

Initializes the object

Parameters:

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

    Model attributes in the form of hash

Options Hash (attributes):

  • :url (String)

    The value to assign to the #url property

  • :session_expiration_in_seconds (Integer)

    The value to assign to the #session_expiration_in_seconds property

  • :title (String)

    The value to assign to the #title property

  • :header_text (String)

    The value to assign to the #header_text property

  • :footer_text (String)

    The value to assign to the #footer_text property

  • :failure_message (String)

    The value to assign to the #failure_message property

  • :submit_label (String)

    The value to assign to the #submit_label property



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
119
120
121
# File 'lib/oci/waas/models/captcha.rb', line 82

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

  self.session_expiration_in_seconds = attributes[:'sessionExpirationInSeconds'] if attributes[:'sessionExpirationInSeconds']

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

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

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

  self.header_text = attributes[:'headerText'] if attributes[:'headerText']

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

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

  self.footer_text = attributes[:'footerText'] if attributes[:'footerText']

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

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

  self.failure_message = attributes[:'failureMessage'] if attributes[:'failureMessage']

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

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

  self.submit_label = attributes[:'submitLabel'] if attributes[:'submitLabel']

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

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