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.
Files changed (123) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +3 -1
  3. data/lib/oci.rb +2 -0
  4. data/lib/oci/database/database.rb +1 -0
  5. data/lib/oci/database/models/database.rb +18 -4
  6. data/lib/oci/database/models/database_connection_strings.rb +182 -0
  7. data/lib/oci/database/models/database_summary.rb +18 -4
  8. data/lib/oci/dns/dns.rb +23 -0
  9. data/lib/oci/dns/dns_client.rb +802 -75
  10. data/lib/oci/dns/dns_client_composite_operations.rb +238 -0
  11. data/lib/oci/dns/models/create_steering_policy_attachment_details.rb +205 -0
  12. data/lib/oci/dns/models/create_steering_policy_details.rb +333 -0
  13. data/lib/oci/dns/models/steering_policy.rb +418 -0
  14. data/lib/oci/dns/models/steering_policy_answer.rb +205 -0
  15. data/lib/oci/dns/models/steering_policy_attachment.rb +308 -0
  16. data/lib/oci/dns/models/steering_policy_attachment_summary.rb +304 -0
  17. data/lib/oci/dns/models/steering_policy_filter_answer_data.rb +168 -0
  18. data/lib/oci/dns/models/steering_policy_filter_rule.rb +178 -0
  19. data/lib/oci/dns/models/steering_policy_filter_rule_case.rb +165 -0
  20. data/lib/oci/dns/models/steering_policy_health_rule.rb +160 -0
  21. data/lib/oci/dns/models/steering_policy_health_rule_case.rb +152 -0
  22. data/lib/oci/dns/models/steering_policy_limit_rule.rb +179 -0
  23. data/lib/oci/dns/models/steering_policy_limit_rule_case.rb +162 -0
  24. data/lib/oci/dns/models/steering_policy_priority_answer_data.rb +161 -0
  25. data/lib/oci/dns/models/steering_policy_priority_rule.rb +178 -0
  26. data/lib/oci/dns/models/steering_policy_priority_rule_case.rb +165 -0
  27. data/lib/oci/dns/models/steering_policy_rule.rb +237 -0
  28. data/lib/oci/dns/models/steering_policy_summary.rb +391 -0
  29. data/lib/oci/dns/models/steering_policy_weighted_answer_data.rb +161 -0
  30. data/lib/oci/dns/models/steering_policy_weighted_rule.rb +178 -0
  31. data/lib/oci/dns/models/steering_policy_weighted_rule_case.rb +165 -0
  32. data/lib/oci/dns/models/update_steering_policy_attachment_details.rb +156 -0
  33. data/lib/oci/dns/models/update_steering_policy_details.rb +319 -0
  34. data/lib/oci/email/email.rb +1 -0
  35. data/lib/oci/email/email_client.rb +87 -16
  36. data/lib/oci/email/email_client_composite_operations.rb +40 -0
  37. data/lib/oci/email/models/create_sender_details.rb +40 -6
  38. data/lib/oci/email/models/create_suppression_details.rb +2 -2
  39. data/lib/oci/email/models/sender.rb +53 -5
  40. data/lib/oci/email/models/sender_summary.rb +38 -4
  41. data/lib/oci/email/models/suppression.rb +20 -3
  42. data/lib/oci/email/models/update_sender_details.rb +174 -0
  43. data/lib/oci/healthchecks/health_checks_client.rb +1137 -0
  44. data/lib/oci/healthchecks/health_checks_client_composite_operations.rb +24 -0
  45. data/lib/oci/healthchecks/healthchecks.rb +41 -0
  46. data/lib/oci/healthchecks/models/connection.rb +159 -0
  47. data/lib/oci/healthchecks/models/create_http_monitor_details.rb +359 -0
  48. data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +278 -0
  49. data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +229 -0
  50. data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +310 -0
  51. data/lib/oci/healthchecks/models/dns.rb +165 -0
  52. data/lib/oci/healthchecks/models/geolocation.rb +239 -0
  53. data/lib/oci/healthchecks/models/health_checks_vantage_point_summary.rb +211 -0
  54. data/lib/oci/healthchecks/models/http_monitor.rb +395 -0
  55. data/lib/oci/healthchecks/models/http_monitor_summary.rb +290 -0
  56. data/lib/oci/healthchecks/models/http_probe.rb +314 -0
  57. data/lib/oci/healthchecks/models/http_probe_method.rb +10 -0
  58. data/lib/oci/healthchecks/models/http_probe_protocol.rb +10 -0
  59. data/lib/oci/healthchecks/models/http_probe_result_summary.rb +542 -0
  60. data/lib/oci/healthchecks/models/ping_monitor.rb +340 -0
  61. data/lib/oci/healthchecks/models/ping_monitor_summary.rb +290 -0
  62. data/lib/oci/healthchecks/models/ping_probe.rb +259 -0
  63. data/lib/oci/healthchecks/models/ping_probe_protocol.rb +10 -0
  64. data/lib/oci/healthchecks/models/ping_probe_result_summary.rb +418 -0
  65. data/lib/oci/healthchecks/models/routing.rb +192 -0
  66. data/lib/oci/healthchecks/models/tcp_connection.rb +189 -0
  67. data/lib/oci/healthchecks/models/update_http_monitor_details.rb +339 -0
  68. data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +292 -0
  69. data/lib/oci/healthchecks/util.rb +2 -0
  70. data/lib/oci/regions.rb +3 -1
  71. data/lib/oci/version.rb +1 -1
  72. data/lib/oci/waas/models/access_rule.rb +283 -0
  73. data/lib/oci/waas/models/access_rule_criteria.rb +206 -0
  74. data/lib/oci/waas/models/address_rate_limiting.rb +195 -0
  75. data/lib/oci/waas/models/block_challenge_settings.rb +288 -0
  76. data/lib/oci/waas/models/captcha.rb +231 -0
  77. data/lib/oci/waas/models/certificate.rb +383 -0
  78. data/lib/oci/waas/models/certificate_extensions.rb +170 -0
  79. data/lib/oci/waas/models/certificate_public_key_info.rb +170 -0
  80. data/lib/oci/waas/models/certificate_subject_name.rb +218 -0
  81. data/lib/oci/waas/models/certificate_summary.rb +274 -0
  82. data/lib/oci/waas/models/create_certificate_details.rb +241 -0
  83. data/lib/oci/waas/models/create_waas_policy_details.rb +257 -0
  84. data/lib/oci/waas/models/device_fingerprint_challenge.rb +268 -0
  85. data/lib/oci/waas/models/edge_subnet.rb +173 -0
  86. data/lib/oci/waas/models/good_bot.rb +183 -0
  87. data/lib/oci/waas/models/header.rb +159 -0
  88. data/lib/oci/waas/models/human_interaction_challenge.rb +282 -0
  89. data/lib/oci/waas/models/js_challenge.rb +240 -0
  90. data/lib/oci/waas/models/lifecycle_states.rb +14 -0
  91. data/lib/oci/waas/models/origin.rb +191 -0
  92. data/lib/oci/waas/models/policy_config.rb +181 -0
  93. data/lib/oci/waas/models/protection_rule.rb +237 -0
  94. data/lib/oci/waas/models/protection_rule_action.rb +185 -0
  95. data/lib/oci/waas/models/protection_rule_exclusion.rb +182 -0
  96. data/lib/oci/waas/models/protection_settings.rb +404 -0
  97. data/lib/oci/waas/models/recommendation.rb +210 -0
  98. data/lib/oci/waas/models/threat_feed.rb +202 -0
  99. data/lib/oci/waas/models/threat_feed_action.rb +175 -0
  100. data/lib/oci/waas/models/update_certificate_details.rb +183 -0
  101. data/lib/oci/waas/models/update_waas_policy_details.rb +233 -0
  102. data/lib/oci/waas/models/waas_policy.rb +331 -0
  103. data/lib/oci/waas/models/waas_policy_summary.rb +271 -0
  104. data/lib/oci/waas/models/waf_blocked_request.rb +219 -0
  105. data/lib/oci/waas/models/waf_config.rb +295 -0
  106. data/lib/oci/waas/models/waf_config_details.rb +253 -0
  107. data/lib/oci/waas/models/waf_log.rb +510 -0
  108. data/lib/oci/waas/models/waf_meter_datum.rb +279 -0
  109. data/lib/oci/waas/models/waf_request.rb +177 -0
  110. data/lib/oci/waas/models/waf_traffic_datum.rb +223 -0
  111. data/lib/oci/waas/models/whitelist.rb +159 -0
  112. data/lib/oci/waas/models/work_request.rb +322 -0
  113. data/lib/oci/waas/models/work_request_error.rb +170 -0
  114. data/lib/oci/waas/models/work_request_log_entry.rb +159 -0
  115. data/lib/oci/waas/models/work_request_operation_types.rb +12 -0
  116. data/lib/oci/waas/models/work_request_resource.rb +217 -0
  117. data/lib/oci/waas/models/work_request_status_values.rb +14 -0
  118. data/lib/oci/waas/models/work_request_summary.rb +302 -0
  119. data/lib/oci/waas/util.rb +2 -0
  120. data/lib/oci/waas/waas.rb +66 -0
  121. data/lib/oci/waas/waas_client.rb +3044 -0
  122. data/lib/oci/waas/waas_client_composite_operations.rb +990 -0
  123. metadata +105 -2
