oci 2.4.6 → 2.4.7
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 +3 -1
- data/lib/oci.rb +2 -0
- data/lib/oci/database/database.rb +1 -0
- data/lib/oci/database/models/database.rb +18 -4
- data/lib/oci/database/models/database_connection_strings.rb +182 -0
- data/lib/oci/database/models/database_summary.rb +18 -4
- data/lib/oci/dns/dns.rb +23 -0
- data/lib/oci/dns/dns_client.rb +802 -75
- data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
- data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
- data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
- data/lib/oci/dns/models/steering_policy.rb +418 -0
- data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
- data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
- data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
- data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
- data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
- data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
- data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
- data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
- data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
- data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
- data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
- data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
- data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
- data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
- data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
- data/lib/oci/email/email.rb +1 -0
- data/lib/oci/email/email_client.rb +87 -16
- data/lib/oci/email/email_client_composite_operations.rb +40 -0
- data/lib/oci/email/models/create_sender_details.rb +40 -6
- data/lib/oci/email/models/create_suppression_details.rb +2 -2
- data/lib/oci/email/models/sender.rb +53 -5
- data/lib/oci/email/models/sender_summary.rb +38 -4
- data/lib/oci/email/models/suppression.rb +20 -3
- data/lib/oci/email/models/update_sender_details.rb +174 -0
- data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
- data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
- data/lib/oci/healthchecks/healthchecks.rb +41 -0
- data/lib/oci/healthchecks/models/connection.rb +159 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
- data/lib/oci/healthchecks/models/dns.rb +165 -0
- data/lib/oci/healthchecks/models/geolocation.rb +239 -0
- data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
- data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
- data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/http_probe.rb +314 -0
- data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
- data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
- data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
- data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
- data/lib/oci/healthchecks/models/routing.rb +192 -0
- data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
- data/lib/oci/healthchecks/util.rb +2 -0
- data/lib/oci/regions.rb +3 -1
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +283 -0
- data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
- data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
- data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
- data/lib/oci/waas/models/captcha.rb +231 -0
- data/lib/oci/waas/models/certificate.rb +383 -0
- data/lib/oci/waas/models/certificate_extensions.rb +170 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
- data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
- data/lib/oci/waas/models/certificate_summary.rb +274 -0
- data/lib/oci/waas/models/create_certificate_details.rb +241 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
- data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
- data/lib/oci/waas/models/edge_subnet.rb +173 -0
- data/lib/oci/waas/models/good_bot.rb +183 -0
- data/lib/oci/waas/models/header.rb +159 -0
- data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
- data/lib/oci/waas/models/js_challenge.rb +240 -0
- data/lib/oci/waas/models/lifecycle_states.rb +14 -0
- data/lib/oci/waas/models/origin.rb +191 -0
- data/lib/oci/waas/models/policy_config.rb +181 -0
- data/lib/oci/waas/models/protection_rule.rb +237 -0
- data/lib/oci/waas/models/protection_rule_action.rb +185 -0
- data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
- data/lib/oci/waas/models/protection_settings.rb +404 -0
- data/lib/oci/waas/models/recommendation.rb +210 -0
- data/lib/oci/waas/models/threat_feed.rb +202 -0
- data/lib/oci/waas/models/threat_feed_action.rb +175 -0
- data/lib/oci/waas/models/update_certificate_details.rb +183 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
- data/lib/oci/waas/models/waas_policy.rb +331 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
- data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
- data/lib/oci/waas/models/waf_config.rb +295 -0
- data/lib/oci/waas/models/waf_config_details.rb +253 -0
- data/lib/oci/waas/models/waf_log.rb +510 -0
- data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
- data/lib/oci/waas/models/waf_request.rb +177 -0
- data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
- data/lib/oci/waas/models/whitelist.rb +159 -0
- data/lib/oci/waas/models/work_request.rb +322 -0
- data/lib/oci/waas/models/work_request_error.rb +170 -0
- data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
- data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
- data/lib/oci/waas/models/work_request_resource.rb +217 -0
- data/lib/oci/waas/models/work_request_status_values.rb +14 -0
- data/lib/oci/waas/models/work_request_summary.rb +302 -0
- data/lib/oci/waas/util.rb +2 -0
- data/lib/oci/waas/waas.rb +66 -0
- data/lib/oci/waas/waas_client.rb +3044 -0
- data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
- metadata +105 -2
|
@@ -0,0 +1,274 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
require 'logger'
|
|
5
|
+
|
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
7
|
+
module OCI
|
|
8
|
+
# A summary of the SSL certificate's information.
|
|
9
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
10
|
+
class Waas::Models::CertificateSummary # rubocop:disable Metrics/LineLength
|
|
11
|
+
LIFECYCLE_STATE_ENUM = [
|
|
12
|
+
LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
|
|
13
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
|
|
14
|
+
LIFECYCLE_STATE_FAILED = 'FAILED'.freeze,
|
|
15
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
|
16
|
+
LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
|
|
17
|
+
LIFECYCLE_STATE_DELETED = 'DELETED'.freeze,
|
|
18
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
19
|
+
].freeze
|
|
20
|
+
|
|
21
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the SSL certificate.
|
|
22
|
+
# @return [String]
|
|
23
|
+
attr_accessor :id
|
|
24
|
+
|
|
25
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the SSL certificate's compartment.
|
|
26
|
+
# @return [String]
|
|
27
|
+
attr_accessor :compartment_id
|
|
28
|
+
|
|
29
|
+
# The user-friendly name of the SSL certificate.
|
|
30
|
+
# @return [String]
|
|
31
|
+
attr_accessor :display_name
|
|
32
|
+
|
|
33
|
+
# The date and time the certificate will expire, expressed in RFC 3339 timestamp format.
|
|
34
|
+
# @return [DateTime]
|
|
35
|
+
attr_accessor :time_not_valid_after
|
|
36
|
+
|
|
37
|
+
# A simple key-value pair without any defined schema.
|
|
38
|
+
# @return [Hash<String, String>]
|
|
39
|
+
attr_accessor :freeform_tags
|
|
40
|
+
|
|
41
|
+
# A key-value pair with a defined schema that restricts the values of tags. These predefined keys are scoped to namespaces.
|
|
42
|
+
# @return [Hash<String, Hash<String, Object>>]
|
|
43
|
+
attr_accessor :defined_tags
|
|
44
|
+
|
|
45
|
+
# The current lifecycle state of the certificate.
|
|
46
|
+
# @return [String]
|
|
47
|
+
attr_reader :lifecycle_state
|
|
48
|
+
|
|
49
|
+
# The date and time the certificate was created, in the format defined by RFC3339.
|
|
50
|
+
# @return [DateTime]
|
|
51
|
+
attr_accessor :time_created
|
|
52
|
+
|
|
53
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
54
|
+
def self.attribute_map
|
|
55
|
+
{
|
|
56
|
+
# rubocop:disable Style/SymbolLiteral
|
|
57
|
+
'id': :'id',
|
|
58
|
+
'compartment_id': :'compartmentId',
|
|
59
|
+
'display_name': :'displayName',
|
|
60
|
+
'time_not_valid_after': :'timeNotValidAfter',
|
|
61
|
+
'freeform_tags': :'freeformTags',
|
|
62
|
+
'defined_tags': :'definedTags',
|
|
63
|
+
'lifecycle_state': :'lifecycleState',
|
|
64
|
+
'time_created': :'timeCreated'
|
|
65
|
+
# rubocop:enable Style/SymbolLiteral
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# Attribute type mapping.
|
|
70
|
+
def self.swagger_types
|
|
71
|
+
{
|
|
72
|
+
# rubocop:disable Style/SymbolLiteral
|
|
73
|
+
'id': :'String',
|
|
74
|
+
'compartment_id': :'String',
|
|
75
|
+
'display_name': :'String',
|
|
76
|
+
'time_not_valid_after': :'DateTime',
|
|
77
|
+
'freeform_tags': :'Hash<String, String>',
|
|
78
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
|
79
|
+
'lifecycle_state': :'String',
|
|
80
|
+
'time_created': :'DateTime'
|
|
81
|
+
# rubocop:enable Style/SymbolLiteral
|
|
82
|
+
}
|
|
83
|
+
end
|
|
84
|
+
|
|
85
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
86
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
# Initializes the object
|
|
90
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
91
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
|
92
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
|
93
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
94
|
+
# @option attributes [DateTime] :time_not_valid_after The value to assign to the {#time_not_valid_after} property
|
|
95
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
|
96
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
|
97
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
|
98
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
|
99
|
+
def initialize(attributes = {})
|
|
100
|
+
return unless attributes.is_a?(Hash)
|
|
101
|
+
|
|
102
|
+
# convert string to symbol for hash key
|
|
103
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
104
|
+
|
|
105
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
|
106
|
+
|
|
107
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
108
|
+
|
|
109
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
110
|
+
|
|
111
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
112
|
+
|
|
113
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
114
|
+
|
|
115
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
116
|
+
|
|
117
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
118
|
+
|
|
119
|
+
self.time_not_valid_after = attributes[:'timeNotValidAfter'] if attributes[:'timeNotValidAfter']
|
|
120
|
+
|
|
121
|
+
raise 'You cannot provide both :timeNotValidAfter and :time_not_valid_after' if attributes.key?(:'timeNotValidAfter') && attributes.key?(:'time_not_valid_after')
|
|
122
|
+
|
|
123
|
+
self.time_not_valid_after = attributes[:'time_not_valid_after'] if attributes[:'time_not_valid_after']
|
|
124
|
+
|
|
125
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
126
|
+
|
|
127
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
128
|
+
|
|
129
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
130
|
+
|
|
131
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
132
|
+
|
|
133
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
134
|
+
|
|
135
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
136
|
+
|
|
137
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
|
138
|
+
|
|
139
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
|
140
|
+
|
|
141
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
|
142
|
+
|
|
143
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
|
144
|
+
|
|
145
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
|
146
|
+
|
|
147
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
|
148
|
+
end
|
|
149
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
150
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
151
|
+
|
|
152
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
153
|
+
# @param [Object] lifecycle_state Object to be assigned
|
|
154
|
+
def lifecycle_state=(lifecycle_state)
|
|
155
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
156
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
|
157
|
+
# rubocop: disable Metrics/LineLength
|
|
158
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
159
|
+
# rubocop: enable Metrics/LineLength
|
|
160
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
|
161
|
+
else
|
|
162
|
+
@lifecycle_state = lifecycle_state
|
|
163
|
+
end
|
|
164
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
168
|
+
|
|
169
|
+
|
|
170
|
+
# Checks equality by comparing each attribute.
|
|
171
|
+
# @param [Object] other the other object to be compared
|
|
172
|
+
def ==(other)
|
|
173
|
+
return true if equal?(other)
|
|
174
|
+
|
|
175
|
+
self.class == other.class &&
|
|
176
|
+
id == other.id &&
|
|
177
|
+
compartment_id == other.compartment_id &&
|
|
178
|
+
display_name == other.display_name &&
|
|
179
|
+
time_not_valid_after == other.time_not_valid_after &&
|
|
180
|
+
freeform_tags == other.freeform_tags &&
|
|
181
|
+
defined_tags == other.defined_tags &&
|
|
182
|
+
lifecycle_state == other.lifecycle_state &&
|
|
183
|
+
time_created == other.time_created
|
|
184
|
+
end
|
|
185
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
186
|
+
|
|
187
|
+
# @see the `==` method
|
|
188
|
+
# @param [Object] other the other object to be compared
|
|
189
|
+
def eql?(other)
|
|
190
|
+
self == other
|
|
191
|
+
end
|
|
192
|
+
|
|
193
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
# Calculates hash code according to all attributes.
|
|
197
|
+
# @return [Fixnum] Hash code
|
|
198
|
+
def hash
|
|
199
|
+
[id, compartment_id, display_name, time_not_valid_after, freeform_tags, defined_tags, lifecycle_state, time_created].hash
|
|
200
|
+
end
|
|
201
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
202
|
+
|
|
203
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
204
|
+
|
|
205
|
+
|
|
206
|
+
# Builds the object from hash
|
|
207
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
208
|
+
# @return [Object] Returns the model itself
|
|
209
|
+
def build_from_hash(attributes)
|
|
210
|
+
return nil unless attributes.is_a?(Hash)
|
|
211
|
+
|
|
212
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
213
|
+
if type =~ /^Array<(.*)>/i
|
|
214
|
+
# check to ensure the input is an array given that the the attribute
|
|
215
|
+
# is documented as an array but the input is not
|
|
216
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
217
|
+
public_method("#{key}=").call(
|
|
218
|
+
attributes[self.class.attribute_map[key]]
|
|
219
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
220
|
+
)
|
|
221
|
+
end
|
|
222
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
223
|
+
public_method("#{key}=").call(
|
|
224
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
225
|
+
)
|
|
226
|
+
end
|
|
227
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
228
|
+
end
|
|
229
|
+
|
|
230
|
+
self
|
|
231
|
+
end
|
|
232
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
233
|
+
|
|
234
|
+
# Returns the string representation of the object
|
|
235
|
+
# @return [String] String presentation of the object
|
|
236
|
+
def to_s
|
|
237
|
+
to_hash.to_s
|
|
238
|
+
end
|
|
239
|
+
|
|
240
|
+
# Returns the object in the form of hash
|
|
241
|
+
# @return [Hash] Returns the object in the form of hash
|
|
242
|
+
def to_hash
|
|
243
|
+
hash = {}
|
|
244
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
245
|
+
value = public_method(attr).call
|
|
246
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
247
|
+
|
|
248
|
+
hash[param] = _to_hash(value)
|
|
249
|
+
end
|
|
250
|
+
hash
|
|
251
|
+
end
|
|
252
|
+
|
|
253
|
+
private
|
|
254
|
+
|
|
255
|
+
# Outputs non-array value in the form of hash
|
|
256
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
257
|
+
# @param [Object] value Any valid value
|
|
258
|
+
# @return [Hash] Returns the value in the form of hash
|
|
259
|
+
def _to_hash(value)
|
|
260
|
+
if value.is_a?(Array)
|
|
261
|
+
value.compact.map { |v| _to_hash(v) }
|
|
262
|
+
elsif value.is_a?(Hash)
|
|
263
|
+
{}.tap do |hash|
|
|
264
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
265
|
+
end
|
|
266
|
+
elsif value.respond_to? :to_hash
|
|
267
|
+
value.to_hash
|
|
268
|
+
else
|
|
269
|
+
value
|
|
270
|
+
end
|
|
271
|
+
end
|
|
272
|
+
end
|
|
273
|
+
end
|
|
274
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,241 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
require 'date'
|
|
4
|
+
|
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
|
6
|
+
module OCI
|
|
7
|
+
# The data used to create a new SSL certificate.
|
|
8
|
+
#
|
|
9
|
+
# **Warning:** Oracle recommends that you avoid using any confidential information when you supply string values using the API.
|
|
10
|
+
class Waas::Models::CreateCertificateDetails # rubocop:disable Metrics/LineLength
|
|
11
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the compartment in which to create the SSL certificate.
|
|
12
|
+
# @return [String]
|
|
13
|
+
attr_accessor :compartment_id
|
|
14
|
+
|
|
15
|
+
# A user-friendly name for the SSL certificate. The name can be changed and does not need to be unique.
|
|
16
|
+
# @return [String]
|
|
17
|
+
attr_accessor :display_name
|
|
18
|
+
|
|
19
|
+
# **[Required]** The data of the SSL certificate.
|
|
20
|
+
# @return [String]
|
|
21
|
+
attr_accessor :certificate_data
|
|
22
|
+
|
|
23
|
+
# **[Required]** The private key of the SSL certificate.
|
|
24
|
+
# @return [String]
|
|
25
|
+
attr_accessor :private_key_data
|
|
26
|
+
|
|
27
|
+
# Set to true if the SSL certificate is self-signed.
|
|
28
|
+
# @return [BOOLEAN]
|
|
29
|
+
attr_accessor :is_trust_verification_disabled
|
|
30
|
+
|
|
31
|
+
# A simple key-value pair without any defined schema.
|
|
32
|
+
# @return [Hash<String, String>]
|
|
33
|
+
attr_accessor :freeform_tags
|
|
34
|
+
|
|
35
|
+
# A key-value pair with a defined schema that restricts the values of tags. These predefined keys are scoped to namespaces.
|
|
36
|
+
# @return [Hash<String, Hash<String, Object>>]
|
|
37
|
+
attr_accessor :defined_tags
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
# rubocop:disable Style/SymbolLiteral
|
|
43
|
+
'compartment_id': :'compartmentId',
|
|
44
|
+
'display_name': :'displayName',
|
|
45
|
+
'certificate_data': :'certificateData',
|
|
46
|
+
'private_key_data': :'privateKeyData',
|
|
47
|
+
'is_trust_verification_disabled': :'isTrustVerificationDisabled',
|
|
48
|
+
'freeform_tags': :'freeformTags',
|
|
49
|
+
'defined_tags': :'definedTags'
|
|
50
|
+
# rubocop:enable Style/SymbolLiteral
|
|
51
|
+
}
|
|
52
|
+
end
|
|
53
|
+
|
|
54
|
+
# Attribute type mapping.
|
|
55
|
+
def self.swagger_types
|
|
56
|
+
{
|
|
57
|
+
# rubocop:disable Style/SymbolLiteral
|
|
58
|
+
'compartment_id': :'String',
|
|
59
|
+
'display_name': :'String',
|
|
60
|
+
'certificate_data': :'String',
|
|
61
|
+
'private_key_data': :'String',
|
|
62
|
+
'is_trust_verification_disabled': :'BOOLEAN',
|
|
63
|
+
'freeform_tags': :'Hash<String, String>',
|
|
64
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
|
65
|
+
# rubocop:enable Style/SymbolLiteral
|
|
66
|
+
}
|
|
67
|
+
end
|
|
68
|
+
|
|
69
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
70
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
# Initializes the object
|
|
74
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
75
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
|
76
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
77
|
+
# @option attributes [String] :certificate_data The value to assign to the {#certificate_data} property
|
|
78
|
+
# @option attributes [String] :private_key_data The value to assign to the {#private_key_data} property
|
|
79
|
+
# @option attributes [BOOLEAN] :is_trust_verification_disabled The value to assign to the {#is_trust_verification_disabled} property
|
|
80
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
|
81
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
|
82
|
+
def initialize(attributes = {})
|
|
83
|
+
return unless attributes.is_a?(Hash)
|
|
84
|
+
|
|
85
|
+
# convert string to symbol for hash key
|
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
87
|
+
|
|
88
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
|
89
|
+
|
|
90
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
|
91
|
+
|
|
92
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
|
93
|
+
|
|
94
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
|
95
|
+
|
|
96
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
|
97
|
+
|
|
98
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
|
99
|
+
|
|
100
|
+
self.certificate_data = attributes[:'certificateData'] if attributes[:'certificateData']
|
|
101
|
+
|
|
102
|
+
raise 'You cannot provide both :certificateData and :certificate_data' if attributes.key?(:'certificateData') && attributes.key?(:'certificate_data')
|
|
103
|
+
|
|
104
|
+
self.certificate_data = attributes[:'certificate_data'] if attributes[:'certificate_data']
|
|
105
|
+
|
|
106
|
+
self.private_key_data = attributes[:'privateKeyData'] if attributes[:'privateKeyData']
|
|
107
|
+
|
|
108
|
+
raise 'You cannot provide both :privateKeyData and :private_key_data' if attributes.key?(:'privateKeyData') && attributes.key?(:'private_key_data')
|
|
109
|
+
|
|
110
|
+
self.private_key_data = attributes[:'private_key_data'] if attributes[:'private_key_data']
|
|
111
|
+
|
|
112
|
+
self.is_trust_verification_disabled = attributes[:'isTrustVerificationDisabled'] unless attributes[:'isTrustVerificationDisabled'].nil?
|
|
113
|
+
self.is_trust_verification_disabled = false if is_trust_verification_disabled.nil? && !attributes.key?(:'isTrustVerificationDisabled') # rubocop:disable Style/StringLiterals
|
|
114
|
+
|
|
115
|
+
raise 'You cannot provide both :isTrustVerificationDisabled and :is_trust_verification_disabled' if attributes.key?(:'isTrustVerificationDisabled') && attributes.key?(:'is_trust_verification_disabled')
|
|
116
|
+
|
|
117
|
+
self.is_trust_verification_disabled = attributes[:'is_trust_verification_disabled'] unless attributes[:'is_trust_verification_disabled'].nil?
|
|
118
|
+
self.is_trust_verification_disabled = false if is_trust_verification_disabled.nil? && !attributes.key?(:'isTrustVerificationDisabled') && !attributes.key?(:'is_trust_verification_disabled') # rubocop:disable Style/StringLiterals
|
|
119
|
+
|
|
120
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
|
121
|
+
|
|
122
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
|
123
|
+
|
|
124
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
|
125
|
+
|
|
126
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
|
127
|
+
|
|
128
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
|
129
|
+
|
|
130
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
|
131
|
+
end
|
|
132
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
133
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
134
|
+
|
|
135
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
# Checks equality by comparing each attribute.
|
|
139
|
+
# @param [Object] other the other object to be compared
|
|
140
|
+
def ==(other)
|
|
141
|
+
return true if equal?(other)
|
|
142
|
+
|
|
143
|
+
self.class == other.class &&
|
|
144
|
+
compartment_id == other.compartment_id &&
|
|
145
|
+
display_name == other.display_name &&
|
|
146
|
+
certificate_data == other.certificate_data &&
|
|
147
|
+
private_key_data == other.private_key_data &&
|
|
148
|
+
is_trust_verification_disabled == other.is_trust_verification_disabled &&
|
|
149
|
+
freeform_tags == other.freeform_tags &&
|
|
150
|
+
defined_tags == other.defined_tags
|
|
151
|
+
end
|
|
152
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
153
|
+
|
|
154
|
+
# @see the `==` method
|
|
155
|
+
# @param [Object] other the other object to be compared
|
|
156
|
+
def eql?(other)
|
|
157
|
+
self == other
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
161
|
+
|
|
162
|
+
|
|
163
|
+
# Calculates hash code according to all attributes.
|
|
164
|
+
# @return [Fixnum] Hash code
|
|
165
|
+
def hash
|
|
166
|
+
[compartment_id, display_name, certificate_data, private_key_data, is_trust_verification_disabled, freeform_tags, defined_tags].hash
|
|
167
|
+
end
|
|
168
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
169
|
+
|
|
170
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
# Builds the object from hash
|
|
174
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
175
|
+
# @return [Object] Returns the model itself
|
|
176
|
+
def build_from_hash(attributes)
|
|
177
|
+
return nil unless attributes.is_a?(Hash)
|
|
178
|
+
|
|
179
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
180
|
+
if type =~ /^Array<(.*)>/i
|
|
181
|
+
# check to ensure the input is an array given that the the attribute
|
|
182
|
+
# is documented as an array but the input is not
|
|
183
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
184
|
+
public_method("#{key}=").call(
|
|
185
|
+
attributes[self.class.attribute_map[key]]
|
|
186
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
187
|
+
)
|
|
188
|
+
end
|
|
189
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
190
|
+
public_method("#{key}=").call(
|
|
191
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
195
|
+
end
|
|
196
|
+
|
|
197
|
+
self
|
|
198
|
+
end
|
|
199
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
200
|
+
|
|
201
|
+
# Returns the string representation of the object
|
|
202
|
+
# @return [String] String presentation of the object
|
|
203
|
+
def to_s
|
|
204
|
+
to_hash.to_s
|
|
205
|
+
end
|
|
206
|
+
|
|
207
|
+
# Returns the object in the form of hash
|
|
208
|
+
# @return [Hash] Returns the object in the form of hash
|
|
209
|
+
def to_hash
|
|
210
|
+
hash = {}
|
|
211
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
212
|
+
value = public_method(attr).call
|
|
213
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
214
|
+
|
|
215
|
+
hash[param] = _to_hash(value)
|
|
216
|
+
end
|
|
217
|
+
hash
|
|
218
|
+
end
|
|
219
|
+
|
|
220
|
+
private
|
|
221
|
+
|
|
222
|
+
# Outputs non-array value in the form of hash
|
|
223
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
224
|
+
# @param [Object] value Any valid value
|
|
225
|
+
# @return [Hash] Returns the value in the form of hash
|
|
226
|
+
def _to_hash(value)
|
|
227
|
+
if value.is_a?(Array)
|
|
228
|
+
value.compact.map { |v| _to_hash(v) }
|
|
229
|
+
elsif value.is_a?(Hash)
|
|
230
|
+
{}.tap do |hash|
|
|
231
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
232
|
+
end
|
|
233
|
+
elsif value.respond_to? :to_hash
|
|
234
|
+
value.to_hash
|
|
235
|
+
else
|
|
236
|
+
value
|
|
237
|
+
end
|
|
238
|
+
end
|
|
239
|
+
end
|
|
240
|
+
end
|
|
241
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|