Class: DocuSign_Admin::AssetGroupAccountClone

Inherits:
Object
  • Object
show all
Defined in:
lib/docusign_admin/models/asset_group_account_clone.rb

Defined Under Namespace

Classes: EnumAttributeValidator

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}) ⇒ AssetGroupAccountClone

Initializes the object

Parameters:

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

    Model attributes in the form of hash



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
172
173
174
175
176
177
178
179
180
181
182
183
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 122

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?(:'sourceAccount')
    self. = attributes[:'sourceAccount']
  end

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

  if attributes.has_key?(:'assetGroupWorkId')
    self.asset_group_work_id = attributes[:'assetGroupWorkId']
  end

  if attributes.has_key?(:'assetGroupId')
    self.asset_group_id = attributes[:'assetGroupId']
  end

  if attributes.has_key?(:'assetGroupWorkType')
    self.asset_group_work_type = attributes[:'assetGroupWorkType']
  end

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

  if attributes.has_key?(:'cloneRequestId')
    self.clone_request_id = attributes[:'cloneRequestId']
  end

  if attributes.has_key?(:'orderId')
    self.order_id = attributes[:'orderId']
  end

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

  if attributes.has_key?(:'createdDate')
    self.created_date = attributes[:'createdDate']
  end

  if attributes.has_key?(:'createdByName')
    self.created_by_name = attributes[:'createdByName']
  end

  if attributes.has_key?(:'createdByEmail')
    self.created_by_email = attributes[:'createdByEmail']
  end

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

  if attributes.has_key?(:'cloneProcessingFailureDetails')
    self.clone_processing_failure_details = attributes[:'cloneProcessingFailureDetails']
  end
end

Instance Attribute Details

#asset_group_idObject

The asset group id the accounts belong to.



26
27
28
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 26

def asset_group_id
  @asset_group_id
end

#asset_group_work_idObject

The account clone work id.



23
24
25
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 23

def asset_group_work_id
  @asset_group_work_id
end

#asset_group_work_typeObject

The type of asset group work.



29
30
31
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 29

def asset_group_work_type
  @asset_group_work_type
end

#attemptsObject

The number of times the work has been worked on.



41
42
43
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 41

def attempts
  @attempts
end

#clone_processing_failure_detailsObject

The processing failures if the work is in PendingError/ProcessingError status.



56
57
58
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 56

def clone_processing_failure_details
  @clone_processing_failure_details
end

#clone_request_idObject

The account entitlement/setting mirror request id created by the clone work.



35
36
37
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 35

def clone_request_id
  @clone_request_id
end

#created_by_emailObject

The email of the creator of the account clone work.



50
51
52
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 50

def created_by_email
  @created_by_email
end

#created_by_nameObject

The name of the creator of the account clone work.



47
48
49
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 47

def created_by_name
  @created_by_name
end

#created_dateObject

The date the account clone work is created.



44
45
46
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 44

def created_date
  @created_date
end

#messageObject

The message associated with the account clone work.



53
54
55
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 53

def message
  @message
end

#order_idObject

The order id created by the clone work.



38
39
40
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 38

def order_id
  @order_id
end

#source_accountObject

The source account to be cloned from.



17
18
19
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 17

def 
  
end

#statusObject

The clone status.



32
33
34
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 32

def status
  @status
end

#target_accountObject

The target account to clone to.



20
21
22
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 20

def 
  
end

Class Method Details

.attribute_mapObject

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



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 81

def self.attribute_map
  {
    :'source_account' => :'sourceAccount',
    :'target_account' => :'targetAccount',
    :'asset_group_work_id' => :'assetGroupWorkId',
    :'asset_group_id' => :'assetGroupId',
    :'asset_group_work_type' => :'assetGroupWorkType',
    :'status' => :'status',
    :'clone_request_id' => :'cloneRequestId',
    :'order_id' => :'orderId',
    :'attempts' => :'attempts',
    :'created_date' => :'createdDate',
    :'created_by_name' => :'createdByName',
    :'created_by_email' => :'createdByEmail',
    :'message' => :'message',
    :'clone_processing_failure_details' => :'cloneProcessingFailureDetails'
  }
end

.swagger_typesObject

Attribute type mapping.



101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 101

def self.swagger_types
  {
    :'source_account' => :'AssetGroupAccountCloneSourceAccount',
    :'target_account' => :'AssetGroupAccountCloneTargetAccount',
    :'asset_group_work_id' => :'String',
    :'asset_group_id' => :'String',
    :'asset_group_work_type' => :'String',
    :'status' => :'String',
    :'clone_request_id' => :'String',
    :'order_id' => :'String',
    :'attempts' => :'Integer',
    :'created_date' => :'DateTime',
    :'created_by_name' => :'String',
    :'created_by_email' => :'String',
    :'message' => :'String',
    :'clone_processing_failure_details' => :'SubAccountErrorDetails'
  }
end

Instance Method Details

#==(o) ⇒ Object

Checks equality by comparing each attribute.

Parameters:

  • Object (Object)

    to be compared



234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 234

def ==(o)
  return true if self.equal?(o)
  self.class == o.class &&
       == o. &&
       == o. &&
      asset_group_work_id == o.asset_group_work_id &&
      asset_group_id == o.asset_group_id &&
      asset_group_work_type == o.asset_group_work_type &&
      status == o.status &&
      clone_request_id == o.clone_request_id &&
      order_id == o.order_id &&
      attempts == o.attempts &&
      created_date == o.created_date &&
      created_by_name == o.created_by_name &&
      created_by_email == o.created_by_email &&
      message == o.message &&
      clone_processing_failure_details == o.clone_processing_failure_details
