oci 2.0.8 → 2.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +2 -1
  3. data/lib/oci.rb +1 -0
  4. data/lib/oci/api_client.rb +22 -4
  5. data/lib/oci/audit/audit_client.rb +7 -7
  6. data/lib/oci/core/blockstorage_client.rb +30 -30
  7. data/lib/oci/core/compute_client.rb +55 -54
  8. data/lib/oci/core/core.rb +2 -0
  9. data/lib/oci/core/models/attach_paravirtualized_volume_details.rb +133 -0
  10. data/lib/oci/core/models/attach_volume_details.rb +2 -1
  11. data/lib/oci/core/models/create_image_details.rb +1 -1
  12. data/lib/oci/core/models/create_public_ip_details.rb +1 -1
  13. data/lib/oci/core/models/create_virtual_circuit_details.rb +1 -1
  14. data/lib/oci/core/models/create_volume_backup_details.rb +1 -1
  15. data/lib/oci/core/models/image.rb +22 -1
  16. data/lib/oci/core/models/image_source_details.rb +1 -1
  17. data/lib/oci/core/models/instance_source_via_image_details.rb +20 -1
  18. data/lib/oci/core/models/paravirtualized_volume_attachment.rb +154 -0
  19. data/lib/oci/core/models/update_virtual_circuit_details.rb +1 -1
  20. data/lib/oci/core/models/volume_attachment.rb +1 -0
  21. data/lib/oci/core/virtual_network_client.rb +154 -154
  22. data/lib/oci/database/database_client.rb +59 -59
  23. data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
  24. data/lib/oci/database/models/create_database_details.rb +1 -1
  25. data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
  26. data/lib/oci/database/models/launch_db_system_details.rb +3 -3
  27. data/lib/oci/database/models/patch_details.rb +1 -1
  28. data/lib/oci/dns/dns_client.rb +44 -44
  29. data/lib/oci/dns/models/create_zone_details.rb +1 -1
  30. data/lib/oci/dns/models/record_operation.rb +1 -1
  31. data/lib/oci/email/email.rb +22 -0
  32. data/lib/oci/email/email_client.rb +417 -0
  33. data/lib/oci/email/models/create_sender_details.rb +147 -0
  34. data/lib/oci/email/models/create_suppression_details.rb +149 -0
  35. data/lib/oci/email/models/sender.rb +219 -0
  36. data/lib/oci/email/models/sender_summary.rb +195 -0
  37. data/lib/oci/email/models/suppression.rb +191 -0
  38. data/lib/oci/email/models/suppression_summary.rb +192 -0
  39. data/lib/oci/email/util.rb +2 -0
  40. data/lib/oci/file_storage/file_storage_client.rb +42 -42
  41. data/lib/oci/identity/identity.rb +4 -0
  42. data/lib/oci/identity/identity_client.rb +250 -94
  43. data/lib/oci/identity/models/compartment.rb +1 -1
  44. data/lib/oci/identity/models/create_compartment_details.rb +1 -1
  45. data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
  46. data/lib/oci/identity/models/create_smtp_credential_details.rb +122 -0
  47. data/lib/oci/identity/models/smtp_credential.rb +285 -0
  48. data/lib/oci/identity/models/smtp_credential_summary.rb +267 -0
  49. data/lib/oci/identity/models/update_compartment_details.rb +1 -0
  50. data/lib/oci/identity/models/update_identity_provider_details.rb +1 -1
  51. data/lib/oci/identity/models/update_smtp_credential_details.rb +121 -0
  52. data/lib/oci/load_balancer/load_balancer_client.rb +74 -74
  53. data/lib/oci/object_storage/models/create_bucket_details.rb +2 -2
  54. data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +1 -1
  55. data/lib/oci/object_storage/models/update_bucket_details.rb +1 -1
  56. data/lib/oci/object_storage/object_storage_client.rb +73 -73
  57. data/lib/oci/regions.rb +2 -1
  58. data/lib/oci/response.rb +1 -0
  59. data/lib/oci/version.rb +1 -1
  60. metadata +17 -20
