Method: AsposePdfCloud::ChoiceField#initialize

Defined in:
lib/aspose_pdf_cloud/models/choice_field.rb

#initialize(attributes = {}) ⇒ ChoiceField

Initializes the object

Parameters:

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

    Model attributes in the form of hash



153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
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
# File 'lib/aspose_pdf_cloud/models/choice_field.rb', line 153

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}

  if attributes.has_key?(:'Links')
    if (value = attributes[:'Links']).is_a?(Array)
      self.links = value
    end
  end

  if attributes.has_key?(:'PartialName')
    self.partial_name = attributes[:'PartialName']
  end

  if attributes.has_key?(:'FullName')
    self.full_name = attributes[:'FullName']
  end

  if attributes.has_key?(:'Rect')
    self.rect = attributes[:'Rect']
  end

  if attributes.has_key?(:'Value')
    self.value = attributes[:'Value']
  end

  if attributes.has_key?(:'PageIndex')
    self.page_index = attributes[:'PageIndex']
  end

  if attributes.has_key?(:'Height')
    self.height = attributes[:'Height']
  end

  if attributes.has_key?(:'Width')
    self.width = attributes[:'Width']
  end

  if attributes.has_key?(:'ZIndex')
    self.z_index = attributes[:'ZIndex']
  end

  if attributes.has_key?(:'IsGroup')
    self.is_group = attributes[:'IsGroup']
  end

  if attributes.has_key?(:'Parent')
    self.parent = attributes[:'Parent']
  end

  if attributes.has_key?(:'IsSharedField')
    self.is_shared_field = attributes[:'IsSharedField']
  end

  if attributes.has_key?(:'Flags')
    if (value = attributes[:'Flags']).is_a?(Array)
      self.flags = value
    end
  end

  if attributes.has_key?(:'Color')
    self.color = attributes[:'Color']
  end

  if attributes.has_key?(:'Contents')
    self.contents = attributes[:'Contents']
  end

  if attributes.has_key?(:'Margin')
    self.margin = attributes[:'Margin']
  end

  if attributes.has_key?(:'Highlighting')
    self.highlighting = attributes[:'Highlighting']
  end

  if attributes.has_key?(:'HorizontalAlignment')
    self.horizontal_alignment = attributes[:'HorizontalAlignment']
  end

  if attributes.has_key?(:'VerticalAlignment')
    self.vertical_alignment = attributes[:'VerticalAlignment']
  end

  if attributes.has_key?(:'Border')
    self.border = attributes[:'Border']
  end

  if attributes.has_key?(:'MultiSelect')
    self.multi_select = attributes[:'MultiSelect']
  end

  if attributes.has_key?(:'Selected')
    self.selected = attributes[:'Selected']
  end

end