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.
- checksums.yaml +4 -4
- data/README.md +2 -1
- data/lib/oci.rb +1 -0
- data/lib/oci/api_client.rb +22 -4
- data/lib/oci/audit/audit_client.rb +7 -7
- data/lib/oci/core/blockstorage_client.rb +30 -30
- data/lib/oci/core/compute_client.rb +55 -54
- data/lib/oci/core/core.rb +2 -0
- data/lib/oci/core/models/attach_paravirtualized_volume_details.rb +133 -0
- data/lib/oci/core/models/attach_volume_details.rb +2 -1
- data/lib/oci/core/models/create_image_details.rb +1 -1
- data/lib/oci/core/models/create_public_ip_details.rb +1 -1
- data/lib/oci/core/models/create_virtual_circuit_details.rb +1 -1
- data/lib/oci/core/models/create_volume_backup_details.rb +1 -1
- data/lib/oci/core/models/image.rb +22 -1
- data/lib/oci/core/models/image_source_details.rb +1 -1
- data/lib/oci/core/models/instance_source_via_image_details.rb +20 -1
- data/lib/oci/core/models/paravirtualized_volume_attachment.rb +154 -0
- data/lib/oci/core/models/update_virtual_circuit_details.rb +1 -1
- data/lib/oci/core/models/volume_attachment.rb +1 -0
- data/lib/oci/core/virtual_network_client.rb +154 -154
- data/lib/oci/database/database_client.rb +59 -59
- data/lib/oci/database/models/create_data_guard_association_details.rb +2 -2
- data/lib/oci/database/models/create_database_details.rb +1 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_base.rb +1 -1
- data/lib/oci/database/models/launch_db_system_details.rb +3 -3
- data/lib/oci/database/models/patch_details.rb +1 -1
- data/lib/oci/dns/dns_client.rb +44 -44
- data/lib/oci/dns/models/create_zone_details.rb +1 -1
- data/lib/oci/dns/models/record_operation.rb +1 -1
- data/lib/oci/email/email.rb +22 -0
- data/lib/oci/email/email_client.rb +417 -0
- data/lib/oci/email/models/create_sender_details.rb +147 -0
- data/lib/oci/email/models/create_suppression_details.rb +149 -0
- data/lib/oci/email/models/sender.rb +219 -0
- data/lib/oci/email/models/sender_summary.rb +195 -0
- data/lib/oci/email/models/suppression.rb +191 -0
- data/lib/oci/email/models/suppression_summary.rb +192 -0
- data/lib/oci/email/util.rb +2 -0
- data/lib/oci/file_storage/file_storage_client.rb +42 -42
- data/lib/oci/identity/identity.rb +4 -0
- data/lib/oci/identity/identity_client.rb +250 -94
- data/lib/oci/identity/models/compartment.rb +1 -1
- data/lib/oci/identity/models/create_compartment_details.rb +1 -1
- data/lib/oci/identity/models/create_identity_provider_details.rb +2 -2
- data/lib/oci/identity/models/create_smtp_credential_details.rb +122 -0
- data/lib/oci/identity/models/smtp_credential.rb +285 -0
- data/lib/oci/identity/models/smtp_credential_summary.rb +267 -0
- data/lib/oci/identity/models/update_compartment_details.rb +1 -0
- data/lib/oci/identity/models/update_identity_provider_details.rb +1 -1
- data/lib/oci/identity/models/update_smtp_credential_details.rb +121 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +74 -74
- data/lib/oci/object_storage/models/create_bucket_details.rb +2 -2
- data/lib/oci/object_storage/models/create_preauthenticated_request_details.rb +1 -1
- data/lib/oci/object_storage/models/update_bucket_details.rb +1 -1
- data/lib/oci/object_storage/object_storage_client.rb +73 -73
- data/lib/oci/regions.rb +2 -1
- data/lib/oci/response.rb +1 -0
- data/lib/oci/version.rb +1 -1
- metadata +17 -20
@@ -38,7 +38,7 @@ module OCI
|
|
38
38
|
attr_accessor :compartment_id
|
39
39
|
|
40
40
|
# **[Required]** The name you assign to the compartment during creation. The name must be unique across all
|
41
|
-
# compartments in the tenancy.
|
41
|
+
# compartments in the tenancy. Avoid entering confidential information.
|
42
42
|
#
|
43
43
|
# @return [String]
|
44
44
|
attr_accessor :name
|
@@ -9,7 +9,7 @@ module OCI
|
|
9
9
|
attr_accessor :compartment_id
|
10
10
|
|
11
11
|
# **[Required]** The name you assign to the compartment during creation. The name must be unique across all compartments
|
12
|
-
# in the tenancy.
|
12
|
+
# in the tenancy. Avoid entering confidential information.
|
13
13
|
#
|
14
14
|
# @return [String]
|
15
15
|
attr_accessor :name
|
@@ -144,7 +144,7 @@ module OCI
|
|
144
144
|
# @param [Object] product_type Object to be assigned
|
145
145
|
def product_type=(product_type)
|
146
146
|
if product_type && !PRODUCT_TYPE_ENUM.include?(product_type)
|
147
|
-
|
147
|
+
raise "Invalid value for 'product_type': this must be one of the values in PRODUCT_TYPE_ENUM."
|
148
148
|
else
|
149
149
|
@product_type = product_type
|
150
150
|
end
|
@@ -154,7 +154,7 @@ module OCI
|
|
154
154
|
# @param [Object] protocol Object to be assigned
|
155
155
|
def protocol=(protocol)
|
156
156
|
if protocol && !PROTOCOL_ENUM.include?(protocol)
|
157
|
-
|
157
|
+
raise "Invalid value for 'protocol': this must be one of the values in PROTOCOL_ENUM."
|
158
158
|
else
|
159
159
|
@protocol = protocol
|
160
160
|
end
|
@@ -0,0 +1,122 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
class Identity::Models::CreateSmtpCredentialDetails
|
7
|
+
# **[Required]** The description you assign to the SMTP credentials during creation. Does not have to be unique, and it's changeable.
|
8
|
+
#
|
9
|
+
# @return [String]
|
10
|
+
attr_accessor :description
|
11
|
+
|
12
|
+
|
13
|
+
# Initializes the object
|
14
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
15
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
16
|
+
def initialize(attributes = {})
|
17
|
+
return unless attributes.is_a?(Hash)
|
18
|
+
|
19
|
+
# convert string to symbol for hash key
|
20
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
21
|
+
|
22
|
+
if attributes[:'description']
|
23
|
+
self.description = attributes[:'description']
|
24
|
+
end
|
25
|
+
|
26
|
+
end
|
27
|
+
|
28
|
+
# Checks equality by comparing each attribute.
|
29
|
+
# @param [Object] other_object to be compared
|
30
|
+
def ==(other_object)
|
31
|
+
return true if self.equal?(other_object)
|
32
|
+
self.class == other_object.class &&
|
33
|
+
description == other_object.description
|
34
|
+
end
|
35
|
+
|
36
|
+
# @see the `==` method
|
37
|
+
# @param [Object] other_object to be compared
|
38
|
+
def eql?(other_object)
|
39
|
+
self == other_object
|
40
|
+
end
|
41
|
+
|
42
|
+
# Calculates hash code according to all attributes.
|
43
|
+
# @return [Fixnum] Hash code
|
44
|
+
def hash
|
45
|
+
[description].hash
|
46
|
+
end
|
47
|
+
|
48
|
+
# Builds the object from hash
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
50
|
+
# @return [Object] Returns the model itself
|
51
|
+
def build_from_hash(attributes)
|
52
|
+
return nil unless attributes.is_a?(Hash)
|
53
|
+
self.class.swagger_types.each_pair do |key, type|
|
54
|
+
if type =~ /^Array<(.*)>/i
|
55
|
+
# check to ensure the input is an array given that the the attribute
|
56
|
+
# is documented as an array but the input is not
|
57
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
58
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
59
|
+
end
|
60
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
61
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
62
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
63
|
+
end
|
64
|
+
|
65
|
+
self
|
66
|
+
end
|
67
|
+
|
68
|
+
# Returns the string representation of the object
|
69
|
+
# @return [String] String presentation of the object
|
70
|
+
def to_s
|
71
|
+
to_hash.to_s
|
72
|
+
end
|
73
|
+
|
74
|
+
# Returns the object in the form of hash
|
75
|
+
# @return [Hash] Returns the object in the form of hash
|
76
|
+
def to_hash
|
77
|
+
hash = {}
|
78
|
+
self.class.attribute_map.each_pair do |attr, param|
|
79
|
+
value = public_method(attr).call
|
80
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
81
|
+
hash[param] = _to_hash(value)
|
82
|
+
end
|
83
|
+
hash
|
84
|
+
end
|
85
|
+
|
86
|
+
private
|
87
|
+
|
88
|
+
# Outputs non-array value in the form of hash
|
89
|
+
# For object, use to_hash. Otherwise, just return the value
|
90
|
+
# @param [Object] value Any valid value
|
91
|
+
# @return [Hash] Returns the value in the form of hash
|
92
|
+
def _to_hash(value)
|
93
|
+
if value.is_a?(Array)
|
94
|
+
value.compact.map{ |v| _to_hash(v) }
|
95
|
+
elsif value.is_a?(Hash)
|
96
|
+
{}.tap do |hash|
|
97
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
98
|
+
end
|
99
|
+
elsif value.respond_to? :to_hash
|
100
|
+
value.to_hash
|
101
|
+
else
|
102
|
+
value
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
106
|
+
|
107
|
+
|
108
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
109
|
+
def self.attribute_map
|
110
|
+
{
|
111
|
+
:'description' => :'description'
|
112
|
+
}
|
113
|
+
end
|
114
|
+
|
115
|
+
# Attribute type mapping.
|
116
|
+
def self.swagger_types
|
117
|
+
{
|
118
|
+
:'description' => :'String'
|
119
|
+
}
|
120
|
+
end
|
121
|
+
end
|
122
|
+
end
|
@@ -0,0 +1,285 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
# Simple Mail Transfer Protocol (SMTP) credentials are needed to send email through Email Delivery.
|
7
|
+
# The SMTP credentials are used for SMTP authentication with the service. The credentials never expire.
|
8
|
+
# A user can have up to 2 SMTP credentials at a time.
|
9
|
+
#
|
10
|
+
# **Note:** The credential set is always an Oracle-generated SMTP user name and password pair;
|
11
|
+
# you cannot designate the SMTP user name or the SMTP password.
|
12
|
+
#
|
13
|
+
# For more information, see [Managing User Credentials](https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Tasks/managingcredentials.htm#SMTP).
|
14
|
+
#
|
15
|
+
class Identity::Models::SmtpCredential
|
16
|
+
|
17
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
18
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
19
|
+
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
20
|
+
LIFECYCLE_STATE_DELETING = 'DELETING',
|
21
|
+
LIFECYCLE_STATE_DELETED = 'DELETED',
|
22
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
23
|
+
|
24
|
+
# The SMTP user name.
|
25
|
+
#
|
26
|
+
# @return [String]
|
27
|
+
attr_accessor :username
|
28
|
+
|
29
|
+
# The SMTP password.
|
30
|
+
#
|
31
|
+
# @return [String]
|
32
|
+
attr_accessor :password
|
33
|
+
|
34
|
+
# The OCID of the SMTP credential.
|
35
|
+
# @return [String]
|
36
|
+
attr_accessor :id
|
37
|
+
|
38
|
+
# The OCID of the user the SMTP credential belongs to.
|
39
|
+
# @return [String]
|
40
|
+
attr_accessor :user_id
|
41
|
+
|
42
|
+
# The description you assign to the SMTP credential. Does not have to be unique, and it's changeable.
|
43
|
+
# @return [String]
|
44
|
+
attr_accessor :description
|
45
|
+
|
46
|
+
# Date and time the `SmtpCredential` object was created, in the format defined by RFC3339.
|
47
|
+
#
|
48
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
49
|
+
#
|
50
|
+
# @return [DateTime]
|
51
|
+
attr_accessor :time_created
|
52
|
+
|
53
|
+
# Date and time when this credential will expire, in the format defined by RFC3339.
|
54
|
+
# Null if it never expires.
|
55
|
+
#
|
56
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
57
|
+
#
|
58
|
+
# @return [DateTime]
|
59
|
+
attr_accessor :time_expires
|
60
|
+
|
61
|
+
# The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from
|
62
|
+
# CREATING to ACTIVE before using it.
|
63
|
+
#
|
64
|
+
# @return [String]
|
65
|
+
attr_accessor :lifecycle_state
|
66
|
+
|
67
|
+
# The detailed status of INACTIVE lifecycleState.
|
68
|
+
# @return [Integer]
|
69
|
+
attr_accessor :inactive_status
|
70
|
+
|
71
|
+
|
72
|
+
# Initializes the object
|
73
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
74
|
+
# @option attributes [String] :username The value to assign to the {#username} property
|
75
|
+
# @option attributes [String] :password The value to assign to the {#password} property
|
76
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
77
|
+
# @option attributes [String] :user_id The value to assign to the {#user_id} property
|
78
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
79
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
80
|
+
# @option attributes [DateTime] :time_expires The value to assign to the {#time_expires} property
|
81
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
82
|
+
# @option attributes [Integer] :inactive_status The value to assign to the {#inactive_status} property
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
88
|
+
|
89
|
+
if attributes[:'username']
|
90
|
+
self.username = attributes[:'username']
|
91
|
+
end
|
92
|
+
|
93
|
+
if attributes[:'password']
|
94
|
+
self.password = attributes[:'password']
|
95
|
+
end
|
96
|
+
|
97
|
+
if attributes[:'id']
|
98
|
+
self.id = attributes[:'id']
|
99
|
+
end
|
100
|
+
|
101
|
+
if attributes[:'userId']
|
102
|
+
self.user_id = attributes[:'userId']
|
103
|
+
end
|
104
|
+
|
105
|
+
raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id')
|
106
|
+
|
107
|
+
if attributes[:'user_id']
|
108
|
+
self.user_id = attributes[:'user_id']
|
109
|
+
end
|
110
|
+
|
111
|
+
if attributes[:'description']
|
112
|
+
self.description = attributes[:'description']
|
113
|
+
end
|
114
|
+
|
115
|
+
if attributes[:'timeCreated']
|
116
|
+
self.time_created = attributes[:'timeCreated']
|
117
|
+
end
|
118
|
+
|
119
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
120
|
+
|
121
|
+
if attributes[:'time_created']
|
122
|
+
self.time_created = attributes[:'time_created']
|
123
|
+
end
|
124
|
+
|
125
|
+
if attributes[:'timeExpires']
|
126
|
+
self.time_expires = attributes[:'timeExpires']
|
127
|
+
end
|
128
|
+
|
129
|
+
raise 'You cannot provide both :timeExpires and :time_expires' if attributes.key?(:'timeExpires') && attributes.key?(:'time_expires')
|
130
|
+
|
131
|
+
if attributes[:'time_expires']
|
132
|
+
self.time_expires = attributes[:'time_expires']
|
133
|
+
end
|
134
|
+
|
135
|
+
if attributes[:'lifecycleState']
|
136
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
137
|
+
end
|
138
|
+
|
139
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
140
|
+
|
141
|
+
if attributes[:'lifecycle_state']
|
142
|
+
self.lifecycle_state = attributes[:'lifecycle_state']
|
143
|
+
end
|
144
|
+
|
145
|
+
if attributes[:'inactiveStatus']
|
146
|
+
self.inactive_status = attributes[:'inactiveStatus']
|
147
|
+
end
|
148
|
+
|
149
|
+
raise 'You cannot provide both :inactiveStatus and :inactive_status' if attributes.key?(:'inactiveStatus') && attributes.key?(:'inactive_status')
|
150
|
+
|
151
|
+
if attributes[:'inactive_status']
|
152
|
+
self.inactive_status = attributes[:'inactive_status']
|
153
|
+
end
|
154
|
+
|
155
|
+
end
|
156
|
+
|
157
|
+
# Custom attribute writer method checking allowed values (enum).
|
158
|
+
# @param [Object] lifecycle_state Object to be assigned
|
159
|
+
def lifecycle_state=(lifecycle_state)
|
160
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
161
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
162
|
+
else
|
163
|
+
@lifecycle_state = lifecycle_state
|
164
|
+
end
|
165
|
+
end
|
166
|
+
|
167
|
+
# Checks equality by comparing each attribute.
|
168
|
+
# @param [Object] other_object to be compared
|
169
|
+
def ==(other_object)
|
170
|
+
return true if self.equal?(other_object)
|
171
|
+
self.class == other_object.class &&
|
172
|
+
username == other_object.username &&
|
173
|
+
password == other_object.password &&
|
174
|
+
id == other_object.id &&
|
175
|
+
user_id == other_object.user_id &&
|
176
|
+
description == other_object.description &&
|
177
|
+
time_created == other_object.time_created &&
|
178
|
+
time_expires == other_object.time_expires &&
|
179
|
+
lifecycle_state == other_object.lifecycle_state &&
|
180
|
+
inactive_status == other_object.inactive_status
|
181
|
+
end
|
182
|
+
|
183
|
+
# @see the `==` method
|
184
|
+
# @param [Object] other_object to be compared
|
185
|
+
def eql?(other_object)
|
186
|
+
self == other_object
|
187
|
+
end
|
188
|
+
|
189
|
+
# Calculates hash code according to all attributes.
|
190
|
+
# @return [Fixnum] Hash code
|
191
|
+
def hash
|
192
|
+
[username, password, id, user_id, description, time_created, time_expires, lifecycle_state, inactive_status].hash
|
193
|
+
end
|
194
|
+
|
195
|
+
# Builds the object from hash
|
196
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
197
|
+
# @return [Object] Returns the model itself
|
198
|
+
def build_from_hash(attributes)
|
199
|
+
return nil unless attributes.is_a?(Hash)
|
200
|
+
self.class.swagger_types.each_pair do |key, type|
|
201
|
+
if type =~ /^Array<(.*)>/i
|
202
|
+
# check to ensure the input is an array given that the the attribute
|
203
|
+
# is documented as an array but the input is not
|
204
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
205
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
206
|
+
end
|
207
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
208
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
209
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
210
|
+
end
|
211
|
+
|
212
|
+
self
|
213
|
+
end
|
214
|
+
|
215
|
+
# Returns the string representation of the object
|
216
|
+
# @return [String] String presentation of the object
|
217
|
+
def to_s
|
218
|
+
to_hash.to_s
|
219
|
+
end
|
220
|
+
|
221
|
+
# Returns the object in the form of hash
|
222
|
+
# @return [Hash] Returns the object in the form of hash
|
223
|
+
def to_hash
|
224
|
+
hash = {}
|
225
|
+
self.class.attribute_map.each_pair do |attr, param|
|
226
|
+
value = public_method(attr).call
|
227
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
228
|
+
hash[param] = _to_hash(value)
|
229
|
+
end
|
230
|
+
hash
|
231
|
+
end
|
232
|
+
|
233
|
+
private
|
234
|
+
|
235
|
+
# Outputs non-array value in the form of hash
|
236
|
+
# For object, use to_hash. Otherwise, just return the value
|
237
|
+
# @param [Object] value Any valid value
|
238
|
+
# @return [Hash] Returns the value in the form of hash
|
239
|
+
def _to_hash(value)
|
240
|
+
if value.is_a?(Array)
|
241
|
+
value.compact.map{ |v| _to_hash(v) }
|
242
|
+
elsif value.is_a?(Hash)
|
243
|
+
{}.tap do |hash|
|
244
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
245
|
+
end
|
246
|
+
elsif value.respond_to? :to_hash
|
247
|
+
value.to_hash
|
248
|
+
else
|
249
|
+
value
|
250
|
+
end
|
251
|
+
end
|
252
|
+
|
253
|
+
|
254
|
+
|
255
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
256
|
+
def self.attribute_map
|
257
|
+
{
|
258
|
+
:'username' => :'username',
|
259
|
+
:'password' => :'password',
|
260
|
+
:'id' => :'id',
|
261
|
+
:'user_id' => :'userId',
|
262
|
+
:'description' => :'description',
|
263
|
+
:'time_created' => :'timeCreated',
|
264
|
+
:'time_expires' => :'timeExpires',
|
265
|
+
:'lifecycle_state' => :'lifecycleState',
|
266
|
+
:'inactive_status' => :'inactiveStatus'
|
267
|
+
}
|
268
|
+
end
|
269
|
+
|
270
|
+
# Attribute type mapping.
|
271
|
+
def self.swagger_types
|
272
|
+
{
|
273
|
+
:'username' => :'String',
|
274
|
+
:'password' => :'String',
|
275
|
+
:'id' => :'String',
|
276
|
+
:'user_id' => :'String',
|
277
|
+
:'description' => :'String',
|
278
|
+
:'time_created' => :'DateTime',
|
279
|
+
:'time_expires' => :'DateTime',
|
280
|
+
:'lifecycle_state' => :'String',
|
281
|
+
:'inactive_status' => :'Integer'
|
282
|
+
}
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
@@ -0,0 +1,267 @@
|
|
1
|
+
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
module OCI
|
6
|
+
# As the name suggests, an `SmtpCredentialSummary` object contains information about an `SmtpCredential`.
|
7
|
+
# The SMTP credential is used for SMTP authentication with
|
8
|
+
# the [Email Delivery Service](https://docs.us-phoenix-1.oraclecloud.com/Content/Email/Concepts/overview.htm).
|
9
|
+
#
|
10
|
+
class Identity::Models::SmtpCredentialSummary
|
11
|
+
|
12
|
+
LIFECYCLE_STATE_ENUM = [LIFECYCLE_STATE_CREATING = 'CREATING',
|
13
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE',
|
14
|
+
LIFECYCLE_STATE_INACTIVE = 'INACTIVE',
|
15
|
+
LIFECYCLE_STATE_DELETING = 'DELETING',
|
16
|
+
LIFECYCLE_STATE_DELETED = 'DELETED',
|
17
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE']
|
18
|
+
|
19
|
+
# The SMTP user name.
|
20
|
+
#
|
21
|
+
# @return [String]
|
22
|
+
attr_accessor :username
|
23
|
+
|
24
|
+
# The OCID of the SMTP credential.
|
25
|
+
# @return [String]
|
26
|
+
attr_accessor :id
|
27
|
+
|
28
|
+
# The OCID of the user the SMTP credential belongs to.
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :user_id
|
31
|
+
|
32
|
+
# The description you assign to the SMTP credential. Does not have to be unique, and it's changeable.
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :description
|
35
|
+
|
36
|
+
# Date and time the `SmtpCredential` object was created, in the format defined by RFC3339.
|
37
|
+
#
|
38
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
39
|
+
#
|
40
|
+
# @return [DateTime]
|
41
|
+
attr_accessor :time_created
|
42
|
+
|
43
|
+
# Date and time when this credential will expire, in the format defined by RFC3339.
|
44
|
+
# Null if it never expires.
|
45
|
+
#
|
46
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
47
|
+
#
|
48
|
+
# @return [DateTime]
|
49
|
+
attr_accessor :time_expires
|
50
|
+
|
51
|
+
# The credential's current state. After creating a SMTP credential, make sure its `lifecycleState` changes from
|
52
|
+
# CREATING to ACTIVE before using it.
|
53
|
+
#
|
54
|
+
# @return [String]
|
55
|
+
attr_accessor :lifecycle_state
|
56
|
+
|
57
|
+
# The detailed status of INACTIVE lifecycleState.
|
58
|
+
# @return [Integer]
|
59
|
+
attr_accessor :inactive_status
|
60
|
+
|
61
|
+
|
62
|
+
# Initializes the object
|
63
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
64
|
+
# @option attributes [String] :username The value to assign to the {#username} property
|
65
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
66
|
+
# @option attributes [String] :user_id The value to assign to the {#user_id} property
|
67
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
68
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
69
|
+
# @option attributes [DateTime] :time_expires The value to assign to the {#time_expires} property
|
70
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
71
|
+
# @option attributes [Integer] :inactive_status The value to assign to the {#inactive_status} property
|
72
|
+
def initialize(attributes = {})
|
73
|
+
return unless attributes.is_a?(Hash)
|
74
|
+
|
75
|
+
# convert string to symbol for hash key
|
76
|
+
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
|
77
|
+
|
78
|
+
if attributes[:'username']
|
79
|
+
self.username = attributes[:'username']
|
80
|
+
end
|
81
|
+
|
82
|
+
if attributes[:'id']
|
83
|
+
self.id = attributes[:'id']
|
84
|
+
end
|
85
|
+
|
86
|
+
if attributes[:'userId']
|
87
|
+
self.user_id = attributes[:'userId']
|
88
|
+
end
|
89
|
+
|
90
|
+
raise 'You cannot provide both :userId and :user_id' if attributes.key?(:'userId') && attributes.key?(:'user_id')
|
91
|
+
|
92
|
+
if attributes[:'user_id']
|
93
|
+
self.user_id = attributes[:'user_id']
|
94
|
+
end
|
95
|
+
|
96
|
+
if attributes[:'description']
|
97
|
+
self.description = attributes[:'description']
|
98
|
+
end
|
99
|
+
|
100
|
+
if attributes[:'timeCreated']
|
101
|
+
self.time_created = attributes[:'timeCreated']
|
102
|
+
end
|
103
|
+
|
104
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
105
|
+
|
106
|
+
if attributes[:'time_created']
|
107
|
+
self.time_created = attributes[:'time_created']
|
108
|
+
end
|
109
|
+
|
110
|
+
if attributes[:'timeExpires']
|
111
|
+
self.time_expires = attributes[:'timeExpires']
|
112
|
+
end
|
113
|
+
|
114
|
+
raise 'You cannot provide both :timeExpires and :time_expires' if attributes.key?(:'timeExpires') && attributes.key?(:'time_expires')
|
115
|
+
|
116
|
+
if attributes[:'time_expires']
|
117
|
+
self.time_expires = attributes[:'time_expires']
|
118
|
+
end
|
119
|
+
|
120
|
+
if attributes[:'lifecycleState']
|
121
|
+
self.lifecycle_state = attributes[:'lifecycleState']
|
122
|
+
end
|
123
|
+
|
124
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
125
|
+
|
126
|
+
if attributes[:'lifecycle_state']
|
127
|
+
self.lifecycle_state = attributes[:'lifecycle_state']
|
128
|
+
end
|
129
|
+
|
130
|
+
if attributes[:'inactiveStatus']
|
131
|
+
self.inactive_status = attributes[:'inactiveStatus']
|
132
|
+
end
|
133
|
+
|
134
|
+
raise 'You cannot provide both :inactiveStatus and :inactive_status' if attributes.key?(:'inactiveStatus') && attributes.key?(:'inactive_status')
|
135
|
+
|
136
|
+
if attributes[:'inactive_status']
|
137
|
+
self.inactive_status = attributes[:'inactive_status']
|
138
|
+
end
|
139
|
+
|
140
|
+
end
|
141
|
+
|
142
|
+
# Custom attribute writer method checking allowed values (enum).
|
143
|
+
# @param [Object] lifecycle_state Object to be assigned
|
144
|
+
def lifecycle_state=(lifecycle_state)
|
145
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
146
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
147
|
+
else
|
148
|
+
@lifecycle_state = lifecycle_state
|
149
|
+
end
|
150
|
+
end
|
151
|
+
|
152
|
+
# Checks equality by comparing each attribute.
|
153
|
+
# @param [Object] other_object to be compared
|
154
|
+
def ==(other_object)
|
155
|
+
return true if self.equal?(other_object)
|
156
|
+
self.class == other_object.class &&
|
157
|
+
username == other_object.username &&
|
158
|
+
id == other_object.id &&
|
159
|
+
user_id == other_object.user_id &&
|
160
|
+
description == other_object.description &&
|
161
|
+
time_created == other_object.time_created &&
|
162
|
+
time_expires == other_object.time_expires &&
|
163
|
+
lifecycle_state == other_object.lifecycle_state &&
|
164
|
+
inactive_status == other_object.inactive_status
|
165
|
+
end
|
166
|
+
|
167
|
+
# @see the `==` method
|
168
|
+
# @param [Object] other_object to be compared
|
169
|
+
def eql?(other_object)
|
170
|
+
self == other_object
|
171
|
+
end
|
172
|
+
|
173
|
+
# Calculates hash code according to all attributes.
|
174
|
+
# @return [Fixnum] Hash code
|
175
|
+
def hash
|
176
|
+
[username, id, user_id, description, time_created, time_expires, lifecycle_state, inactive_status].hash
|
177
|
+
end
|
178
|
+
|
179
|
+
# Builds the object from hash
|
180
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
181
|
+
# @return [Object] Returns the model itself
|
182
|
+
def build_from_hash(attributes)
|
183
|
+
return nil unless attributes.is_a?(Hash)
|
184
|
+
self.class.swagger_types.each_pair do |key, type|
|
185
|
+
if type =~ /^Array<(.*)>/i
|
186
|
+
# check to ensure the input is an array given that the the attribute
|
187
|
+
# is documented as an array but the input is not
|
188
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
189
|
+
self.public_method("#{key}=").call(attributes[self.class.attribute_map[key]].map{ |v| OCI::Internal::Util.convert_to_type($1, v) } )
|
190
|
+
end
|
191
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
192
|
+
self.public_method("#{key}=").call(OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]))
|
193
|
+
end # or else data not found in attributes(hash), not an issue as the data can be optional
|
194
|
+
end
|
195
|
+
|
196
|
+
self
|
197
|
+
end
|
198
|
+
|
199
|
+
# Returns the string representation of the object
|
200
|
+
# @return [String] String presentation of the object
|
201
|
+
def to_s
|
202
|
+
to_hash.to_s
|
203
|
+
end
|
204
|
+
|
205
|
+
# Returns the object in the form of hash
|
206
|
+
# @return [Hash] Returns the object in the form of hash
|
207
|
+
def to_hash
|
208
|
+
hash = {}
|
209
|
+
self.class.attribute_map.each_pair do |attr, param|
|
210
|
+
value = public_method(attr).call
|
211
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
212
|
+
hash[param] = _to_hash(value)
|
213
|
+
end
|
214
|
+
hash
|
215
|
+
end
|
216
|
+
|
217
|
+
private
|
218
|
+
|
219
|
+
# Outputs non-array value in the form of hash
|
220
|
+
# For object, use to_hash. Otherwise, just return the value
|
221
|
+
# @param [Object] value Any valid value
|
222
|
+
# @return [Hash] Returns the value in the form of hash
|
223
|
+
def _to_hash(value)
|
224
|
+
if value.is_a?(Array)
|
225
|
+
value.compact.map{ |v| _to_hash(v) }
|
226
|
+
elsif value.is_a?(Hash)
|
227
|
+
{}.tap do |hash|
|
228
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
229
|
+
end
|
230
|
+
elsif value.respond_to? :to_hash
|
231
|
+
value.to_hash
|
232
|
+
else
|
233
|
+
value
|
234
|
+
end
|
235
|
+
end
|
236
|
+
|
237
|
+
|
238
|
+
|
239
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
240
|
+
def self.attribute_map
|
241
|
+
{
|
242
|
+
:'username' => :'username',
|
243
|
+
:'id' => :'id',
|
244
|
+
:'user_id' => :'userId',
|
245
|
+
:'description' => :'description',
|
246
|
+
:'time_created' => :'timeCreated',
|
247
|
+
:'time_expires' => :'timeExpires',
|
248
|
+
:'lifecycle_state' => :'lifecycleState',
|
249
|
+
:'inactive_status' => :'inactiveStatus'
|
250
|
+
}
|
251
|
+
end
|
252
|
+
|
253
|
+
# Attribute type mapping.
|
254
|
+
def self.swagger_types
|
255
|
+
{
|
256
|
+
:'username' => :'String',
|
257
|
+
:'id' => :'String',
|
258
|
+
:'user_id' => :'String',
|
259
|
+
:'description' => :'String',
|
260
|
+
:'time_created' => :'DateTime',
|
261
|
+
:'time_expires' => :'DateTime',
|
262
|
+
:'lifecycle_state' => :'String',
|
263
|
+
:'inactive_status' => :'Integer'
|
264
|
+
}
|
265
|
+
end
|
266
|
+
end
|
267
|
+
end
|