@@ -0,0 +1,195 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # The email addresses and `senderId` representing an approved sender.
7
+ class Email::Models::SenderSummary
8
+
9
+ LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
10
+ LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
11
+ LIFECYCLE_STATE_DELETING = 'DELETING',
12
+ LIFECYCLE_STATE_DELETED = 'DELETED',
13
+ LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
14
+
15
+ # The email address of the sender.
16
+ # @return [String]
17
+ attr_accessor :email_address
18
+
19
+ # The unique ID of the sender.
20
+ # @return [String]
21
+ attr_accessor :id
22
+
23
+ # The current status of the approved sender.
24
+ # @return [String]
25
+ attr_accessor :lifecycle_state
26
+
27
+ # Date time the approved sender was added, in \"YYYY-MM-ddThh:mmZ\"
28
+ # format with a Z offset, as defined by RFC 3339.
29
+ #
30
+ # @return [DateTime]
31
+ attr_accessor :time_created
32
+
33
+
34
+ # Initializes the object
35
+ # @param [Hash] attributes Model attributes in the form of hash
36
+ # @option attributes [String] :email_address The value to assign to the {#email_address} property
37
+ # @option attributes [String] :id The value to assign to the {#id} property
38
+ # @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
39
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
40
+ def initialize(attributes = {})
41
+ return unless attributes.is_a?(Hash)
42
+
43
+ # convert string to symbol for hash key
44
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
45
+
46
+ if attributes[:'emailAddress']
47
+ self.email_address = attributes[:'emailAddress']
48
+ end
49
+
50
+ raise 'You cannot provide both :emailAddress and :email_address' if attributes.key?(:'emailAddress') && attributes.key?(:'email_address')
51
+
52
+ if attributes[:'email_address']
53
+ self.email_address = attributes[:'email_address']
54
+ end
55
+
56
+ if attributes[:'id']
57
+ self.id = attributes[:'id']
58
+ end
59
+
60
+ if attributes[:'lifecycleState']
61
+ self.lifecycle_state = attributes[:'lifecycleState']
62
+ end
63
+
64
+ raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
65
+
66
+ if attributes[:'lifecycle_state']
67
+ self.lifecycle_state = attributes[:'lifecycle_state']
68
+ end
69
+
70
+ if attributes[:'timeCreated']
71
+ self.time_created = attributes[:'timeCreated']
72
+ end
73
+
74
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
75
+
76
+ if attributes[:'time_created']
77
+ self.time_created = attributes[:'time_created']
78
+ end
79
+
80
+ end
81
+
82
+ # Custom attribute writer method checking allowed values (enum).
83
+ # @param [Object] lifecycle_state Object to be assigned
84
+ def lifecycle_state=(lifecycle_state)
85
+ if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
86
+ @lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
87
+ else
88
+ @lifecycle_state = lifecycle_state
89
+ end
90
+ end
91
+
92
+ # Checks equality by comparing each attribute.
93
+ # @param [Object] other_object to be compared
94
+ def ==(other_object)
95
+ return true if self.equal?(other_object)
96
+ self.class == other_object.class &&
97
+ email_address == other_object.email_address &&
98
+ id == other_object.id &&
99
+ lifecycle_state == other_object.lifecycle_state &&
100
+ time_created == other_object.time_created
101
+ end
102
+
103
+ # @see the `==` method
104
+ # @param [Object] other_object to be compared
105
+ def eql?(other_object)
106
+ self == other_object
107
+ end
108
+
109
+ # Calculates hash code according to all attributes.
110
+ # @return [Fixnum] Hash code
111
+ def hash
112
+ [email_address, id, lifecycle_state, time_created].hash
113
+ end
114
+
115
+ # Builds the object from hash
116
+ # @param [Hash] attributes Model attributes in the form of hash
117
+ # @return [Object] Returns the model itself
118
+ def build_from_hash(attributes)
119
+ return nil unless attributes.is_a?(Hash)
120
+ self.class.swagger_types.each_pair do |key, type|
121
+ if type =~ /^Array<(.*)>/i
122
+ # check to ensure the input is an array given that the the attribute
123
+ # is documented as an array but the input is not
124
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
125
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
126
+ end
127
+ elsif !attributes[self.class.attribute_map[key]].nil?
128
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
129
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
130
+ end
131
+
132
+ self
133
+ end
134
+
135
+ # Returns the string representation of the object
136
+ # @return [String] String presentation of the object
137
+ def to_s
138
+ to_hash.to_s
139
+ end
140
+
141
+ # Returns the object in the form of hash
142
+ # @return [Hash] Returns the object in the form of hash
143
+ def to_hash
144
+ hash = {}
145
+ self.class.attribute_map.each_pair do |attr, param|
146
+ value = public_method(attr).call
147
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
148
+ hash[param] = _to_hash(value)
149
+ end
150
+ hash
151
+ end
152
+
153
+ private
154
+
155
+ # Outputs non-array value in the form of hash
156
+ # For object, use to_hash. Otherwise, just return the value
157
+ # @param [Object] value Any valid value
158
+ # @return [Hash] Returns the value in the form of hash
159
+ def _to_hash(value)
160
+ if value.is_a?(Array)
161
+ value.compact.map{ |v| _to_hash(v) }
162
+ elsif value.is_a?(Hash)
163
+ {}.tap do |hash|
164
+ value.each { |k, v| hash[k] = _to_hash(v) }
165
+ end
166
+ elsif value.respond_to? :to_hash
167
+ value.to_hash
168
+ else
169
+ value
170
+ end
171
+ end
172
+
173
+
174
+
175
+ # Attribute mapping from ruby-style variable name to JSON key.
176
+ def self.attribute_map
177
+ {
178
+ :'email_address' => :'emailAddress',
179
+ :'id' => :'id',
180
+ :'lifecycle_state' => :'lifecycleState',
181
+ :'time_created' => :'timeCreated'
182
+ }
183
+ end
184
+
185
+ # Attribute type mapping.
186
+ def self.swagger_types
187
+ {
188
+ :'email_address' => :'String',
189
+ :'id' => :'String',
190
+ :'lifecycle_state' => :'String',
191
+ :'time_created' => :'DateTime'
192
+ }
193
+ end
194
+ end
195
+ end
@@ -0,0 +1,191 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # The full information representing an email suppression.
7
+ class Email::Models::Suppression
8
+
9
+ REASON_ENUM = [REASON_UNKNOWN = 'UNKNOWN',
10
+ REASON_HARDBOUNCE = 'HARDBOUNCE',
11
+ REASON_COMPLAINT = 'COMPLAINT',
12
+ REASON_MANUAL = 'MANUAL',
13
+ REASON_SOFTBOUNCE = 'SOFTBOUNCE',
14
+ REASON_UNSUBSCRIBE = 'UNSUBSCRIBE',
15
+ REASON_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
16
+
17
+ # Email address of the suppression.
18
+ # @return [String]
19
+ attr_accessor :email_address
20
+
21
+ # The unique ID of the suppression.
22
+ # @return [String]
23
+ attr_accessor :id
24
+
25
+ # The reason that the email address was suppressed. For more information on the types of bounces, see [Suppresion List](https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/emaildeliveryoverview.htm#suppressionlist).
26
+ # @return [String]
27
+ attr_accessor :reason
28
+
29
+ # The date and time the approved sender was added in \"YYYY-MM-ddThh:mmZ\"
30
+ # format with a Z offset, as defined by RFC 3339.
31
+ #
32
+ # @return [DateTime]
33
+ attr_accessor :time_created
34
+
35
+
36
+ # Initializes the object
37
+ # @param [Hash] attributes Model attributes in the form of hash
38
+ # @option attributes [String] :email_address The value to assign to the {#email_address} property
39
+ # @option attributes [String] :id The value to assign to the {#id} property
40
+ # @option attributes [String] :reason The value to assign to the {#reason} property
41
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
42
+ def initialize(attributes = {})
43
+ return unless attributes.is_a?(Hash)
44
+
45
+ # convert string to symbol for hash key
46
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
47
+
48
+ if attributes[:'emailAddress']
49
+ self.email_address = attributes[:'emailAddress']
50
+ end
51
+
52
+ raise 'You cannot provide both :emailAddress and :email_address' if attributes.key?(:'emailAddress') && attributes.key?(:'email_address')
53
+
54
+ if attributes[:'email_address']
55
+ self.email_address = attributes[:'email_address']
56
+ end
57
+
58
+ if attributes[:'id']
59
+ self.id = attributes[:'id']
60
+ end
61
+
62
+ if attributes[:'reason']
63
+ self.reason = attributes[:'reason']
64
+ end
65
+
66
+ if attributes[:'timeCreated']
67
+ self.time_created = attributes[:'timeCreated']
68
+ end
69
+
70
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
71
+
72
+ if attributes[:'time_created']
73
+ self.time_created = attributes[:'time_created']
74
+ end
75
+
76
+ end
77
+
78
+ # Custom attribute writer method checking allowed values (enum).
79
+ # @param [Object] reason Object to be assigned
80
+ def reason=(reason)
81
+ if reason && !REASON_ENUM.include?(reason)
82
+ @reason = REASON_UNKNOWN_ENUM_VALUE
83
+ else
84
+ @reason = reason
85
+ end
86
+ end
87
+
88
+ # Checks equality by comparing each attribute.
89
+ # @param [Object] other_object to be compared
90
+ def ==(other_object)
91
+ return true if self.equal?(other_object)
92
+ self.class == other_object.class &&
93
+ email_address == other_object.email_address &&
94
+ id == other_object.id &&
95
+ reason == other_object.reason &&
96
+ time_created == other_object.time_created
97
+ end
98
+
99
+ # @see the `==` method
100
+ # @param [Object] other_object to be compared
101
+ def eql?(other_object)
102
+ self == other_object
103
+ end
104
+
105
+ # Calculates hash code according to all attributes.
106
+ # @return [Fixnum] Hash code
107
+ def hash
108
+ [email_address, id, reason, time_created].hash
109
+ end
110
+
111
+ # Builds the object from hash
112
+ # @param [Hash] attributes Model attributes in the form of hash
113
+ # @return [Object] Returns the model itself
114
+ def build_from_hash(attributes)
115
+ return nil unless attributes.is_a?(Hash)
116
+ self.class.swagger_types.each_pair do |key, type|
117
+ if type =~ /^Array<(.*)>/i
118
+ # check to ensure the input is an array given that the the attribute
119
+ # is documented as an array but the input is not
120
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
121
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
122
+ end
123
+ elsif !attributes[self.class.attribute_map[key]].nil?
124
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
125
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
126
+ end
127
+
128
+ self
129
+ end
130
+
131
+ # Returns the string representation of the object
132
+ # @return [String] String presentation of the object
133
+ def to_s
134
+ to_hash.to_s
135
+ end
136
+
137
+ # Returns the object in the form of hash
138
+ # @return [Hash] Returns the object in the form of hash
139
+ def to_hash
140
+ hash = {}
141
+ self.class.attribute_map.each_pair do |attr, param|
142
+ value = public_method(attr).call
143
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
144
+ hash[param] = _to_hash(value)
145
+ end
146
+ hash
147
+ end
148
+
149
+ private
150
+
151
+ # Outputs non-array value in the form of hash
152
+ # For object, use to_hash. Otherwise, just return the value
153
+ # @param [Object] value Any valid value
154
+ # @return [Hash] Returns the value in the form of hash
155
+ def _to_hash(value)
156
+ if value.is_a?(Array)
157
+ value.compact.map{ |v| _to_hash(v) }
158
+ elsif value.is_a?(Hash)
159
+ {}.tap do |hash|
160
+ value.each { |k, v| hash[k] = _to_hash(v) }
161
+ end
162
+ elsif value.respond_to? :to_hash
163
+ value.to_hash
164
+ else
165
+ value
166
+ end
167
+ end
168
+
169
+
170
+
171
+ # Attribute mapping from ruby-style variable name to JSON key.
172
+ def self.attribute_map
173
+ {
174
+ :'email_address' => :'emailAddress',
175
+ :'id' => :'id',
176
+ :'reason' => :'reason',
177
+ :'time_created' => :'timeCreated'
178
+ }
179
+ end
180
+
181
+ # Attribute type mapping.
182
+ def self.swagger_types
183
+ {
184
+ :'email_address' => :'String',
185
+ :'id' => :'String',
186
+ :'reason' => :'String',
187
+ :'time_created' => :'DateTime'
188
+ }
189
+ end
190
+ end
191
+ end
@@ -0,0 +1,192 @@
1
+ # Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ require 'date'
4
+
5
+ module OCI
6
+ # The full information representing a suppression.
7
+ class Email::Models::SuppressionSummary
8
+
9
+ REASON_ENUM = [REASON_UNKNOWN = 'UNKNOWN',
10
+ REASON_HARDBOUNCE = 'HARDBOUNCE',
11
+ REASON_COMPLAINT = 'COMPLAINT',
12
+ REASON_MANUAL = 'MANUAL',
13
+ REASON_SOFTBOUNCE = 'SOFTBOUNCE',
14
+ REASON_UNSUBSCRIBE = 'UNSUBSCRIBE',
15
+ REASON_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
16
+
17
+ # The email address of the suppression.
18
+ # @return [String]
19
+ attr_accessor :email_address
20
+
21
+ # The unique OCID of the suppression.
22
+ # @return [String]
23
+ attr_accessor :id
24
+
25
+ # The reason that the email address was suppressed.
26
+ # @return [String]
27
+ attr_accessor :reason
28
+
29
+ # The date and time a recipient's email address was added to the
30
+ # suppression list, in \"YYYY-MM-ddThh:mmZ\" format with a Z offset, as
31
+ # defined by RFC 3339.
32
+ #
33
+ # @return [DateTime]
34
+ attr_accessor :time_created
35
+
36
+
37
+ # Initializes the object
38
+ # @param [Hash] attributes Model attributes in the form of hash
39
+ # @option attributes [String] :email_address The value to assign to the {#email_address} property
40
+ # @option attributes [String] :id The value to assign to the {#id} property
41
+ # @option attributes [String] :reason The value to assign to the {#reason} property
42
+ # @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
43
+ def initialize(attributes = {})
44
+ return unless attributes.is_a?(Hash)
45
+
46
+ # convert string to symbol for hash key
47
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
48
+
49
+ if attributes[:'emailAddress']
50
+ self.email_address = attributes[:'emailAddress']
51
+ end
52
+
53
+ raise 'You cannot provide both :emailAddress and :email_address' if attributes.key?(:'emailAddress') && attributes.key?(:'email_address')
54
+
55
+ if attributes[:'email_address']
56
+ self.email_address = attributes[:'email_address']
57
+ end
58
+
59
+ if attributes[:'id']
60
+ self.id = attributes[:'id']
61
+ end
62
+
63
+ if attributes[:'reason']
64
+ self.reason = attributes[:'reason']
65
+ end
66
+
67
+ if attributes[:'timeCreated']
68
+ self.time_created = attributes[:'timeCreated']
69
+ end
70
+
71
+ raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
72
+
73
+ if attributes[:'time_created']
74
+ self.time_created = attributes[:'time_created']
75
+ end
76
+
77
+ end
78
+
79
+ # Custom attribute writer method checking allowed values (enum).
80
+ # @param [Object] reason Object to be assigned
81
+ def reason=(reason)
82
+ if reason && !REASON_ENUM.include?(reason)
83
+ @reason = REASON_UNKNOWN_ENUM_VALUE
84
+ else
85
+ @reason = reason
86
+ end
87
+ end
88
+
89
+ # Checks equality by comparing each attribute.
90
+ # @param [Object] other_object to be compared
91
+ def ==(other_object)
92
+ return true if self.equal?(other_object)
93
+ self.class == other_object.class &&
94
+ email_address == other_object.email_address &&
95
+ id == other_object.id &&
96
+ reason == other_object.reason &&
97
+ time_created == other_object.time_created
98
+ end
99
+
100
+ # @see the `==` method
101
+ # @param [Object] other_object to be compared
102
+ def eql?(other_object)
103
+ self == other_object
104
+ end
105
+
106
+ # Calculates hash code according to all attributes.
107
+ # @return [Fixnum] Hash code
108
+ def hash
109
+ [email_address, id, reason, time_created].hash
110
+ end
111
+
112
+ # Builds the object from hash
113
+ # @param [Hash] attributes Model attributes in the form of hash
114
+ # @return [Object] Returns the model itself
115
+ def build_from_hash(attributes)
116
+ return nil unless attributes.is_a?(Hash)
117
+ self.class.swagger_types.each_pair do |key, type|
118
+ if type =~ /^Array<(.*)>/i
119
+ # check to ensure the input is an array given that the the attribute
120
+ # is documented as an array but the input is not
121
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
122
+ self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
123
+ end
124
+ elsif !attributes[self.class.attribute_map[key]].nil?
125
+ self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
126
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
127
+ end
128
+
129
+ self
130
+ end
131
+
132
+ # Returns the string representation of the object
133
+ # @return [String] String presentation of the object
134
+ def to_s
135
+ to_hash.to_s
136
+ end
137
+
138
+ # Returns the object in the form of hash
139
+ # @return [Hash] Returns the object in the form of hash
140
+ def to_hash
141
+ hash = {}
142
+ self.class.attribute_map.each_pair do |attr, param|
143
+ value = public_method(attr).call
144
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
145
+ hash[param] = _to_hash(value)
146
+ end
147
+ hash
148
+ end
149
+
150
+ private
151
+
152
+ # Outputs non-array value in the form of hash
153
+ # For object, use to_hash. Otherwise, just return the value
154
+ # @param [Object] value Any valid value
155
+ # @return [Hash] Returns the value in the form of hash
156
+ def _to_hash(value)
157
+ if value.is_a?(Array)
158
+ value.compact.map{ |v| _to_hash(v) }
159
+ elsif value.is_a?(Hash)
160
+ {}.tap do |hash|
161
+ value.each { |k, v| hash[k] = _to_hash(v) }
162
+ end
163
+ elsif value.respond_to? :to_hash
164
+ value.to_hash
165
+ else
166
+ value
167
+ end
168
+ end
169
+
170
+
171
+
172
+ # Attribute mapping from ruby-style variable name to JSON key.
173
+ def self.attribute_map
174
+ {
175
+ :'email_address' => :'emailAddress',
176
+ :'id' => :'id',
177
+ :'reason' => :'reason',
178
+ :'time_created' => :'timeCreated'
179
+ }
180
+ end
181
+
182
+ # Attribute type mapping.
183
+ def self.swagger_types
184
+ {
185
+ :'email_address' => :'String',
186
+ :'id' => :'String',
187
+ :'reason' => :'String',
188
+ :'time_created' => :'DateTime'
189
+ }
190
+ end
191
+ end
192
+ end