oci 2.5.11 → 2.6.0
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 +1 -0
- data/lib/oci/auth/federation_client.rb +2 -1
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +6 -1
- data/lib/oci/auth/url_based_certificate_retriever.rb +6 -2
- data/lib/oci/auth/util.rb +18 -0
- data/lib/oci/core/compute_client.rb +730 -48
- data/lib/oci/core/compute_client_composite_operations.rb +119 -0
- data/lib/oci/core/compute_management_client.rb +11 -4
- data/lib/oci/core/core.rb +13 -0
- data/lib/oci/core/models/add_security_rule_details.rb +4 -2
- data/lib/oci/core/models/attach_vnic_details.rb +1 -0
- data/lib/oci/core/models/capture_console_history_details.rb +1 -0
- data/lib/oci/core/models/change_dedicated_vm_host_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_dhcp_options_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_internet_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_local_peering_gateway_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_network_security_group_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_public_ip_compartment_details.rb +155 -0
- data/lib/oci/core/models/create_dedicated_vm_host_details.rb +262 -0
- data/lib/oci/core/models/create_drg_attachment_details.rb +4 -2
- data/lib/oci/core/models/create_image_details.rb +1 -1
- data/lib/oci/core/models/create_instance_configuration_base.rb +16 -6
- data/lib/oci/core/models/create_instance_configuration_details.rb +1 -1
- data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +3 -2
- data/lib/oci/core/models/create_instance_pool_details.rb +3 -1
- data/lib/oci/core/models/create_local_peering_gateway_details.rb +1 -1
- data/lib/oci/core/models/create_service_gateway_details.rb +1 -1
- data/lib/oci/core/models/create_volume_group_backup_details.rb +3 -1
- data/lib/oci/core/models/create_volume_group_details.rb +1 -1
- data/lib/oci/core/models/cross_connect_mapping.rb +4 -0
- data/lib/oci/core/models/dedicated_vm_host.rb +359 -0
- data/lib/oci/core/models/dedicated_vm_host_instance_shape_summary.rb +170 -0
- data/lib/oci/core/models/dedicated_vm_host_instance_summary.rb +215 -0
- data/lib/oci/core/models/dedicated_vm_host_shape_summary.rb +171 -0
- data/lib/oci/core/models/dedicated_vm_host_summary.rb +325 -0
- data/lib/oci/core/models/drg_attachment.rb +6 -3
- data/lib/oci/core/models/egress_security_rule.rb +1 -0
- data/lib/oci/core/models/image.rb +2 -0
- data/lib/oci/core/models/ingress_security_rule.rb +2 -1
- data/lib/oci/core/models/instance.rb +16 -1
- data/lib/oci/core/models/instance_configuration.rb +10 -7
- data/lib/oci/core/models/ipv6.rb +2 -0
- data/lib/oci/core/models/launch_instance_details.rb +16 -1
- data/lib/oci/core/models/launch_options.rb +3 -2
- data/lib/oci/core/models/local_peering_gateway.rb +4 -3
- data/lib/oci/core/models/route_rule.rb +2 -1
- data/lib/oci/core/models/security_rule.rb +3 -1
- data/lib/oci/core/models/service_gateway.rb +4 -3
- data/lib/oci/core/models/subnet.rb +2 -1
- data/lib/oci/core/models/update_console_history_details.rb +1 -0
- data/lib/oci/core/models/update_dedicated_vm_host_details.rb +194 -0
- data/lib/oci/core/models/update_drg_attachment_details.rb +6 -3
- data/lib/oci/core/models/update_instance_pool_details.rb +3 -1
- data/lib/oci/core/models/update_local_peering_gateway_details.rb +4 -3
- data/lib/oci/core/models/update_network_security_group_details.rb +2 -0
- data/lib/oci/core/models/update_security_rule_details.rb +4 -2
- data/lib/oci/core/models/update_service_gateway_details.rb +4 -3
- data/lib/oci/core/models/update_vnic_details.rb +2 -0
- data/lib/oci/core/models/update_volume_backup_details.rb +1 -1
- data/lib/oci/core/models/update_volume_group_backup_details.rb +2 -1
- data/lib/oci/core/models/update_volume_group_details.rb +2 -1
- data/lib/oci/core/models/vcn.rb +2 -1
- data/lib/oci/core/models/volume_backup_schedule.rb +1 -1
- data/lib/oci/core/virtual_network_client.rb +396 -59
- data/lib/oci/dts/dts.rb +57 -0
- data/lib/oci/dts/models/attach_devices_details.rb +153 -0
- data/lib/oci/dts/models/change_transfer_job_compartment_details.rb +154 -0
- data/lib/oci/dts/models/create_transfer_appliance_details.rb +152 -0
- data/lib/oci/dts/models/create_transfer_appliance_entitlement_details.rb +178 -0
- data/lib/oci/dts/models/create_transfer_device_details.rb +165 -0
- data/lib/oci/dts/models/create_transfer_job_details.rb +238 -0
- data/lib/oci/dts/models/create_transfer_package_details.rb +178 -0
- data/lib/oci/dts/models/detach_devices_details.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_appliances.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_devices.rb +153 -0
- data/lib/oci/dts/models/multiple_transfer_packages.rb +153 -0
- data/lib/oci/dts/models/new_transfer_device.rb +246 -0
- data/lib/oci/dts/models/shipping_address.rb +263 -0
- data/lib/oci/dts/models/shipping_vendors.rb +149 -0
- data/lib/oci/dts/models/transfer_appliance.rb +367 -0
- data/lib/oci/dts/models/transfer_appliance_certificate.rb +148 -0
- data/lib/oci/dts/models/transfer_appliance_encryption_passphrase.rb +152 -0
- data/lib/oci/dts/models/transfer_appliance_entitlement.rb +240 -0
- data/lib/oci/dts/models/transfer_appliance_public_key.rb +152 -0
- data/lib/oci/dts/models/transfer_appliance_summary.rb +223 -0
- data/lib/oci/dts/models/transfer_device.rb +268 -0
- data/lib/oci/dts/models/transfer_device_summary.rb +254 -0
- data/lib/oci/dts/models/transfer_job.rb +356 -0
- data/lib/oci/dts/models/transfer_job_summary.rb +296 -0
- data/lib/oci/dts/models/transfer_package.rb +281 -0
- data/lib/oci/dts/models/transfer_package_summary.rb +201 -0
- data/lib/oci/dts/models/update_transfer_appliance_details.rb +180 -0
- data/lib/oci/dts/models/update_transfer_device_details.rb +166 -0
- data/lib/oci/dts/models/update_transfer_job_details.rb +237 -0
- data/lib/oci/dts/models/update_transfer_package_details.rb +204 -0
- data/lib/oci/dts/shipping_vendors_client.rb +165 -0
- data/lib/oci/dts/shipping_vendors_client_composite_operations.rb +24 -0
- data/lib/oci/dts/transfer_appliance_client.rb +569 -0
- data/lib/oci/dts/transfer_appliance_client_composite_operations.rb +104 -0
- data/lib/oci/dts/transfer_appliance_entitlement_client.rb +223 -0
- data/lib/oci/dts/transfer_appliance_entitlement_client_composite_operations.rb +24 -0
- data/lib/oci/dts/transfer_device_client.rb +402 -0
- data/lib/oci/dts/transfer_device_client_composite_operations.rb +65 -0
- data/lib/oci/dts/transfer_job_client.rb +458 -0
- data/lib/oci/dts/transfer_job_client_composite_operations.rb +143 -0
- data/lib/oci/dts/transfer_package_client.rb +515 -0
- data/lib/oci/dts/transfer_package_client_composite_operations.rb +104 -0
- data/lib/oci/dts/util.rb +2 -0
- data/lib/oci/file_storage/models/create_file_system_details.rb +19 -4
- data/lib/oci/file_storage/models/file_system.rb +19 -4
- data/lib/oci/file_storage/models/file_system_summary.rb +19 -4
- data/lib/oci/file_storage/models/update_file_system_details.rb +22 -4
- data/lib/oci/limits/limits.rb +5 -0
- data/lib/oci/limits/limits_client.rb +444 -0
- data/lib/oci/limits/limits_client_composite_operations.rb +24 -0
- data/lib/oci/limits/models/create_quota_details.rb +1 -1
- data/lib/oci/limits/models/limit_definition_summary.rb +241 -0
- data/lib/oci/limits/models/limit_value_summary.rb +210 -0
- data/lib/oci/limits/models/quota.rb +1 -1
- data/lib/oci/limits/models/resource_availability.rb +163 -0
- data/lib/oci/limits/models/service_summary.rb +159 -0
- data/lib/oci/limits/models/update_quota_details.rb +1 -1
- data/lib/oci/limits/quotas_client.rb +12 -11
- data/lib/oci/monitoring/models/alarm.rb +20 -1
- data/lib/oci/monitoring/models/create_alarm_details.rb +20 -1
- data/lib/oci/monitoring/models/list_metrics_details.rb +23 -3
- data/lib/oci/monitoring/models/metric.rb +20 -1
- data/lib/oci/monitoring/models/metric_data.rb +20 -1
- data/lib/oci/monitoring/models/metric_data_details.rb +20 -1
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +20 -1
- data/lib/oci/monitoring/models/update_alarm_details.rb +20 -1
- data/lib/oci/regions.rb +14 -8
- data/lib/oci/streaming/models/archiver.rb +291 -0
- data/lib/oci/streaming/models/archiver_error.rb +159 -0
- data/lib/oci/streaming/models/archiver_lifecycle_state.rb +14 -0
- data/lib/oci/streaming/models/archiver_start_position.rb +10 -0
- data/lib/oci/streaming/models/create_archiver_details.rb +223 -0
- data/lib/oci/streaming/models/update_archiver_details.rb +222 -0
- data/lib/oci/streaming/stream_admin_client.rb +304 -0
- data/lib/oci/streaming/stream_admin_client_composite_operations.rb +162 -0
- data/lib/oci/streaming/streaming.rb +6 -0
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule.rb +121 -4
- data/lib/oci/waas/models/access_rule_criteria.rb +12 -0
- data/lib/oci/waas/models/address_list.rb +289 -0
- data/lib/oci/waas/models/address_list_summary.rb +279 -0
- data/lib/oci/waas/models/caching_rule.rb +243 -0
- data/lib/oci/waas/models/caching_rule_criteria.rb +194 -0
- data/lib/oci/waas/models/caching_rule_summary.rb +246 -0
- data/lib/oci/waas/models/certificate.rb +22 -9
- data/lib/oci/waas/models/certificate_extensions.rb +3 -0
- data/lib/oci/waas/models/certificate_issuer_name.rb +225 -0
- data/lib/oci/waas/models/certificate_public_key_info.rb +4 -1
- data/lib/oci/waas/models/certificate_subject_name.rb +8 -1
- data/lib/oci/waas/models/certificate_summary.rb +10 -2
- data/lib/oci/waas/models/change_address_list_compartment_details.rb +154 -0
- data/lib/oci/waas/models/change_custom_protection_rule_compartment_details.rb +154 -0
- data/lib/oci/waas/models/create_address_list_details.rb +213 -0
- data/lib/oci/waas/models/create_certificate_details.rb +22 -3
- data/lib/oci/waas/models/create_custom_protection_rule_details.rb +251 -0
- data/lib/oci/waas/models/create_waas_policy_details.rb +26 -4
- data/lib/oci/waas/models/custom_protection_rule.rb +326 -0
- data/lib/oci/waas/models/custom_protection_rule_setting.rb +180 -0
- data/lib/oci/waas/models/custom_protection_rule_summary.rb +279 -0
- data/lib/oci/waas/models/origin_group.rb +149 -0
- data/lib/oci/waas/models/origin_group_origins.rb +159 -0
- data/lib/oci/waas/models/policy_config.rb +201 -4
- data/lib/oci/waas/models/protection_rule_exclusion.rb +2 -2
- data/lib/oci/waas/models/purge_cache.rb +149 -0
- data/lib/oci/waas/models/update_address_list_details.rb +199 -0
- data/lib/oci/waas/models/update_certificate_details.rb +10 -2
- data/lib/oci/waas/models/update_custom_protection_rule_details.rb +237 -0
- data/lib/oci/waas/models/update_waas_policy_details.rb +26 -4
- data/lib/oci/waas/models/waas_policy.rb +25 -3
- data/lib/oci/waas/models/waas_policy_custom_protection_rule_summary.rb +207 -0
- data/lib/oci/waas/models/waas_policy_summary.rb +10 -2
- data/lib/oci/waas/models/waf_config.rb +43 -1
- data/lib/oci/waas/models/waf_config_details.rb +43 -1
- data/lib/oci/waas/models/waf_log.rb +3 -3
- data/lib/oci/waas/models/work_request.rb +4 -1
- data/lib/oci/waas/models/work_request_operation_types.rb +4 -1
- data/lib/oci/waas/models/work_request_summary.rb +4 -1
- data/lib/oci/waas/waas.rb +19 -0
- data/lib/oci/waas/waas_client.rb +1147 -61
- data/lib/oci/waas/waas_client_composite_operations.rb +386 -0
- metadata +90 -2
|
@@ -0,0 +1,194 @@
|
|
|
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, Metrics/LineLength
|
|
7
|
+
module OCI
|
|
8
|
+
# A caching rule criteria condition and value.
|
|
9
|
+
class Waas::Models::CachingRuleCriteria
|
|
10
|
+
CONDITION_ENUM = [
|
|
11
|
+
CONDITION_URL_IS = 'URL_IS'.freeze,
|
|
12
|
+
CONDITION_URL_STARTS_WITH = 'URL_STARTS_WITH'.freeze,
|
|
13
|
+
CONDITION_URL_PART_ENDS_WITH = 'URL_PART_ENDS_WITH'.freeze,
|
|
14
|
+
CONDITION_URL_PART_CONTAINS = 'URL_PART_CONTAINS'.freeze,
|
|
15
|
+
CONDITION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
16
|
+
].freeze
|
|
17
|
+
|
|
18
|
+
# **[Required]** The condition of the caching rule criteria.
|
|
19
|
+
# - **URL_IS:** Matches if the concatenation of request URL path and query is identical to the contents of the `value` field.
|
|
20
|
+
#
|
|
21
|
+
# - **URL_STARTS_WITH:** Matches if the concatenation of request URL path and query starts with the contents of the `value` field.
|
|
22
|
+
#
|
|
23
|
+
# - **URL_PART_ENDS_WITH:** Matches if the concatenation of request URL path and query ends with the contents of the `value` field.
|
|
24
|
+
#
|
|
25
|
+
# - **URL_PART_CONTAINS:** Matches if the concatenation of request URL path and query contains the contents of the `value` field.
|
|
26
|
+
#
|
|
27
|
+
# URL must start with /
|
|
28
|
+
#
|
|
29
|
+
# URL can't contain restricted double slashes //
|
|
30
|
+
#
|
|
31
|
+
# URL can't contain restricted ' & ? symbols
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_reader :condition
|
|
34
|
+
|
|
35
|
+
# **[Required]** The value of the caching rule criteria.
|
|
36
|
+
# @return [String]
|
|
37
|
+
attr_accessor :value
|
|
38
|
+
|
|
39
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
40
|
+
def self.attribute_map
|
|
41
|
+
{
|
|
42
|
+
# rubocop:disable Style/SymbolLiteral
|
|
43
|
+
'condition': :'condition',
|
|
44
|
+
'value': :'value'
|
|
45
|
+
# rubocop:enable Style/SymbolLiteral
|
|
46
|
+
}
|
|
47
|
+
end
|
|
48
|
+
|
|
49
|
+
# Attribute type mapping.
|
|
50
|
+
def self.swagger_types
|
|
51
|
+
{
|
|
52
|
+
# rubocop:disable Style/SymbolLiteral
|
|
53
|
+
'condition': :'String',
|
|
54
|
+
'value': :'String'
|
|
55
|
+
# rubocop:enable Style/SymbolLiteral
|
|
56
|
+
}
|
|
57
|
+
end
|
|
58
|
+
|
|
59
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
60
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
61
|
+
|
|
62
|
+
|
|
63
|
+
# Initializes the object
|
|
64
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
65
|
+
# @option attributes [String] :condition The value to assign to the {#condition} property
|
|
66
|
+
# @option attributes [String] :value The value to assign to the {#value} property
|
|
67
|
+
def initialize(attributes = {})
|
|
68
|
+
return unless attributes.is_a?(Hash)
|
|
69
|
+
|
|
70
|
+
# convert string to symbol for hash key
|
|
71
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
72
|
+
|
|
73
|
+
self.condition = attributes[:'condition'] if attributes[:'condition']
|
|
74
|
+
|
|
75
|
+
self.value = attributes[:'value'] if attributes[:'value']
|
|
76
|
+
end
|
|
77
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
78
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
79
|
+
|
|
80
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
81
|
+
# @param [Object] condition Object to be assigned
|
|
82
|
+
def condition=(condition)
|
|
83
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
84
|
+
if condition && !CONDITION_ENUM.include?(condition)
|
|
85
|
+
OCI.logger.debug("Unknown value for 'condition' [" + condition + "]. Mapping to 'CONDITION_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
86
|
+
@condition = CONDITION_UNKNOWN_ENUM_VALUE
|
|
87
|
+
else
|
|
88
|
+
@condition = condition
|
|
89
|
+
end
|
|
90
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
91
|
+
end
|
|
92
|
+
|
|
93
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
94
|
+
|
|
95
|
+
|
|
96
|
+
# Checks equality by comparing each attribute.
|
|
97
|
+
# @param [Object] other the other object to be compared
|
|
98
|
+
def ==(other)
|
|
99
|
+
return true if equal?(other)
|
|
100
|
+
|
|
101
|
+
self.class == other.class &&
|
|
102
|
+
condition == other.condition &&
|
|
103
|
+
value == other.value
|
|
104
|
+
end
|
|
105
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
106
|
+
|
|
107
|
+
# @see the `==` method
|
|
108
|
+
# @param [Object] other the other object to be compared
|
|
109
|
+
def eql?(other)
|
|
110
|
+
self == other
|
|
111
|
+
end
|
|
112
|
+
|
|
113
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
114
|
+
|
|
115
|
+
|
|
116
|
+
# Calculates hash code according to all attributes.
|
|
117
|
+
# @return [Fixnum] Hash code
|
|
118
|
+
def hash
|
|
119
|
+
[condition, value].hash
|
|
120
|
+
end
|
|
121
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
122
|
+
|
|
123
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
# Builds the object from hash
|
|
127
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
128
|
+
# @return [Object] Returns the model itself
|
|
129
|
+
def build_from_hash(attributes)
|
|
130
|
+
return nil unless attributes.is_a?(Hash)
|
|
131
|
+
|
|
132
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
133
|
+
if type =~ /^Array<(.*)>/i
|
|
134
|
+
# check to ensure the input is an array given that the the attribute
|
|
135
|
+
# is documented as an array but the input is not
|
|
136
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
137
|
+
public_method("#{key}=").call(
|
|
138
|
+
attributes[self.class.attribute_map[key]]
|
|
139
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
140
|
+
)
|
|
141
|
+
end
|
|
142
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
143
|
+
public_method("#{key}=").call(
|
|
144
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
145
|
+
)
|
|
146
|
+
end
|
|
147
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
148
|
+
end
|
|
149
|
+
|
|
150
|
+
self
|
|
151
|
+
end
|
|
152
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
153
|
+
|
|
154
|
+
# Returns the string representation of the object
|
|
155
|
+
# @return [String] String presentation of the object
|
|
156
|
+
def to_s
|
|
157
|
+
to_hash.to_s
|
|
158
|
+
end
|
|
159
|
+
|
|
160
|
+
# Returns the object in the form of hash
|
|
161
|
+
# @return [Hash] Returns the object in the form of hash
|
|
162
|
+
def to_hash
|
|
163
|
+
hash = {}
|
|
164
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
165
|
+
value = public_method(attr).call
|
|
166
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
167
|
+
|
|
168
|
+
hash[param] = _to_hash(value)
|
|
169
|
+
end
|
|
170
|
+
hash
|
|
171
|
+
end
|
|
172
|
+
|
|
173
|
+
private
|
|
174
|
+
|
|
175
|
+
# Outputs non-array value in the form of hash
|
|
176
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
177
|
+
# @param [Object] value Any valid value
|
|
178
|
+
# @return [Hash] Returns the value in the form of hash
|
|
179
|
+
def _to_hash(value)
|
|
180
|
+
if value.is_a?(Array)
|
|
181
|
+
value.compact.map { |v| _to_hash(v) }
|
|
182
|
+
elsif value.is_a?(Hash)
|
|
183
|
+
{}.tap do |hash|
|
|
184
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
185
|
+
end
|
|
186
|
+
elsif value.respond_to? :to_hash
|
|
187
|
+
value.to_hash
|
|
188
|
+
else
|
|
189
|
+
value
|
|
190
|
+
end
|
|
191
|
+
end
|
|
192
|
+
end
|
|
193
|
+
end
|
|
194
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
@@ -0,0 +1,246 @@
|
|
|
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, Metrics/LineLength
|
|
7
|
+
module OCI
|
|
8
|
+
# The caching rule settings.
|
|
9
|
+
class Waas::Models::CachingRuleSummary
|
|
10
|
+
ACTION_ENUM = [
|
|
11
|
+
ACTION_CACHE = 'CACHE'.freeze,
|
|
12
|
+
ACTION_BYPASS_CACHE = 'BYPASS_CACHE'.freeze,
|
|
13
|
+
ACTION_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
14
|
+
].freeze
|
|
15
|
+
|
|
16
|
+
# The unique key for the caching rule.
|
|
17
|
+
# @return [String]
|
|
18
|
+
attr_accessor :key
|
|
19
|
+
|
|
20
|
+
# **[Required]** The name of the caching rule.
|
|
21
|
+
# @return [String]
|
|
22
|
+
attr_accessor :name
|
|
23
|
+
|
|
24
|
+
# **[Required]** The action to take on matched caching rules.
|
|
25
|
+
# - **CACHE:** Allow to set caching rule, which would be cached.
|
|
26
|
+
#
|
|
27
|
+
# - **BYPASS_CACHE:** Allow to set caching rule, which would never be cached. e.g. all requests would be passed directly to origin for those file types.
|
|
28
|
+
# @return [String]
|
|
29
|
+
attr_reader :action
|
|
30
|
+
|
|
31
|
+
# The caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
|
|
32
|
+
# @return [String]
|
|
33
|
+
attr_accessor :caching_duration
|
|
34
|
+
|
|
35
|
+
# Enables or disables the client caching.
|
|
36
|
+
# Browsers use the Cache-Control header value for caching content locally, in the browser.
|
|
37
|
+
# This setting will control the addition of a Cache-Control header to responses. It overrides existing Cache-Control headers.
|
|
38
|
+
# @return [BOOLEAN]
|
|
39
|
+
attr_accessor :is_client_caching_enabled
|
|
40
|
+
|
|
41
|
+
# The client caching duration (applies only to `CACHE` action) specified in ISO 8601 extended format, in case client caching enabled. It sets Cache-Control header max-age time, i.e. the local browser cache expire time. Supported units: seconds, minutes, hours, days, weeks, months. Max value - 99. Mixing of multiple units is not supported.
|
|
42
|
+
# @return [String]
|
|
43
|
+
attr_accessor :client_caching_duration
|
|
44
|
+
|
|
45
|
+
# **[Required]** The array of the rule criteria with condition and value.
|
|
46
|
+
# @return [Array<OCI::Waas::Models::CachingRuleCriteria>]
|
|
47
|
+
attr_accessor :criteria
|
|
48
|
+
|
|
49
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
|
50
|
+
def self.attribute_map
|
|
51
|
+
{
|
|
52
|
+
# rubocop:disable Style/SymbolLiteral
|
|
53
|
+
'key': :'key',
|
|
54
|
+
'name': :'name',
|
|
55
|
+
'action': :'action',
|
|
56
|
+
'caching_duration': :'cachingDuration',
|
|
57
|
+
'is_client_caching_enabled': :'isClientCachingEnabled',
|
|
58
|
+
'client_caching_duration': :'clientCachingDuration',
|
|
59
|
+
'criteria': :'criteria'
|
|
60
|
+
# rubocop:enable Style/SymbolLiteral
|
|
61
|
+
}
|
|
62
|
+
end
|
|
63
|
+
|
|
64
|
+
# Attribute type mapping.
|
|
65
|
+
def self.swagger_types
|
|
66
|
+
{
|
|
67
|
+
# rubocop:disable Style/SymbolLiteral
|
|
68
|
+
'key': :'String',
|
|
69
|
+
'name': :'String',
|
|
70
|
+
'action': :'String',
|
|
71
|
+
'caching_duration': :'String',
|
|
72
|
+
'is_client_caching_enabled': :'BOOLEAN',
|
|
73
|
+
'client_caching_duration': :'String',
|
|
74
|
+
'criteria': :'Array<OCI::Waas::Models::CachingRuleCriteria>'
|
|
75
|
+
# rubocop:enable Style/SymbolLiteral
|
|
76
|
+
}
|
|
77
|
+
end
|
|
78
|
+
|
|
79
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
80
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
81
|
+
|
|
82
|
+
|
|
83
|
+
# Initializes the object
|
|
84
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
85
|
+
# @option attributes [String] :key The value to assign to the {#key} property
|
|
86
|
+
# @option attributes [String] :name The value to assign to the {#name} property
|
|
87
|
+
# @option attributes [String] :action The value to assign to the {#action} property
|
|
88
|
+
# @option attributes [String] :caching_duration The value to assign to the {#caching_duration} property
|
|
89
|
+
# @option attributes [BOOLEAN] :is_client_caching_enabled The value to assign to the {#is_client_caching_enabled} property
|
|
90
|
+
# @option attributes [String] :client_caching_duration The value to assign to the {#client_caching_duration} property
|
|
91
|
+
# @option attributes [Array<OCI::Waas::Models::CachingRuleCriteria>] :criteria The value to assign to the {#criteria} property
|
|
92
|
+
def initialize(attributes = {})
|
|
93
|
+
return unless attributes.is_a?(Hash)
|
|
94
|
+
|
|
95
|
+
# convert string to symbol for hash key
|
|
96
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
|
97
|
+
|
|
98
|
+
self.key = attributes[:'key'] if attributes[:'key']
|
|
99
|
+
|
|
100
|
+
self.name = attributes[:'name'] if attributes[:'name']
|
|
101
|
+
|
|
102
|
+
self.action = attributes[:'action'] if attributes[:'action']
|
|
103
|
+
|
|
104
|
+
self.caching_duration = attributes[:'cachingDuration'] if attributes[:'cachingDuration']
|
|
105
|
+
|
|
106
|
+
raise 'You cannot provide both :cachingDuration and :caching_duration' if attributes.key?(:'cachingDuration') && attributes.key?(:'caching_duration')
|
|
107
|
+
|
|
108
|
+
self.caching_duration = attributes[:'caching_duration'] if attributes[:'caching_duration']
|
|
109
|
+
|
|
110
|
+
self.is_client_caching_enabled = attributes[:'isClientCachingEnabled'] unless attributes[:'isClientCachingEnabled'].nil?
|
|
111
|
+
|
|
112
|
+
raise 'You cannot provide both :isClientCachingEnabled and :is_client_caching_enabled' if attributes.key?(:'isClientCachingEnabled') && attributes.key?(:'is_client_caching_enabled')
|
|
113
|
+
|
|
114
|
+
self.is_client_caching_enabled = attributes[:'is_client_caching_enabled'] unless attributes[:'is_client_caching_enabled'].nil?
|
|
115
|
+
|
|
116
|
+
self.client_caching_duration = attributes[:'clientCachingDuration'] if attributes[:'clientCachingDuration']
|
|
117
|
+
|
|
118
|
+
raise 'You cannot provide both :clientCachingDuration and :client_caching_duration' if attributes.key?(:'clientCachingDuration') && attributes.key?(:'client_caching_duration')
|
|
119
|
+
|
|
120
|
+
self.client_caching_duration = attributes[:'client_caching_duration'] if attributes[:'client_caching_duration']
|
|
121
|
+
|
|
122
|
+
self.criteria = attributes[:'criteria'] if attributes[:'criteria']
|
|
123
|
+
end
|
|
124
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
|
125
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
|
126
|
+
|
|
127
|
+
# Custom attribute writer method checking allowed values (enum).
|
|
128
|
+
# @param [Object] action Object to be assigned
|
|
129
|
+
def action=(action)
|
|
130
|
+
# rubocop:disable Style/ConditionalAssignment
|
|
131
|
+
if action && !ACTION_ENUM.include?(action)
|
|
132
|
+
OCI.logger.debug("Unknown value for 'action' [" + action + "]. Mapping to 'ACTION_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
|
133
|
+
@action = ACTION_UNKNOWN_ENUM_VALUE
|
|
134
|
+
else
|
|
135
|
+
@action = action
|
|
136
|
+
end
|
|
137
|
+
# rubocop:enable Style/ConditionalAssignment
|
|
138
|
+
end
|
|
139
|
+
|
|
140
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
# Checks equality by comparing each attribute.
|
|
144
|
+
# @param [Object] other the other object to be compared
|
|
145
|
+
def ==(other)
|
|
146
|
+
return true if equal?(other)
|
|
147
|
+
|
|
148
|
+
self.class == other.class &&
|
|
149
|
+
key == other.key &&
|
|
150
|
+
name == other.name &&
|
|
151
|
+
action == other.action &&
|
|
152
|
+
caching_duration == other.caching_duration &&
|
|
153
|
+
is_client_caching_enabled == other.is_client_caching_enabled &&
|
|
154
|
+
client_caching_duration == other.client_caching_duration &&
|
|
155
|
+
criteria == other.criteria
|
|
156
|
+
end
|
|
157
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
|
158
|
+
|
|
159
|
+
# @see the `==` method
|
|
160
|
+
# @param [Object] other the other object to be compared
|
|
161
|
+
def eql?(other)
|
|
162
|
+
self == other
|
|
163
|
+
end
|
|
164
|
+
|
|
165
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
166
|
+
|
|
167
|
+
|
|
168
|
+
# Calculates hash code according to all attributes.
|
|
169
|
+
# @return [Fixnum] Hash code
|
|
170
|
+
def hash
|
|
171
|
+
[key, name, action, caching_duration, is_client_caching_enabled, client_caching_duration, criteria].hash
|
|
172
|
+
end
|
|
173
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
174
|
+
|
|
175
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
|
176
|
+
|
|
177
|
+
|
|
178
|
+
# Builds the object from hash
|
|
179
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
|
180
|
+
# @return [Object] Returns the model itself
|
|
181
|
+
def build_from_hash(attributes)
|
|
182
|
+
return nil unless attributes.is_a?(Hash)
|
|
183
|
+
|
|
184
|
+
self.class.swagger_types.each_pair do |key, type|
|
|
185
|
+
if type =~ /^Array<(.*)>/i
|
|
186
|
+
# check to ensure the input is an array given that the the attribute
|
|
187
|
+
# is documented as an array but the input is not
|
|
188
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
|
189
|
+
public_method("#{key}=").call(
|
|
190
|
+
attributes[self.class.attribute_map[key]]
|
|
191
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
|
192
|
+
)
|
|
193
|
+
end
|
|
194
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
|
195
|
+
public_method("#{key}=").call(
|
|
196
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
|
197
|
+
)
|
|
198
|
+
end
|
|
199
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
|
200
|
+
end
|
|
201
|
+
|
|
202
|
+
self
|
|
203
|
+
end
|
|
204
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
|
205
|
+
|
|
206
|
+
# Returns the string representation of the object
|
|
207
|
+
# @return [String] String presentation of the object
|
|
208
|
+
def to_s
|
|
209
|
+
to_hash.to_s
|
|
210
|
+
end
|
|
211
|
+
|
|
212
|
+
# Returns the object in the form of hash
|
|
213
|
+
# @return [Hash] Returns the object in the form of hash
|
|
214
|
+
def to_hash
|
|
215
|
+
hash = {}
|
|
216
|
+
self.class.attribute_map.each_pair do |attr, param|
|
|
217
|
+
value = public_method(attr).call
|
|
218
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
|
219
|
+
|
|
220
|
+
hash[param] = _to_hash(value)
|
|
221
|
+
end
|
|
222
|
+
hash
|
|
223
|
+
end
|
|
224
|
+
|
|
225
|
+
private
|
|
226
|
+
|
|
227
|
+
# Outputs non-array value in the form of hash
|
|
228
|
+
# For object, use to_hash. Otherwise, just return the value
|
|
229
|
+
# @param [Object] value Any valid value
|
|
230
|
+
# @return [Hash] Returns the value in the form of hash
|
|
231
|
+
def _to_hash(value)
|
|
232
|
+
if value.is_a?(Array)
|
|
233
|
+
value.compact.map { |v| _to_hash(v) }
|
|
234
|
+
elsif value.is_a?(Hash)
|
|
235
|
+
{}.tap do |hash|
|
|
236
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
|
237
|
+
end
|
|
238
|
+
elsif value.respond_to? :to_hash
|
|
239
|
+
value.to_hash
|
|
240
|
+
else
|
|
241
|
+
value
|
|
242
|
+
end
|
|
243
|
+
end
|
|
244
|
+
end
|
|
245
|
+
end
|
|
246
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
|
@@ -18,15 +18,15 @@ module OCI
|
|
|
18
18
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
|
19
19
|
].freeze
|
|
20
20
|
|
|
21
|
-
# The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the certificate.
|
|
21
|
+
# **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the certificate.
|
|
22
22
|
# @return [String]
|
|
23
23
|
attr_accessor :id
|
|
24
24
|
|
|
25
|
-
# The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the certificate's compartment.
|
|
25
|
+
# **[Required]** The [OCID](https://docs.cloud.oracle.com/Content/General/Concepts/identifiers.htm) of the certificate's compartment.
|
|
26
26
|
# @return [String]
|
|
27
27
|
attr_accessor :compartment_id
|
|
28
28
|
|
|
29
|
-
# The user-friendly name of the certificate.
|
|
29
|
+
# **[Required]** The user-friendly name of the certificate.
|
|
30
30
|
# @return [String]
|
|
31
31
|
attr_accessor :display_name
|
|
32
32
|
|
|
@@ -36,36 +36,49 @@ module OCI
|
|
|
36
36
|
# @return [OCI::Waas::Models::CertificateSubjectName]
|
|
37
37
|
attr_accessor :subject_name
|
|
38
38
|
|
|
39
|
-
# @return [OCI::Waas::Models::
|
|
39
|
+
# @return [OCI::Waas::Models::CertificateIssuerName]
|
|
40
40
|
attr_accessor :issuer_name
|
|
41
41
|
|
|
42
|
+
# **[Required]** A unique, positive integer assigned by the Certificate Authority (CA). The issuer name and serial number identify a unique certificate.
|
|
42
43
|
# @return [String]
|
|
43
44
|
attr_accessor :serial_number
|
|
44
45
|
|
|
46
|
+
# **[Required]** The version of the encoded certificate.
|
|
45
47
|
# @return [Integer]
|
|
46
48
|
attr_accessor :version
|
|
47
49
|
|
|
50
|
+
# **[Required]** The identifier for the cryptographic algorithm used by the Certificate Authority (CA) to sign this certificate.
|
|
48
51
|
# @return [String]
|
|
49
52
|
attr_accessor :signature_algorithm
|
|
50
53
|
|
|
54
|
+
# **[Required]** The date and time the certificate will become valid, expressed in RFC 3339 timestamp format.
|
|
51
55
|
# @return [DateTime]
|
|
52
56
|
attr_accessor :time_not_valid_before
|
|
53
57
|
|
|
54
|
-
# The date and time the certificate will expire, expressed in RFC 3339 timestamp format.
|
|
58
|
+
# **[Required]** The date and time the certificate will expire, expressed in RFC 3339 timestamp format.
|
|
55
59
|
# @return [DateTime]
|
|
56
60
|
attr_accessor :time_not_valid_after
|
|
57
61
|
|
|
58
62
|
# @return [OCI::Waas::Models::CertificatePublicKeyInfo]
|
|
59
63
|
attr_accessor :public_key_info
|
|
60
64
|
|
|
65
|
+
# Additional attributes associated with users or public keys for managing relationships between Certificate Authorities.
|
|
61
66
|
# @return [Array<OCI::Waas::Models::CertificateExtensions>]
|
|
62
67
|
attr_accessor :extensions
|
|
63
68
|
|
|
64
|
-
#
|
|
69
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
|
70
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
|
71
|
+
#
|
|
72
|
+
# Example: `{\"Department\": \"Finance\"}`
|
|
73
|
+
#
|
|
65
74
|
# @return [Hash<String, String>]
|
|
66
75
|
attr_accessor :freeform_tags
|
|
67
76
|
|
|
68
|
-
#
|
|
77
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
|
78
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
|
79
|
+
#
|
|
80
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
|
81
|
+
#
|
|
69
82
|
# @return [Hash<String, Hash<String, Object>>]
|
|
70
83
|
attr_accessor :defined_tags
|
|
71
84
|
|
|
@@ -111,7 +124,7 @@ module OCI
|
|
|
111
124
|
'display_name': :'String',
|
|
112
125
|
'issued_by': :'String',
|
|
113
126
|
'subject_name': :'OCI::Waas::Models::CertificateSubjectName',
|
|
114
|
-
'issuer_name': :'OCI::Waas::Models::
|
|
127
|
+
'issuer_name': :'OCI::Waas::Models::CertificateIssuerName',
|
|
115
128
|
'serial_number': :'String',
|
|
116
129
|
'version': :'Integer',
|
|
117
130
|
'signature_algorithm': :'String',
|
|
@@ -138,7 +151,7 @@ module OCI
|
|
|
138
151
|
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
|
139
152
|
# @option attributes [String] :issued_by The value to assign to the {#issued_by} property
|
|
140
153
|
# @option attributes [OCI::Waas::Models::CertificateSubjectName] :subject_name The value to assign to the {#subject_name} property
|
|
141
|
-
# @option attributes [OCI::Waas::Models::
|
|
154
|
+
# @option attributes [OCI::Waas::Models::CertificateIssuerName] :issuer_name The value to assign to the {#issuer_name} property
|
|
142
155
|
# @option attributes [String] :serial_number The value to assign to the {#serial_number} property
|
|
143
156
|
# @option attributes [Integer] :version The value to assign to the {#version} property
|
|
144
157
|
# @option attributes [String] :signature_algorithm The value to assign to the {#signature_algorithm} property
|