@@ -0,0 +1,24 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ # rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
4
+ module OCI
5
+ # This class provides a wrapper around {OCI::Healthchecks::HealthChecksClient} and offers convenience methods
6
+ # for operations that would otherwise need to be chained together. For example, instead of performing an action
7
+ # on a resource (e.g. launching an instance, creating a load balancer) and then using a waiter to wait for the resource
8
+ # to enter a given state, you can call a single method in this class to accomplish the same functionality
9
+ class Healthchecks::HealthChecksClientCompositeOperations
10
+ # The {OCI::Healthchecks::HealthChecksClient} used to communicate with the service_client
11
+ #
12
+ # @return [OCI::Healthchecks::HealthChecksClient]
13
+ attr_reader :service_client
14
+
15
+ # Initializes a new HealthChecksClientCompositeOperations
16
+ #
17
+ # @param [OCI::Healthchecks::HealthChecksClient] service_client The client used to communicate with the service.
18
+ # Defaults to a new service client created via {OCI::Healthchecks::HealthChecksClient#initialize} with no arguments
19
+ def initialize(service_client = OCI::Healthchecks::HealthChecksClient.new)
20
+ @service_client = service_client
21
+ end
22
+ end
23
+ end
24
+ # rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
@@ -0,0 +1,41 @@
1
+ # Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
2
+
3
+ module OCI
4
+ module Healthchecks
5
+ # Module containing models for requests made to, and responses received from,
6
+ # OCI Healthchecks services
7
+ module Models
8
+ end
9
+ end
10
+ end
11
+
12
+ # Require models
13
+ require 'oci/healthchecks/models/connection'
14
+ require 'oci/healthchecks/models/create_http_monitor_details'
15
+ require 'oci/healthchecks/models/create_on_demand_http_probe_details'
16
+ require 'oci/healthchecks/models/create_on_demand_ping_probe_details'
17
+ require 'oci/healthchecks/models/create_ping_monitor_details'
18
+ require 'oci/healthchecks/models/dns'
19
+ require 'oci/healthchecks/models/geolocation'
20
+ require 'oci/healthchecks/models/health_checks_vantage_point_summary'
21
+ require 'oci/healthchecks/models/http_monitor'
22
+ require 'oci/healthchecks/models/http_monitor_summary'
23
+ require 'oci/healthchecks/models/http_probe'
24
+ require 'oci/healthchecks/models/http_probe_method'
25
+ require 'oci/healthchecks/models/http_probe_protocol'
26
+ require 'oci/healthchecks/models/http_probe_result_summary'
27
+ require 'oci/healthchecks/models/ping_monitor'
28
+ require 'oci/healthchecks/models/ping_monitor_summary'
29
+ require 'oci/healthchecks/models/ping_probe'
30
+ require 'oci/healthchecks/models/ping_probe_protocol'
31
+ require 'oci/healthchecks/models/ping_probe_result_summary'
32
+ require 'oci/healthchecks/models/routing'
33
+ require 'oci/healthchecks/models/tcp_connection'
34
+ require 'oci/healthchecks/models/update_http_monitor_details'
35
+ require 'oci/healthchecks/models/update_ping_monitor_details'
36
+
37
+ # Require generated clients
38
+ require 'oci/healthchecks/health_checks_client'
39
+
40
+ # Require service utilities
41
+ require 'oci/healthchecks/util'
@@ -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
+ # The network connection results.
8
+ class Healthchecks::Models::Connection # rubocop:disable Metrics/LineLength
9
+ # The connection IP address.
10
+ # @return [String]
11
+ attr_accessor :address
12
+
13
+ # The port.
14
+ # @return [Integer]
15
+ attr_accessor :port
16
+
17
+ # Attribute mapping from ruby-style variable name to JSON key.
18
+ def self.attribute_map
19
+ {
20
+ # rubocop:disable Style/SymbolLiteral
21
+ 'address': :'address',
22
+ 'port': :'port'
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
+ 'address': :'String',
32
+ 'port': :'Integer'
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] :address The value to assign to the {#address} property
44
+ # @option attributes [Integer] :port The value to assign to the {#port} 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.address = attributes[:'address'] if attributes[:'address']
52
+
53
+ self.port = attributes[:'port'] if attributes[:'port']
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
+ address == other.address &&
68
+ port == other.port
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
+ [address, port].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,359 @@
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 request body used to create an HTTP monitor.
8
+ class Healthchecks::Models::CreateHttpMonitorDetails # rubocop:disable Metrics/LineLength
9
+ PROTOCOL_ENUM = [
10
+ PROTOCOL_HTTP = 'HTTP'.freeze,
11
+ PROTOCOL_HTTPS = 'HTTPS'.freeze
12
+ ].freeze
13
+
14
+ METHOD_ENUM = [
15
+ METHOD_GET = 'GET'.freeze,
16
+ METHOD_HEAD = 'HEAD'.freeze
17
+ ].freeze
18
+
19
+ # **[Required]** The OCID of the compartment.
20
+ # @return [String]
21
+ attr_accessor :compartment_id
22
+
23
+ # This attribute is required.
24
+ # @return [Array<String>]
25
+ attr_accessor :targets
26
+
27
+ # @return [Array<String>]
28
+ attr_accessor :vantage_point_names
29
+
30
+ # The port on which to probe endpoints. If unspecified, probes will use the
31
+ # default port of their protocol.
32
+ #
33
+ # @return [Integer]
34
+ attr_accessor :port
35
+
36
+ # The probe timeout in seconds. Valid values: 10, 20, 30, and 60.
37
+ # The probe timeout must be less than or equal to `intervalInSeconds` for monitors.
38
+ #
39
+ # @return [Integer]
40
+ attr_accessor :timeout_in_seconds
41
+
42
+ # This attribute is required.
43
+ # @return [String]
44
+ attr_reader :protocol
45
+
46
+ # @return [String]
47
+ attr_reader :method
48
+
49
+ # The optional URL path to probe, including query parameters.
50
+ # @return [String]
51
+ attr_accessor :path
52
+
53
+ # A dictionary of HTTP request headers.
54
+ #
55
+ # *Note:* Monitors and probes do not support the use of the `Authorization` HTTP header.
56
+ #
57
+ # @return [Hash<String, String>]
58
+ attr_accessor :headers
59
+
60
+ # **[Required]** A user-friendly and mutable name suitable for display in a user interface.
61
+ # @return [String]
62
+ attr_accessor :display_name
63
+
64
+ # **[Required]** The monitor interval in seconds. Valid values: 10, 30, and 60.
65
+ #
66
+ # @return [Integer]
67
+ attr_accessor :interval_in_seconds
68
+
69
+ # Enables or disables the monitor. Set to 'true' to launch monitoring.
70
+ #
71
+ # @return [BOOLEAN]
72
+ attr_accessor :is_enabled
73
+
74
+ # Free-form tags for this resource. Each tag is a simple key-value pair with no
75
+ # predefined name, type, or namespace. For more information,
76
+ # see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
77
+ # Example: `{\"Department\": \"Finance\"}`
78
+ #
79
+ # @return [Hash<String, String>]
80
+ attr_accessor :freeform_tags
81
+
82
+ # Defined tags for this resource. Each key is predefined and scoped to a namespace.
83
+ # For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
84
+ # Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
85
+ #
86
+ # @return [Hash<String, Hash<String, Object>>]
87
+ attr_accessor :defined_tags
88
+
89
+ # Attribute mapping from ruby-style variable name to JSON key.
90
+ def self.attribute_map
91
+ {
92
+ # rubocop:disable Style/SymbolLiteral
93
+ 'compartment_id': :'compartmentId',
94
+ 'targets': :'targets',
95
+ 'vantage_point_names': :'vantagePointNames',
96
+ 'port': :'port',
97
+ 'timeout_in_seconds': :'timeoutInSeconds',
98
+ 'protocol': :'protocol',
99
+ 'method': :'method',
100
+ 'path': :'path',
101
+ 'headers': :'headers',
102
+ 'display_name': :'displayName',
103
+ 'interval_in_seconds': :'intervalInSeconds',
104
+ 'is_enabled': :'isEnabled',
105
+ 'freeform_tags': :'freeformTags',
106
+ 'defined_tags': :'definedTags'
107
+ # rubocop:enable Style/SymbolLiteral
108
+ }
109
+ end
110
+
111
+ # Attribute type mapping.
112
+ def self.swagger_types
113
+ {
114
+ # rubocop:disable Style/SymbolLiteral
115
+ 'compartment_id': :'String',
116
+ 'targets': :'Array<String>',
117
+ 'vantage_point_names': :'Array<String>',
118
+ 'port': :'Integer',
119
+ 'timeout_in_seconds': :'Integer',
120
+ 'protocol': :'String',
121
+ 'method': :'String',
122
+ 'path': :'String',
123
+ 'headers': :'Hash<String, String>',
124
+ 'display_name': :'String',
125
+ 'interval_in_seconds': :'Integer',
126
+ 'is_enabled': :'BOOLEAN',
127
+ 'freeform_tags': :'Hash<String, String>',
128
+ 'defined_tags': :'Hash<String, Hash<String, Object>>'
129
+ # rubocop:enable Style/SymbolLiteral
130
+ }
131
+ end
132
+
133
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
134
+ # rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
135
+
136
+
137
+ # Initializes the object
138
+ # @param [Hash] attributes Model attributes in the form of hash
139
+ # @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
140
+ # @option attributes [Array<String>] :targets The value to assign to the {#targets} property
141
+ # @option attributes [Array<String>] :vantage_point_names The value to assign to the {#vantage_point_names} property
142
+ # @option attributes [Integer] :port The value to assign to the {#port} property
143
+ # @option attributes [Integer] :timeout_in_seconds The value to assign to the {#timeout_in_seconds} property
144
+ # @option attributes [String] :protocol The value to assign to the {#protocol} property
145
+ # @option attributes [String] :method The value to assign to the {#method} property
146
+ # @option attributes [String] :path The value to assign to the {#path} property
147
+ # @option attributes [Hash<String, String>] :headers The value to assign to the {#headers} property
148
+ # @option attributes [String] :display_name The value to assign to the {#display_name} property
149
+ # @option attributes [Integer] :interval_in_seconds The value to assign to the {#interval_in_seconds} property
150
+ # @option attributes [BOOLEAN] :is_enabled The value to assign to the {#is_enabled} property
151
+ # @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
152
+ # @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
153
+ def initialize(attributes = {})
154
+ return unless attributes.is_a?(Hash)
155
+
156
+ # convert string to symbol for hash key
157
+ attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
158
+
159
+ self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
160
+
161
+ raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
162
+
163
+ self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
164
+
165
+ self.targets = attributes[:'targets'] if attributes[:'targets']
166
+
167
+ self.vantage_point_names = attributes[:'vantagePointNames'] if attributes[:'vantagePointNames']
168
+
169
+ raise 'You cannot provide both :vantagePointNames and :vantage_point_names' if attributes.key?(:'vantagePointNames') && attributes.key?(:'vantage_point_names')
170
+
171
+ self.vantage_point_names = attributes[:'vantage_point_names'] if attributes[:'vantage_point_names']
172
+
173
+ self.port = attributes[:'port'] if attributes[:'port']
174
+
175
+ self.timeout_in_seconds = attributes[:'timeoutInSeconds'] if attributes[:'timeoutInSeconds']
176
+
177
+ raise 'You cannot provide both :timeoutInSeconds and :timeout_in_seconds' if attributes.key?(:'timeoutInSeconds') && attributes.key?(:'timeout_in_seconds')
178
+
179
+ self.timeout_in_seconds = attributes[:'timeout_in_seconds'] if attributes[:'timeout_in_seconds']
180
+
181
+ self.protocol = attributes[:'protocol'] if attributes[:'protocol']
182
+
183
+ self.method = attributes[:'method'] if attributes[:'method']
184
+ self.method = "HEAD" if method.nil? && !attributes.key?(:'method') # rubocop:disable Style/StringLiterals
185
+
186
+ self.path = attributes[:'path'] if attributes[:'path']
187
+ self.path = "/" if path.nil? && !attributes.key?(:'path') # rubocop:disable Style/StringLiterals
188
+
189
+ self.headers = attributes[:'headers'] if attributes[:'headers']
190
+
191
+ self.display_name = attributes[:'displayName'] if attributes[:'displayName']
192
+
193
+ raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
194
+
195
+ self.display_name = attributes[:'display_name'] if attributes[:'display_name']
196
+
197
+ self.interval_in_seconds = attributes[:'intervalInSeconds'] if attributes[:'intervalInSeconds']
198
+
199
+ raise 'You cannot provide both :intervalInSeconds and :interval_in_seconds' if attributes.key?(:'intervalInSeconds') && attributes.key?(:'interval_in_seconds')
200
+
201
+ self.interval_in_seconds = attributes[:'interval_in_seconds'] if attributes[:'interval_in_seconds']
202
+
203
+ self.is_enabled = attributes[:'isEnabled'] unless attributes[:'isEnabled'].nil?
204
+ self.is_enabled = true if is_enabled.nil? && !attributes.key?(:'isEnabled') # rubocop:disable Style/StringLiterals
205
+
206
+ raise 'You cannot provide both :isEnabled and :is_enabled' if attributes.key?(:'isEnabled') && attributes.key?(:'is_enabled')
207
+
208
+ self.is_enabled = attributes[:'is_enabled'] unless attributes[:'is_enabled'].nil?
209
+ self.is_enabled = true if is_enabled.nil? && !attributes.key?(:'isEnabled') && !attributes.key?(:'is_enabled') # rubocop:disable Style/StringLiterals
210
+
211
+ self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
212
+
213
+ raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
214
+
215
+ self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
216
+
217
+ self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
218
+
219
+ raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
220
+
221
+ self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
222
+ end
223
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
224
+ # rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
225
+
226
+ # Custom attribute writer method checking allowed values (enum).
227
+ # @param [Object] protocol Object to be assigned
228
+ def protocol=(protocol)
229
+ # rubocop: disable Metrics/LineLength
230
+ raise "Invalid value for 'protocol': this must be one of the values in PROTOCOL_ENUM." if protocol && !PROTOCOL_ENUM.include?(protocol)
231
+
232
+ # rubocop: enable Metrics/LineLength
233
+ @protocol = protocol
234
+ end
235
+
236
+ # Custom attribute writer method checking allowed values (enum).
237
+ # @param [Object] method Object to be assigned
238
+ def method=(method)
239
+ # rubocop: disable Metrics/LineLength
240
+ raise "Invalid value for 'method': this must be one of the values in METHOD_ENUM." if method && !METHOD_ENUM.include?(method)
241
+
242
+ # rubocop: enable Metrics/LineLength
243
+ @method = method
244
+ end
245
+
246
+ # rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
247
+
248
+
249
+ # Checks equality by comparing each attribute.
250
+ # @param [Object] other the other object to be compared
251
+ def ==(other)
252
+ return true if equal?(other)
253
+
254
+ self.class == other.class &&
255
+ compartment_id == other.compartment_id &&
256
+ targets == other.targets &&
257
+ vantage_point_names == other.vantage_point_names &&
258
+ port == other.port &&
259
+ timeout_in_seconds == other.timeout_in_seconds &&
260
+ protocol == other.protocol &&
261
+ method == other.method &&
262
+ path == other.path &&
263
+ headers == other.headers &&
264
+ display_name == other.display_name &&
265
+ interval_in_seconds == other.interval_in_seconds &&
266
+ is_enabled == other.is_enabled &&
267
+ freeform_tags == other.freeform_tags &&
268
+ defined_tags == other.defined_tags
269
+ end
270
+ # rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
271
+
272
+ # @see the `==` method
273
+ # @param [Object] other the other object to be compared
274
+ def eql?(other)
275
+ self == other
276
+ end
277
+
278
+ # rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
279
+
280
+
281
+ # Calculates hash code according to all attributes.
282
+ # @return [Fixnum] Hash code
283
+ def hash
284
+ [compartment_id, targets, vantage_point_names, port, timeout_in_seconds, protocol, method, path, headers, display_name, interval_in_seconds, is_enabled, freeform_tags, defined_tags].hash
285
+ end
286
+ # rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
287
+
288
+ # rubocop:disable Metrics/AbcSize, Layout/EmptyLines
289
+
290
+
291
+ # Builds the object from hash
292
+ # @param [Hash] attributes Model attributes in the form of hash
293
+ # @return [Object] Returns the model itself
294
+ def build_from_hash(attributes)
295
+ return nil unless attributes.is_a?(Hash)
296
+
297
+ self.class.swagger_types.each_pair do |key, type|
298
+ if type =~ /^Array<(.*)>/i
299
+ # check to ensure the input is an array given that the the attribute
300
+ # is documented as an array but the input is not
301
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
302
+ public_method("#{key}=").call(
303
+ attributes[self.class.attribute_map[key]]
304
+ .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
305
+ )
306
+ end
307
+ elsif !attributes[self.class.attribute_map[key]].nil?
308
+ public_method("#{key}=").call(
309
+ OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
310
+ )
311
+ end
312
+ # or else data not found in attributes(hash), not an issue as the data can be optional
313
+ end
314
+
315
+ self
316
+ end
317
+ # rubocop:enable Metrics/AbcSize, Layout/EmptyLines
318
+
319
+ # Returns the string representation of the object
320
+ # @return [String] String presentation of the object
321
+ def to_s
322
+ to_hash.to_s
323
+ end
324
+
325
+ # Returns the object in the form of hash
326
+ # @return [Hash] Returns the object in the form of hash
327
+ def to_hash
328
+ hash = {}
329
+ self.class.attribute_map.each_pair do |attr, param|
330
+ value = public_method(attr).call
331
+ next if value.nil? && !instance_variable_defined?("@#{attr}")
332
+
333
+ hash[param] = _to_hash(value)
334
+ end
335
+ hash
336
+ end
337
+
338
+ private
339
+
340
+ # Outputs non-array value in the form of hash
341
+ # For object, use to_hash. Otherwise, just return the value
342
+ # @param [Object] value Any valid value
343
+ # @return [Hash] Returns the value in the form of hash
344
+ def _to_hash(value)
345
+ if value.is_a?(Array)
346
+ value.compact.map { |v| _to_hash(v) }
347
+ elsif value.is_a?(Hash)
348
+ {}.tap do |hash|
349
+ value.each { |k, v| hash[k] = _to_hash(v) }
350
+ end
351
+ elsif value.respond_to? :to_hash
352
+ value.to_hash
353
+ else
354
+ value
355
+ end
356
+ end
357
+ end
358
+ end
359
+ # rubocop:enable Lint/UnneededCopDisableDirective