end

#_deserialize(type, value) ⇒ Object

Deserializes the data based on type

Parameters:

  • string

    type Data type

  • string

    value Value to be deserialized

Returns:

  • (Object)

    Deserialized data



289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 289

def _deserialize(type, value)
  case type.to_sym
  when :DateTime
    DateTime.parse(value)
  when :Date
    Date.parse(value)
  when :String
    value.to_s
  when :Integer
    value.to_i
  when :Float
    value.to_f
  when :BOOLEAN
    if value.to_s =~ /\A(true|t|yes|y|1)\z/i
      true
    else
      false
    end
  when :Object
    # generic object (usually a Hash), return directly
    value
  when /\AArray<(?<inner_type>.+)>\z/
    inner_type = Regexp.last_match[:inner_type]
    value.map { |v| _deserialize(inner_type, v) }
  when /\AHash<(?<k_type>.+?), (?<v_type>.+)>\z/
    k_type = Regexp.last_match[:k_type]
    v_type = Regexp.last_match[:v_type]
    {}.tap do |hash|
      value.each do |k, v|
        hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
      end
    end
  else # model
    temp_model = DocuSign_Admin.const_get(type).new
    temp_model.build_from_hash(value)
  end
end

#_to_hash(value) ⇒ Hash

Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value

Parameters:

  • value (Object)

    Any valid value

Returns:

  • (Hash)

    Returns the value in the form of hash



355
356
357
358
359
360
361
362
363
364
365
366
367
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 355

def _to_hash(value)
  if value.is_a?(Array)
    value.compact.map { |v| _to_hash(v) }
  elsif value.is_a?(Hash)
    {}.tap do |hash|
      value.each { |k, v| hash[k] = _to_hash(v) }
    end
  elsif value.respond_to? :to_hash
    value.to_hash
  else
    value
  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



268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 268

def build_from_hash(attributes)
  return nil unless attributes.is_a?(Hash)
  self.class.swagger_types.each_pair do |key, type|
    if type =~ /\AArray<(.*)>/i
      # check to ensure the input is an array given that the attribute
      # is documented as an array but the input is not
      if attributes[self.class.attribute_map[key]].is_a?(Array)
        self.send("#{key}=", attributes[self.class.attribute_map[key]].map { |v| _deserialize($1, v) })
      end
    elsif !attributes[self.class.attribute_map[key]].nil?
      self.send("#{key}=", _deserialize(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?(o) ⇒ Boolean

Parameters:

  • Object (Object)

    to be compared

Returns:

  • (Boolean)

See Also:

  • `==` method


255
256
257
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 255

def eql?(o)
  self == o
end

#hashFixnum

Calculates hash code according to all attributes.

Returns:

  • (Fixnum)

    Hash code



261
262
263
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 261

def hash
  [, , asset_group_work_id, asset_group_id, asset_group_work_type, status, clone_request_id, order_id, attempts, created_date, created_by_name, created_by_email, message, clone_processing_failure_details].hash
end

#list_invalid_propertiesObject

Show invalid properties with the reasons. Usually used together with valid?

Returns:

  • Array for valid properties with the reasons



187
188
189
190
191
192
193
194
195
196
197
198
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 187

def list_invalid_properties
  invalid_properties = Array.new
  if .nil?
    invalid_properties.push('invalid value for "source_account", source_account cannot be nil.')
  end

  if .nil?
    invalid_properties.push('invalid value for "target_account", target_account cannot be nil.')
  end

  invalid_properties
end

#to_bodyHash

to_body is an alias to to_hash (backward compatibility)

Returns:

  • (Hash)

    Returns the object in the form of hash



335
336
337
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 335

def to_body
  to_hash
end

#to_hashHash

Returns the object in the form of hash

Returns:

  • (Hash)

    Returns the object in the form of hash



341
342
343
344
345
346
347
348
349
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 341

def to_hash
  hash = {}
  self.class.attribute_map.each_pair do |attr, param|
    value = self.send(attr)
    next if value.nil?
    hash[param] = _to_hash(value)
  end
  hash
end

#to_sString

Returns the string representation of the object

Returns:

  • (String)

    String presentation of the object



329
330
331
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 329

def to_s
  to_hash.to_s
end

#valid?Boolean

Check to see if the all the properties in the model are valid

Returns:

  • (Boolean)

    true if the model is valid



202
203
204
205
206
207
208
209
210
# File 'lib/docusign_admin/models/asset_group_account_clone.rb', line 202

def valid?
  return false if .nil?
  return false if .nil?
  asset_group_work_type_validator = EnumAttributeValidator.new('String', ['Undefined', 'GroupAssetFulfillment', 'AccountAssetFulfillment', 'AccountAssetClone', 'AccountAssetCreate', 'SubscriptionSync'])
  return false unless asset_group_work_type_validator.valid?(@asset_group_work_type)
  status_validator = EnumAttributeValidator.new('String', ['Undefined', 'Pending', 'Processing', 'ProcessingOnHold', 'PendingError', 'ProcessingError', 'Completed', 'Canceled', 'PermanentFailure'])
  return false unless status_validator.valid?(@status)
  true
end