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,170 @@
|
|
|
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
|
+
# An object returned in the event of a work request error.
|
|
9
|
+
class Waas::Models::WorkRequestError # rubocop:disable Metrics/LineLength
|
|
10
|
+
# A machine-usable code for the error that occurred.
|
|
11
|
+
# @return [String]
|
|
12
|
+
attr_accessor :code
|
|
13
|
+
|
|
14
|
+
# The error message.
|
|
15
|
+
# @return [String]
|
|
16
|
+
attr_accessor :message
|
|
17
|
+
|
|
18
|
+
# The date and time the work request error happened, expressed in RFC 3339 timestamp format.
|
|
19
|
+
# @return [DateTime]
|
|
20
|
+
attr_accessor :timestamp
|
|
21
|
+
|
|
22
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
23
|
+
def self.attribute_map
|
|
24
|
+
{
|
|
25
|
+
# rubocop:disable Style/SymbolLiteral
|
|
26
|
+
'code': :'code',
|
|
27
|
+
'message': :'message',
|
|
28
|
+
'timestamp': :'timestamp'
|
|
29
|
+
# rubocop:enable Style/SymbolLiteral
|
|
30
|
+
}
|
|
31
|
+
end
|
|
32
|
+
|
|
33
|
+
# Attribute type mapping.
|
|
34
|
+
def self.swagger_types
|
|
35
|
+
{
|
|
36
|
+
# rubocop:disable Style/SymbolLiteral
|
|
37
|
+
'code': :'String',
|
|
38
|
+
'message': :'String',
|
|
39
|
+
'timestamp': :'DateTime'
|
|
40
|
+
# rubocop:enable Style/SymbolLiteral
|
|
41
|
+
}
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
45
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
# Initializes the object
|
|
49
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
50
|
+
# @option attributes [String] :code The value to assign to the {#code} property
|
|
51
|
+
# @option attributes [String] :message The value to assign to the {#message} property
|
|
52
|
+
# @option attributes [DateTime] :timestamp The value to assign to the {#timestamp} property
|
|
53
|
+
def initialize(attributes = {})
|
|
54
|
+
return unless attributes.is_a?(Hash)
|
|
55
|
+
|
|
56
|
+
# convert string to symbol for hash key
|
|
57
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
58
|
+
|
|
59
|
+
self.code = attributes[:'code'] if attributes[:'code']
|
|
60
|
+
|
|
61
|
+
self.message = attributes[:'message'] if attributes[:'message']
|
|
62
|
+
|
|
63
|
+
self.timestamp = attributes[:'timestamp'] if attributes[:'timestamp']
|
|
64
|
+
end
|
|
65
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
66
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
67
|
+
|
|
68
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
69
|
+
|
|
70
|
+
|
|
71
|
+
# Checks equality by comparing each attribute.
|
|
72
|
+
# @param [Object] other the other object to be compared
|
|
73
|
+
def ==(other)
|
|
74
|
+
return true if equal?(other)
|
|
75
|
+
|
|
76
|
+
self.class == other.class &&
|
|
77
|
+
code == other.code &&
|
|
78
|
+
message == other.message &&
|
|
79
|
+
timestamp == other.timestamp
|
|
80
|
+
end
|
|
81
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
82
|
+
|
|
83
|
+
# @see the `==` method
|
|
84
|
+
# @param [Object] other the other object to be compared
|
|
85
|
+
def eql?(other)
|
|
86
|
+
self == other
|
|
87
|
+
end
|
|
88
|
+
|
|
89
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
90
|
+
|
|
91
|
+
|
|
92
|
+
# Calculates hash code according to all attributes.
|
|
93
|
+
# @return [Fixnum] Hash code
|
|
94
|
+
def hash
|
|
95
|
+
[code, message, timestamp].hash
|
|
96
|
+
end
|
|
97
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
98
|
+
|
|
99
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
# Builds the object from hash
|
|
103
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
104
|
+
# @return [Object] Returns the model itself
|
|
105
|
+
def build_from_hash(attributes)
|
|
106
|
+
return nil unless attributes.is_a?(Hash)
|
|
107
|
+
|
|
108
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
109
|
+
if type =~ /^Array<(.*)>/i
|
|
110
|
+
# check to ensure the input is an array given that the the attribute
|
|
111
|
+
# is documented as an array but the input is not
|
|
112
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
113
|
+
public_method("#{key}=").call(
|
|
114
|
+
attributes[self.class.attribute_map[key]]
|
|
115
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
116
|
+
)
|
|
117
|
+
end
|
|
118
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
119
|
+
public_method("#{key}=").call(
|
|
120
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
121
|
+
)
|
|
122
|
+
end
|
|
123
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
124
|
+
end
|
|
125
|
+
|
|
126
|
+
self
|
|
127
|
+
end
|
|
128
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
129
|
+
|
|
130
|
+
# Returns the string representation of the object
|
|
131
|
+
# @return [String] String presentation of the object
|
|
132
|
+
def to_s
|
|
133
|
+
to_hash.to_s
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# Returns the object in the form of hash
|
|
137
|
+
# @return [Hash] Returns the object in the form of hash
|
|
138
|
+
def to_hash
|
|
139
|
+
hash = {}
|
|
140
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
141
|
+
value = public_method(attr).call
|
|
142
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
143
|
+
|
|
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
|
+
end
|
|
169
|
+
end
|
|
170
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,159 @@
|
|
|
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
|
+
# A log message for a work request.
|
|
8
|
+
class Waas::Models::WorkRequestLogEntry # rubocop:disable Metrics/LineLength
|
|
9
|
+
# The log message.
|
|
10
|
+
# @return [String]
|
|
11
|
+
attr_accessor :message
|
|
12
|
+
|
|
13
|
+
# The date and time the work request log event happend, expressed in RFC 3339 timestamp format.
|
|
14
|
+
# @return [DateTime]
|
|
15
|
+
attr_accessor :timestamp
|
|
16
|
+
|
|
17
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
18
|
+
def self.attribute_map
|
|
19
|
+
{
|
|
20
|
+
# rubocop:disable Style/SymbolLiteral
|
|
21
|
+
'message': :'message',
|
|
22
|
+
'timestamp': :'timestamp'
|
|
23
|
+
# rubocop:enable Style/SymbolLiteral
|
|
24
|
+
}
|
|
25
|
+
end
|
|
26
|
+
|
|
27
|
+
# Attribute type mapping.
|
|
28
|
+
def self.swagger_types
|
|
29
|
+
{
|
|
30
|
+
# rubocop:disable Style/SymbolLiteral
|
|
31
|
+
'message': :'String',
|
|
32
|
+
'timestamp': :'DateTime'
|
|
33
|
+
# rubocop:enable Style/SymbolLiteral
|
|
34
|
+
}
|
|
35
|
+
end
|
|
36
|
+
|
|
37
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
38
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
39
|
+
|
|
40
|
+
|
|
41
|
+
# Initializes the object
|
|
42
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
43
|
+
# @option attributes [String] :message The value to assign to the {#message} property
|
|
44
|
+
# @option attributes [DateTime] :timestamp The value to assign to the {#timestamp} property
|
|
45
|
+
def initialize(attributes = {})
|
|
46
|
+
return unless attributes.is_a?(Hash)
|
|
47
|
+
|
|
48
|
+
# convert string to symbol for hash key
|
|
49
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
50
|
+
|
|
51
|
+
self.message = attributes[:'message'] if attributes[:'message']
|
|
52
|
+
|
|
53
|
+
self.timestamp = attributes[:'timestamp'] if attributes[:'timestamp']
|
|
54
|
+
end
|
|
55
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
56
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
57
|
+
|
|
58
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
59
|
+
|
|
60
|
+
|
|
61
|
+
# Checks equality by comparing each attribute.
|
|
62
|
+
# @param [Object] other the other object to be compared
|
|
63
|
+
def ==(other)
|
|
64
|
+
return true if equal?(other)
|
|
65
|
+
|
|
66
|
+
self.class == other.class &&
|
|
67
|
+
message == other.message &&
|
|
68
|
+
timestamp == other.timestamp
|
|
69
|
+
end
|
|
70
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
71
|
+
|
|
72
|
+
# @see the `==` method
|
|
73
|
+
# @param [Object] other the other object to be compared
|
|
74
|
+
def eql?(other)
|
|
75
|
+
self == other
|
|
76
|
+
end
|
|
77
|
+
|
|
78
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
79
|
+
|
|
80
|
+
|
|
81
|
+
# Calculates hash code according to all attributes.
|
|
82
|
+
# @return [Fixnum] Hash code
|
|
83
|
+
def hash
|
|
84
|
+
[message, timestamp].hash
|
|
85
|
+
end
|
|
86
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
87
|
+
|
|
88
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
# Builds the object from hash
|
|
92
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
93
|
+
# @return [Object] Returns the model itself
|
|
94
|
+
def build_from_hash(attributes)
|
|
95
|
+
return nil unless attributes.is_a?(Hash)
|
|
96
|
+
|
|
97
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
98
|
+
if type =~ /^Array<(.*)>/i
|
|
99
|
+
# check to ensure the input is an array given that the the attribute
|
|
100
|
+
# is documented as an array but the input is not
|
|
101
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
102
|
+
public_method("#{key}=").call(
|
|
103
|
+
attributes[self.class.attribute_map[key]]
|
|
104
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
105
|
+
)
|
|
106
|
+
end
|
|
107
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
108
|
+
public_method("#{key}=").call(
|
|
109
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
110
|
+
)
|
|
111
|
+
end
|
|
112
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
113
|
+
end
|
|
114
|
+
|
|
115
|
+
self
|
|
116
|
+
end
|
|
117
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
118
|
+
|
|
119
|
+
# Returns the string representation of the object
|
|
120
|
+
# @return [String] String presentation of the object
|
|
121
|
+
def to_s
|
|
122
|
+
to_hash.to_s
|
|
123
|
+
end
|
|
124
|
+
|
|
125
|
+
# Returns the object in the form of hash
|
|
126
|
+
# @return [Hash] Returns the object in the form of hash
|
|
127
|
+
def to_hash
|
|
128
|
+
hash = {}
|
|
129
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
130
|
+
value = public_method(attr).call
|
|
131
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
132
|
+
|
|
133
|
+
hash[param] = _to_hash(value)
|
|
134
|
+
end
|
|
135
|
+
hash
|
|
136
|
+
end
|
|
137
|
+
|
|
138
|
+
private
|
|
139
|
+
|
|
140
|
+
# Outputs non-array value in the form of hash
|
|
141
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
142
|
+
# @param [Object] value Any valid value
|
|
143
|
+
# @return [Hash] Returns the value in the form of hash
|
|
144
|
+
def _to_hash(value)
|
|
145
|
+
if value.is_a?(Array)
|
|
146
|
+
value.compact.map { |v| _to_hash(v) }
|
|
147
|
+
elsif value.is_a?(Hash)
|
|
148
|
+
{}.tap do |hash|
|
|
149
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
150
|
+
end
|
|
151
|
+
elsif value.respond_to? :to_hash
|
|
152
|
+
value.to_hash
|
|
153
|
+
else
|
|
154
|
+
value
|
|
155
|
+
end
|
|
156
|
+
end
|
|
157
|
+
end
|
|
158
|
+
end
|
|
159
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
|
2
|
+
|
|
3
|
+
module OCI
|
|
4
|
+
module Waas::Models
|
|
5
|
+
WORK_REQUEST_OPERATION_TYPES_ENUM = [
|
|
6
|
+
WORK_REQUEST_OPERATION_TYPES_CREATE_WAAS_POLICY = 'CREATE_WAAS_POLICY'.freeze,
|
|
7
|
+
WORK_REQUEST_OPERATION_TYPES_UPDATE_WAAS_POLICY = 'UPDATE_WAAS_POLICY'.freeze,
|
|
8
|
+
WORK_REQUEST_OPERATION_TYPES_DELETE_WAAS_POLICY = 'DELETE_WAAS_POLICY'.freeze,
|
|
9
|
+
WORK_REQUEST_OPERATION_TYPES_PURGE_WAAS_POLICY = 'PURGE_WAAS_POLICY'.freeze
|
|
10
|
+
].freeze
|
|
11
|
+
end
|
|
12
|
+
end
|
|
@@ -0,0 +1,217 @@
|
|
|
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
|
+
# The resource on which the work request is operating.
|
|
9
|
+
class Waas::Models::WorkRequestResource # rubocop:disable Metrics/LineLength
|
|
10
|
+
ACTION_TYPE_ENUM = [
|
|
11
|
+
ACTION_TYPE_IN_PROGRESS = 'IN_PROGRESS'.freeze,
|
|
12
|
+
ACTION_TYPE_CREATED = 'CREATED'.freeze,
|
|
13
|
+
ACTION_TYPE_UPDATED = 'UPDATED'.freeze,
|
|
14
|
+
ACTION_TYPE_DELETED = 'DELETED'.freeze,
|
|
15
|
+
ACTION_TYPE_RELATED = 'RELATED'.freeze,
|
|
16
|
+
ACTION_TYPE_PURGED = 'PURGED'.freeze,
|
|
17
|
+
ACTION_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
18
|
+
].freeze
|
|
19
|
+
|
|
20
|
+
# How the work request affects the resource.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_reader :action_type
|
|
23
|
+
|
|
24
|
+
# The resource type the work request affects.
|
|
25
|
+
# @return [String]
|
|
26
|
+
attr_accessor :entity_type
|
|
27
|
+
|
|
28
|
+
# The [OCID](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/identifiers.htm) of the resource that the work request affects.
|
|
29
|
+
# @return [String]
|
|
30
|
+
attr_accessor :identifier
|
|
31
|
+
|
|
32
|
+
# The URI path used while performing a `GET` to access the resource metadata.
|
|
33
|
+
# @return [String]
|
|
34
|
+
attr_accessor :entity_uri
|
|
35
|
+
|
|
36
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
37
|
+
def self.attribute_map
|
|
38
|
+
{
|
|
39
|
+
# rubocop:disable Style/SymbolLiteral
|
|
40
|
+
'action_type': :'actionType',
|
|
41
|
+
'entity_type': :'entityType',
|
|
42
|
+
'identifier': :'identifier',
|
|
43
|
+
'entity_uri': :'entityUri'
|
|
44
|
+
# rubocop:enable Style/SymbolLiteral
|
|
45
|
+
}
|
|
46
|
+
end
|
|
47
|
+
|
|
48
|
+
# Attribute type mapping.
|
|
49
|
+
def self.swagger_types
|
|
50
|
+
{
|
|
51
|
+
# rubocop:disable Style/SymbolLiteral
|
|
52
|
+
'action_type': :'String',
|
|
53
|
+
'entity_type': :'String',
|
|
54
|
+
'identifier': :'String',
|
|
55
|
+
'entity_uri': :'String'
|
|
56
|
+
# rubocop:enable Style/SymbolLiteral
|
|
57
|
+
}
|
|
58
|
+
end
|
|
59
|
+
|
|
60
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
61
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
62
|
+
|
|
63
|
+
|
|
64
|
+
# Initializes the object
|
|
65
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
66
|
+
# @option attributes [String] :action_type The value to assign to the {#action_type} property
|
|
67
|
+
# @option attributes [String] :entity_type The value to assign to the {#entity_type} property
|
|
68
|
+
# @option attributes [String] :identifier The value to assign to the {#identifier} property
|
|
69
|
+
# @option attributes [String] :entity_uri The value to assign to the {#entity_uri} property
|
|
70
|
+
def initialize(attributes = {})
|
|
71
|
+
return unless attributes.is_a?(Hash)
|
|
72
|
+
|
|
73
|
+
# convert string to symbol for hash key
|
|
74
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
75
|
+
|
|
76
|
+
self.action_type = attributes[:'actionType'] if attributes[:'actionType']
|
|
77
|
+
|
|
78
|
+
raise 'You cannot provide both :actionType and :action_type' if attributes.key?(:'actionType') && attributes.key?(:'action_type')
|
|
79
|
+
|
|
80
|
+
self.action_type = attributes[:'action_type'] if attributes[:'action_type']
|
|
81
|
+
|
|
82
|
+
self.entity_type = attributes[:'entityType'] if attributes[:'entityType']
|
|
83
|
+
|
|
84
|
+
raise 'You cannot provide both :entityType and :entity_type' if attributes.key?(:'entityType') && attributes.key?(:'entity_type')
|
|
85
|
+
|
|
86
|
+
self.entity_type = attributes[:'entity_type'] if attributes[:'entity_type']
|
|
87
|
+
|
|
88
|
+
self.identifier = attributes[:'identifier'] if attributes[:'identifier']
|
|
89
|
+
|
|
90
|
+
self.entity_uri = attributes[:'entityUri'] if attributes[:'entityUri']
|
|
91
|
+
|
|
92
|
+
raise 'You cannot provide both :entityUri and :entity_uri' if attributes.key?(:'entityUri') && attributes.key?(:'entity_uri')
|
|
93
|
+
|
|
94
|
+
self.entity_uri = attributes[:'entity_uri'] if attributes[:'entity_uri']
|
|
95
|
+
end
|
|
96
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
97
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
98
|
+
|
|
99
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
100
|
+
# @param [Object] action_type Object to be assigned
|
|
101
|
+
def action_type=(action_type)
|
|
102
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
103
|
+
if action_type && !ACTION_TYPE_ENUM.include?(action_type)
|
|
104
|
+
# rubocop: disable Metrics/LineLength
|
|
105
|
+
OCI.logger.debug("Unknown value for 'action_type' [" + action_type + "]. Mapping to 'ACTION_TYPE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
106
|
+
# rubocop: enable Metrics/LineLength
|
|
107
|
+
@action_type = ACTION_TYPE_UNKNOWN_ENUM_VALUE
|
|
108
|
+
else
|
|
109
|
+
@action_type = action_type
|
|
110
|
+
end
|
|
111
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
112
|
+
end
|
|
113
|
+
|
|
114
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
115
|
+
|
|
116
|
+
|
|
117
|
+
# Checks equality by comparing each attribute.
|
|
118
|
+
# @param [Object] other the other object to be compared
|
|
119
|
+
def ==(other)
|
|
120
|
+
return true if equal?(other)
|
|
121
|
+
|
|
122
|
+
self.class == other.class &&
|
|
123
|
+
action_type == other.action_type &&
|
|
124
|
+
entity_type == other.entity_type &&
|
|
125
|
+
identifier == other.identifier &&
|
|
126
|
+
entity_uri == other.entity_uri
|
|
127
|
+
end
|
|
128
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
|
129
|
+
|
|
130
|
+
# @see the `==` method
|
|
131
|
+
# @param [Object] other the other object to be compared
|
|
132
|
+
def eql?(other)
|
|
133
|
+
self == other
|
|
134
|
+
end
|
|
135
|
+
|
|
136
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
137
|
+
|
|
138
|
+
|
|
139
|
+
# Calculates hash code according to all attributes.
|
|
140
|
+
# @return [Fixnum] Hash code
|
|
141
|
+
def hash
|
|
142
|
+
[action_type, entity_type, identifier, entity_uri].hash
|
|
143
|
+
end
|
|
144
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
|
145
|
+
|
|
146
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
147
|
+
|
|
148
|
+
|
|
149
|
+
# Builds the object from hash
|
|
150
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
151
|
+
# @return [Object] Returns the model itself
|
|
152
|
+
def build_from_hash(attributes)
|
|
153
|
+
return nil unless attributes.is_a?(Hash)
|
|
154
|
+
|
|
155
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
156
|
+
if type =~ /^Array<(.*)>/i
|
|
157
|
+
# check to ensure the input is an array given that the the attribute
|
|
158
|
+
# is documented as an array but the input is not
|
|
159
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
160
|
+
public_method("#{key}=").call(
|
|
161
|
+
attributes[self.class.attribute_map[key]]
|
|
162
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
163
|
+
)
|
|
164
|
+
end
|
|
165
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
166
|
+
public_method("#{key}=").call(
|
|
167
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
168
|
+
)
|
|
169
|
+
end
|
|
170
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
self
|
|
174
|
+
end
|
|
175
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
176
|
+
|
|
177
|
+
# Returns the string representation of the object
|
|
178
|
+
# @return [String] String presentation of the object
|
|
179
|
+
def to_s
|
|
180
|
+
to_hash.to_s
|
|
181
|
+
end
|
|
182
|
+
|
|
183
|
+
# Returns the object in the form of hash
|
|
184
|
+
# @return [Hash] Returns the object in the form of hash
|
|
185
|
+
def to_hash
|
|
186
|
+
hash = {}
|
|
187
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
188
|
+
value = public_method(attr).call
|
|
189
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
190
|
+
|
|
191
|
+
hash[param] = _to_hash(value)
|
|
192
|
+
end
|
|
193
|
+
hash
|
|
194
|
+
end
|
|
195
|
+
|
|
196
|
+
private
|
|
197
|
+
|
|
198
|
+
# Outputs non-array value in the form of hash
|
|
199
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
200
|
+
# @param [Object] value Any valid value
|
|
201
|
+
# @return [Hash] Returns the value in the form of hash
|
|
202
|
+
def _to_hash(value)
|
|
203
|
+
if value.is_a?(Array)
|
|
204
|
+
value.compact.map { |v| _to_hash(v) }
|
|
205
|
+
elsif value.is_a?(Hash)
|
|
206
|
+
{}.tap do |hash|
|
|
207
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
208
|
+
end
|
|
209
|
+
elsif value.respond_to? :to_hash
|
|
210
|
+
value.to_hash
|
|
211
|
+
else
|
|
212
|
+
value
|
|
213
|
+
end
|
|
214
|
+
end
|
|
215
|
+
end
|
|
216
|
+
end
|
|
217
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|