oci 2.5.10 → 2.5.11
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +4 -1
- data/lib/oci.rb +3 -0
- data/lib/oci/budget/budget.rb +1 -0
- data/lib/oci/budget/budget_client.rb +21 -1
- data/lib/oci/budget/models/budget.rb +52 -2
- data/lib/oci/budget/models/budget_summary.rb +52 -2
- data/lib/oci/budget/models/create_budget_details.rb +55 -2
- data/lib/oci/budget/models/target_type.rb +10 -0
- data/lib/oci/core/blockstorage_client.rb +18 -6
- data/lib/oci/core/compute_client.rb +75 -0
- data/lib/oci/core/compute_management_client.rb +4 -1
- data/lib/oci/core/core.rb +12 -0
- data/lib/oci/core/models/add_security_rule_details.rb +2 -2
- data/lib/oci/core/models/boot_volume_backup.rb +19 -1
- data/lib/oci/core/models/change_boot_volume_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_boot_volume_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_cpe_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_cross_connect_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_cross_connect_group_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_instance_compartment_details.rb +154 -0
- data/lib/oci/core/models/change_ip_sec_connection_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_remote_peering_connection_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_virtual_circuit_compartment_details.rb +155 -0
- data/lib/oci/core/models/change_volume_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_group_backup_compartment_details.rb +2 -2
- data/lib/oci/core/models/change_volume_group_compartment_details.rb +2 -2
- data/lib/oci/core/models/copy_volume_backup_details.rb +27 -4
- data/lib/oci/core/models/create_cross_connect_details.rb +37 -1
- data/lib/oci/core/models/create_cross_connect_group_details.rb +40 -4
- data/lib/oci/core/models/create_instance_configuration_base.rb +250 -0
- data/lib/oci/core/models/create_instance_configuration_details.rb +15 -57
- data/lib/oci/core/models/create_instance_configuration_from_instance_details.rb +179 -0
- data/lib/oci/core/models/create_ipv6_details.rb +249 -0
- data/lib/oci/core/models/create_remote_peering_connection_details.rb +40 -4
- data/lib/oci/core/models/create_service_gateway_details.rb +23 -1
- data/lib/oci/core/models/create_subnet_details.rb +24 -1
- data/lib/oci/core/models/create_vcn_details.rb +56 -4
- data/lib/oci/core/models/create_virtual_circuit_details.rb +38 -2
- data/lib/oci/core/models/cross_connect.rb +37 -1
- data/lib/oci/core/models/cross_connect_group.rb +37 -1
- data/lib/oci/core/models/cross_connect_mapping.rb +50 -1
- data/lib/oci/core/models/egress_security_rule.rb +10 -7
- data/lib/oci/core/models/ingress_security_rule.rb +10 -7
- data/lib/oci/core/models/instance.rb +1 -0
- data/lib/oci/core/models/ipv6.rb +375 -0
- data/lib/oci/core/models/private_ip.rb +1 -0
- data/lib/oci/core/models/remote_peering_connection.rb +37 -1
- data/lib/oci/core/models/route_rule.rb +4 -1
- data/lib/oci/core/models/security_rule.rb +2 -2
- data/lib/oci/core/models/service_gateway.rb +18 -1
- data/lib/oci/core/models/subnet.rb +56 -1
- data/lib/oci/core/models/update_cross_connect_details.rb +37 -1
- data/lib/oci/core/models/update_cross_connect_group_details.rb +40 -4
- data/lib/oci/core/models/update_ipv6_details.rb +229 -0
- data/lib/oci/core/models/update_remote_peering_connection_details.rb +40 -4
- data/lib/oci/core/models/update_security_rule_details.rb +2 -2
- data/lib/oci/core/models/update_service_gateway_details.rb +18 -1
- data/lib/oci/core/models/update_virtual_circuit_details.rb +37 -1
- data/lib/oci/core/models/vcn.rb +42 -1
- data/lib/oci/core/models/virtual_circuit.rb +37 -1
- data/lib/oci/core/models/volume_backup.rb +19 -1
- data/lib/oci/core/virtual_network_client.rb +744 -10
- data/lib/oci/core/virtual_network_client_composite_operations.rb +119 -0
- data/lib/oci/database/database.rb +3 -0
- data/lib/oci/database/database_client.rb +320 -36
- data/lib/oci/database/models/autonomous_data_warehouse.rb +1 -0
- data/lib/oci/database/models/autonomous_data_warehouse_console_token_details.rb +164 -0
- data/lib/oci/database/models/autonomous_data_warehouse_summary.rb +1 -0
- data/lib/oci/database/models/autonomous_database.rb +5 -3
- data/lib/oci/database/models/autonomous_database_connection_urls.rb +1 -1
- data/lib/oci/database/models/autonomous_database_console_token_details.rb +163 -0
- data/lib/oci/database/models/autonomous_database_summary.rb +5 -3
- data/lib/oci/database/models/autonomous_db_preview_version_summary.rb +1 -3
- data/lib/oci/database/models/change_compartment_details.rb +155 -0
- data/lib/oci/database/models/create_autonomous_database_base.rb +5 -4
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +2 -5
- data/lib/oci/database/models/create_database_details.rb +1 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_details.rb +2 -1
- data/lib/oci/database/models/create_db_home_with_db_system_id_from_backup_details.rb +2 -1
- data/lib/oci/database/models/db_system.rb +2 -5
- data/lib/oci/database/models/db_system_summary.rb +2 -5
- data/lib/oci/database/models/launch_db_system_base.rb +3 -5
- data/lib/oci/database/models/maintenance_window.rb +2 -1
- data/lib/oci/database/models/update_autonomous_database_details.rb +5 -3
- data/lib/oci/database/models/update_db_system_details.rb +2 -5
- data/lib/oci/dns/dns.rb +2 -0
- data/lib/oci/dns/dns_client.rb +138 -1
- data/lib/oci/dns/models/change_steering_policy_compartment_details.rb +155 -0
- data/lib/oci/dns/models/change_zone_compartment_details.rb +155 -0
- data/lib/oci/events/events.rb +34 -0
- data/lib/oci/events/events_client.rb +537 -0
- data/lib/oci/events/events_client_composite_operations.rb +145 -0
- data/lib/oci/events/models/action.rb +275 -0
- data/lib/oci/events/models/action_details.rb +222 -0
- data/lib/oci/events/models/action_details_list.rb +150 -0
- data/lib/oci/events/models/action_list.rb +151 -0
- data/lib/oci/events/models/change_rule_compartment_details.rb +156 -0
- data/lib/oci/events/models/create_faa_s_action_details.rb +170 -0
- data/lib/oci/events/models/create_notification_service_action_details.rb +170 -0
- data/lib/oci/events/models/create_rule_details.rb +284 -0
- data/lib/oci/events/models/create_streaming_service_action_details.rb +170 -0
- data/lib/oci/events/models/faa_s_action.rb +178 -0
- data/lib/oci/events/models/notification_service_action.rb +179 -0
- data/lib/oci/events/models/rule.rb +372 -0
- data/lib/oci/events/models/rule_summary.rb +321 -0
- data/lib/oci/events/models/streaming_service_action.rb +178 -0
- data/lib/oci/events/models/update_rule_details.rb +266 -0
- data/lib/oci/events/util.rb +2 -0
- data/lib/oci/functions/functions.rb +29 -0
- data/lib/oci/functions/functions_invoke_client.rb +237 -0
- data/lib/oci/functions/functions_invoke_client_composite_operations.rb +24 -0
- data/lib/oci/functions/functions_management_client.rb +851 -0
- data/lib/oci/functions/functions_management_client_composite_operations.rb +266 -0
- data/lib/oci/functions/models/application.rb +322 -0
- data/lib/oci/functions/models/application_summary.rb +281 -0
- data/lib/oci/functions/models/change_application_compartment_details.rb +156 -0
- data/lib/oci/functions/models/create_application_details.rb +236 -0
- data/lib/oci/functions/models/create_function_details.rb +280 -0
- data/lib/oci/functions/models/function.rb +397 -0
- data/lib/oci/functions/models/function_summary.rb +381 -0
- data/lib/oci/functions/models/update_application_details.rb +191 -0
- data/lib/oci/functions/models/update_function_details.rb +250 -0
- data/lib/oci/functions/util.rb +2 -0
- data/lib/oci/healthchecks/health_checks_client.rb +147 -1
- data/lib/oci/healthchecks/healthchecks.rb +2 -0
- data/lib/oci/healthchecks/models/change_http_monitor_compartment_details.rb +155 -0
- data/lib/oci/healthchecks/models/change_ping_monitor_compartment_details.rb +155 -0
- data/lib/oci/healthchecks/models/create_http_monitor_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_on_demand_http_probe_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_on_demand_ping_probe_details.rb +2 -1
- data/lib/oci/healthchecks/models/create_ping_monitor_details.rb +2 -1
- data/lib/oci/healthchecks/models/http_monitor.rb +2 -0
- data/lib/oci/healthchecks/models/http_probe.rb +2 -0
- data/lib/oci/healthchecks/models/ping_monitor.rb +2 -0
- data/lib/oci/healthchecks/models/ping_probe.rb +2 -0
- data/lib/oci/healthchecks/models/update_http_monitor_details.rb +2 -0
- data/lib/oci/healthchecks/models/update_ping_monitor_details.rb +2 -0
- data/lib/oci/identity/identity.rb +1 -0
- data/lib/oci/identity/identity_client.rb +70 -0
- data/lib/oci/identity/identity_client_composite_operations.rb +50 -0
- data/lib/oci/identity/models/move_compartment_details.rb +155 -0
- data/lib/oci/key_management/key_management.rb +2 -0
- data/lib/oci/key_management/kms_management_client.rb +73 -0
- data/lib/oci/key_management/kms_vault_client.rb +73 -0
- data/lib/oci/key_management/models/change_key_compartment_details.rb +153 -0
- data/lib/oci/key_management/models/change_vault_compartment_details.rb +153 -0
- data/lib/oci/key_management/models/key.rb +1 -0
- data/lib/oci/key_management/models/key_summary.rb +1 -0
- data/lib/oci/key_management/models/vault.rb +1 -0
- data/lib/oci/key_management/models/vault_summary.rb +1 -0
- data/lib/oci/limits/limits.rb +23 -0
- data/lib/oci/limits/models/create_quota_details.rb +220 -0
- data/lib/oci/limits/models/quota.rb +287 -0
- data/lib/oci/limits/models/quota_summary.rb +273 -0
- data/lib/oci/limits/models/update_quota_details.rb +194 -0
- data/lib/oci/limits/quotas_client.rb +439 -0
- data/lib/oci/limits/quotas_client_composite_operations.rb +143 -0
- data/lib/oci/limits/util.rb +2 -0
- data/lib/oci/load_balancer/load_balancer.rb +9 -0
- data/lib/oci/load_balancer/load_balancer_client.rb +139 -0
- data/lib/oci/load_balancer/load_balancer_client_composite_operations.rb +50 -0
- data/lib/oci/load_balancer/models/allow_rule.rb +181 -0
- data/lib/oci/load_balancer/models/backend_set.rb +21 -4
- data/lib/oci/load_balancer/models/backend_set_details.rb +21 -4
- data/lib/oci/load_balancer/models/change_load_balancer_compartment_details.rb +156 -0
- data/lib/oci/load_balancer/models/control_access_using_http_methods_rule.rb +205 -0
- data/lib/oci/load_balancer/models/create_backend_set_details.rb +21 -4
- data/lib/oci/load_balancer/models/create_load_balancer_details.rb +37 -1
- data/lib/oci/load_balancer/models/lb_cookie_session_persistence_configuration_details.rb +334 -0
- data/lib/oci/load_balancer/models/listener_rule_summary.rb +166 -0
- data/lib/oci/load_balancer/models/rule.rb +4 -0
- data/lib/oci/load_balancer/models/rule_condition.rb +192 -0
- data/lib/oci/load_balancer/models/session_persistence_configuration_details.rb +6 -0
- data/lib/oci/load_balancer/models/source_ip_address_condition.rb +167 -0
- data/lib/oci/load_balancer/models/source_vcn_id_condition.rb +169 -0
- data/lib/oci/load_balancer/models/source_vcn_ip_address_condition.rb +171 -0
- data/lib/oci/load_balancer/models/update_backend_set_details.rb +21 -4
- data/lib/oci/monitoring/models/alarm.rb +4 -3
- data/lib/oci/monitoring/models/alarm_summary.rb +4 -3
- data/lib/oci/monitoring/models/change_alarm_compartment_details.rb +155 -0
- data/lib/oci/monitoring/models/create_alarm_details.rb +4 -3
- data/lib/oci/monitoring/models/datapoint.rb +1 -1
- data/lib/oci/monitoring/models/list_metrics_details.rb +4 -4
- data/lib/oci/monitoring/models/metric_data.rb +14 -0
- data/lib/oci/monitoring/models/metric_data_details.rb +6 -4
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +3 -0
- data/lib/oci/monitoring/models/update_alarm_details.rb +4 -3
- data/lib/oci/monitoring/monitoring.rb +1 -0
- data/lib/oci/monitoring/monitoring_client.rb +140 -5
- data/lib/oci/ons/models/backoff_retry_policy.rb +2 -2
- data/lib/oci/ons/models/change_compartment_details.rb +156 -0
- data/lib/oci/ons/models/confirmation_result.rb +5 -6
- data/lib/oci/ons/models/create_topic_details.rb +1 -1
- data/lib/oci/ons/models/notification_topic.rb +2 -2
- data/lib/oci/ons/models/notification_topic_summary.rb +2 -2
- data/lib/oci/ons/models/subscription.rb +47 -4
- data/lib/oci/ons/models/subscription_summary.rb +19 -3
- data/lib/oci/ons/notification_control_plane_client.rb +95 -8
- data/lib/oci/ons/notification_data_plane_client.rb +109 -8
- data/lib/oci/ons/ons.rb +1 -0
- data/lib/oci/regions.rb +3 -0
- data/lib/oci/streaming/models/change_stream_compartment_details.rb +155 -0
- data/lib/oci/streaming/stream_admin_client.rb +58 -0
- data/lib/oci/streaming/streaming.rb +1 -0
- data/lib/oci/version.rb +1 -1
- data/lib/oci/waas/models/access_rule_criteria.rb +14 -2
- data/lib/oci/waas/models/change_certificate_compartment_details.rb +154 -0
- data/lib/oci/waas/models/change_waas_policy_compartment_details.rb +154 -0
- data/lib/oci/waas/models/create_certificate_details.rb +2 -2
- data/lib/oci/waas/models/protection_rule_exclusion.rb +16 -1
- data/lib/oci/waas/models/protection_settings.rb +9 -5
- data/lib/oci/waas/models/waas_policy.rb +1 -1
- data/lib/oci/waas/models/waf_config_details.rb +8 -8
- data/lib/oci/waas/models/waf_log.rb +40 -19
- data/lib/oci/waas/waas.rb +2 -0
- data/lib/oci/waas/waas_client.rb +155 -27
- data/lib/oci/work_requests/models/work_request.rb +14 -8
- data/lib/oci/work_requests/models/work_request_error.rb +3 -3
- data/lib/oci/work_requests/models/work_request_log_entry.rb +2 -2
- data/lib/oci/work_requests/models/work_request_resource.rb +9 -7
- data/lib/oci/work_requests/models/work_request_summary.rb +12 -6
- data/lib/oci/work_requests/work_request_client.rb +33 -16
- metadata +81 -2
@@ -18,6 +18,7 @@ module OCI
|
|
18
18
|
LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze,
|
19
19
|
LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze,
|
20
20
|
LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze,
|
21
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
21
22
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
22
23
|
].freeze
|
23
24
|
|
@@ -18,6 +18,7 @@ module OCI
|
|
18
18
|
LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze,
|
19
19
|
LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze,
|
20
20
|
LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze,
|
21
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
21
22
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
22
23
|
].freeze
|
23
24
|
|
@@ -15,6 +15,7 @@ module OCI
|
|
15
15
|
LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze,
|
16
16
|
LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze,
|
17
17
|
LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze,
|
18
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
18
19
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
19
20
|
].freeze
|
20
21
|
|
@@ -15,6 +15,7 @@ module OCI
|
|
15
15
|
LIFECYCLE_STATE_PENDING_DELETION = 'PENDING_DELETION'.freeze,
|
16
16
|
LIFECYCLE_STATE_SCHEDULING_DELETION = 'SCHEDULING_DELETION'.freeze,
|
17
17
|
LIFECYCLE_STATE_CANCELLING_DELETION = 'CANCELLING_DELETION'.freeze,
|
18
|
+
LIFECYCLE_STATE_UPDATING = 'UPDATING'.freeze,
|
18
19
|
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
19
20
|
].freeze
|
20
21
|
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
module OCI
|
4
|
+
module Limits
|
5
|
+
# Module containing models for requests made to, and responses received from,
|
6
|
+
# OCI Limits services
|
7
|
+
module Models
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
# Require models
|
13
|
+
require 'oci/limits/models/create_quota_details'
|
14
|
+
require 'oci/limits/models/quota'
|
15
|
+
require 'oci/limits/models/quota_summary'
|
16
|
+
require 'oci/limits/models/update_quota_details'
|
17
|
+
|
18
|
+
# Require generated clients
|
19
|
+
require 'oci/limits/quotas_client'
|
20
|
+
require 'oci/limits/quotas_client_composite_operations'
|
21
|
+
|
22
|
+
# Require service utilities
|
23
|
+
require 'oci/limits/util'
|
@@ -0,0 +1,220 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
|
5
|
+
# rubocop:disable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
6
|
+
module OCI
|
7
|
+
# Request object for create quota operation.
|
8
|
+
class Limits::Models::CreateQuotaDetails
|
9
|
+
# **[Required]** The OCID of the compartment containing the resource this quota applies to.
|
10
|
+
# @return [String]
|
11
|
+
attr_accessor :compartment_id
|
12
|
+
|
13
|
+
# **[Required]** The description you assign to the quota.
|
14
|
+
# @return [String]
|
15
|
+
attr_accessor :description
|
16
|
+
|
17
|
+
# **[Required]** The name you assign to the quota during creation. The name must be unique across all quotas
|
18
|
+
# in the tenancy and cannot be changed.
|
19
|
+
#
|
20
|
+
# @return [String]
|
21
|
+
attr_accessor :name
|
22
|
+
|
23
|
+
# **[Required]** An array of quota statements written in the declarative language.
|
24
|
+
#
|
25
|
+
# @return [Array<String>]
|
26
|
+
attr_accessor :statements
|
27
|
+
|
28
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
29
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
30
|
+
# Example: `{\"Department\": \"Finance\"}`
|
31
|
+
#
|
32
|
+
# @return [Hash<String, String>]
|
33
|
+
attr_accessor :freeform_tags
|
34
|
+
|
35
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
36
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
37
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
38
|
+
#
|
39
|
+
# @return [Hash<String, Hash<String, Object>>]
|
40
|
+
attr_accessor :defined_tags
|
41
|
+
|
42
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
43
|
+
def self.attribute_map
|
44
|
+
{
|
45
|
+
# rubocop:disable Style/SymbolLiteral
|
46
|
+
'compartment_id': :'compartmentId',
|
47
|
+
'description': :'description',
|
48
|
+
'name': :'name',
|
49
|
+
'statements': :'statements',
|
50
|
+
'freeform_tags': :'freeformTags',
|
51
|
+
'defined_tags': :'definedTags'
|
52
|
+
# rubocop:enable Style/SymbolLiteral
|
53
|
+
}
|
54
|
+
end
|
55
|
+
|
56
|
+
# Attribute type mapping.
|
57
|
+
def self.swagger_types
|
58
|
+
{
|
59
|
+
# rubocop:disable Style/SymbolLiteral
|
60
|
+
'compartment_id': :'String',
|
61
|
+
'description': :'String',
|
62
|
+
'name': :'String',
|
63
|
+
'statements': :'Array<String>',
|
64
|
+
'freeform_tags': :'Hash<String, String>',
|
65
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
66
|
+
# rubocop:enable Style/SymbolLiteral
|
67
|
+
}
|
68
|
+
end
|
69
|
+
|
70
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
71
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
72
|
+
|
73
|
+
|
74
|
+
# Initializes the object
|
75
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
76
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
77
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
78
|
+
# @option attributes [String] :name The value to assign to the {#name} property
|
79
|
+
# @option attributes [Array<String>] :statements The value to assign to the {#statements} property
|
80
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
81
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
82
|
+
def initialize(attributes = {})
|
83
|
+
return unless attributes.is_a?(Hash)
|
84
|
+
|
85
|
+
# convert string to symbol for hash key
|
86
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
87
|
+
|
88
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
89
|
+
|
90
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
91
|
+
|
92
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
93
|
+
|
94
|
+
self.description = attributes[:'description'] if attributes[:'description']
|
95
|
+
|
96
|
+
self.name = attributes[:'name'] if attributes[:'name']
|
97
|
+
|
98
|
+
self.statements = attributes[:'statements'] if attributes[:'statements']
|
99
|
+
|
100
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
101
|
+
|
102
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
103
|
+
|
104
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
105
|
+
|
106
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
107
|
+
|
108
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
109
|
+
|
110
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
111
|
+
end
|
112
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
113
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
114
|
+
|
115
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
116
|
+
|
117
|
+
|
118
|
+
# Checks equality by comparing each attribute.
|
119
|
+
# @param [Object] other the other object to be compared
|
120
|
+
def ==(other)
|
121
|
+
return true if equal?(other)
|
122
|
+
|
123
|
+
self.class == other.class &&
|
124
|
+
compartment_id == other.compartment_id &&
|
125
|
+
description == other.description &&
|
126
|
+
name == other.name &&
|
127
|
+
statements == other.statements &&
|
128
|
+
freeform_tags == other.freeform_tags &&
|
129
|
+
defined_tags == other.defined_tags
|
130
|
+
end
|
131
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
132
|
+
|
133
|
+
# @see the `==` method
|
134
|
+
# @param [Object] other the other object to be compared
|
135
|
+
def eql?(other)
|
136
|
+
self == other
|
137
|
+
end
|
138
|
+
|
139
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
140
|
+
|
141
|
+
|
142
|
+
# Calculates hash code according to all attributes.
|
143
|
+
# @return [Fixnum] Hash code
|
144
|
+
def hash
|
145
|
+
[compartment_id, description, name, statements, freeform_tags, defined_tags].hash
|
146
|
+
end
|
147
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
148
|
+
|
149
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
150
|
+
|
151
|
+
|
152
|
+
# Builds the object from hash
|
153
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
154
|
+
# @return [Object] Returns the model itself
|
155
|
+
def build_from_hash(attributes)
|
156
|
+
return nil unless attributes.is_a?(Hash)
|
157
|
+
|
158
|
+
self.class.swagger_types.each_pair do |key, type|
|
159
|
+
if type =~ /^Array<(.*)>/i
|
160
|
+
# check to ensure the input is an array given that the the attribute
|
161
|
+
# is documented as an array but the input is not
|
162
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
163
|
+
public_method("#{key}=").call(
|
164
|
+
attributes[self.class.attribute_map[key]]
|
165
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
166
|
+
)
|
167
|
+
end
|
168
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
169
|
+
public_method("#{key}=").call(
|
170
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
171
|
+
)
|
172
|
+
end
|
173
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
174
|
+
end
|
175
|
+
|
176
|
+
self
|
177
|
+
end
|
178
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
179
|
+
|
180
|
+
# Returns the string representation of the object
|
181
|
+
# @return [String] String presentation of the object
|
182
|
+
def to_s
|
183
|
+
to_hash.to_s
|
184
|
+
end
|
185
|
+
|
186
|
+
# Returns the object in the form of hash
|
187
|
+
# @return [Hash] Returns the object in the form of hash
|
188
|
+
def to_hash
|
189
|
+
hash = {}
|
190
|
+
self.class.attribute_map.each_pair do |attr, param|
|
191
|
+
value = public_method(attr).call
|
192
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
193
|
+
|
194
|
+
hash[param] = _to_hash(value)
|
195
|
+
end
|
196
|
+
hash
|
197
|
+
end
|
198
|
+
|
199
|
+
private
|
200
|
+
|
201
|
+
# Outputs non-array value in the form of hash
|
202
|
+
# For object, use to_hash. Otherwise, just return the value
|
203
|
+
# @param [Object] value Any valid value
|
204
|
+
# @return [Hash] Returns the value in the form of hash
|
205
|
+
def _to_hash(value)
|
206
|
+
if value.is_a?(Array)
|
207
|
+
value.compact.map { |v| _to_hash(v) }
|
208
|
+
elsif value.is_a?(Hash)
|
209
|
+
{}.tap do |hash|
|
210
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
211
|
+
end
|
212
|
+
elsif value.respond_to? :to_hash
|
213
|
+
value.to_hash
|
214
|
+
else
|
215
|
+
value
|
216
|
+
end
|
217
|
+
end
|
218
|
+
end
|
219
|
+
end
|
220
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|
@@ -0,0 +1,287 @@
|
|
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
|
+
# Quotas are applied on top of the service limits and inherited through the nested compartment hierarchy.
|
9
|
+
# They allow compartment admins to limit resource consumption and set boundaries around acceptable resource use.
|
10
|
+
# The word \"quota\" is used by people in different ways:
|
11
|
+
# * An individual statement written in the declarative language
|
12
|
+
# * A collection of statements in a single, named \"quota\" object (which has an Oracle Cloud ID (OCID) assigned to it)
|
13
|
+
# * The overall body of quotas your organization uses to control access to resources
|
14
|
+
#
|
15
|
+
class Limits::Models::Quota
|
16
|
+
LIFECYCLE_STATE_ENUM = [
|
17
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
|
18
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
19
|
+
].freeze
|
20
|
+
|
21
|
+
# **[Required]** The OCID of the quota.
|
22
|
+
# @return [String]
|
23
|
+
attr_accessor :id
|
24
|
+
|
25
|
+
# **[Required]** The OCID of the compartment containing the resource this quota applies to.
|
26
|
+
#
|
27
|
+
# @return [String]
|
28
|
+
attr_accessor :compartment_id
|
29
|
+
|
30
|
+
# **[Required]** The name you assign to the quota during creation. The name must be unique across all quotas
|
31
|
+
# in the tenancy and cannot be changed.
|
32
|
+
#
|
33
|
+
# @return [String]
|
34
|
+
attr_accessor :name
|
35
|
+
|
36
|
+
# **[Required]** An array of one or more quota statements written in the declarative language.
|
37
|
+
# @return [Array<String>]
|
38
|
+
attr_accessor :statements
|
39
|
+
|
40
|
+
# **[Required]** The description you assign to the quota.
|
41
|
+
# @return [String]
|
42
|
+
attr_accessor :description
|
43
|
+
|
44
|
+
# **[Required]** Date and time the quota was created, in the format defined by RFC3339.
|
45
|
+
# Example: `2016-08-25T21:10:29.600Z`
|
46
|
+
#
|
47
|
+
# @return [DateTime]
|
48
|
+
attr_accessor :time_created
|
49
|
+
|
50
|
+
# The quota's current state. After creating a quota, make sure its `lifecycleState` is set to
|
51
|
+
# ACTIVE before using it.
|
52
|
+
#
|
53
|
+
# @return [String]
|
54
|
+
attr_reader :lifecycle_state
|
55
|
+
|
56
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
57
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
58
|
+
# Example: `{\"Department\": \"Finance\"}`
|
59
|
+
#
|
60
|
+
# @return [Hash<String, String>]
|
61
|
+
attr_accessor :freeform_tags
|
62
|
+
|
63
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
64
|
+
# For more information, see [Resource Tags](https://docs.cloud.oracle.com/Content/General/Concepts/resourcetags.htm).
|
65
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
66
|
+
#
|
67
|
+
# @return [Hash<String, Hash<String, Object>>]
|
68
|
+
attr_accessor :defined_tags
|
69
|
+
|
70
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
71
|
+
def self.attribute_map
|
72
|
+
{
|
73
|
+
# rubocop:disable Style/SymbolLiteral
|
74
|
+
'id': :'id',
|
75
|
+
'compartment_id': :'compartmentId',
|
76
|
+
'name': :'name',
|
77
|
+
'statements': :'statements',
|
78
|
+
'description': :'description',
|
79
|
+
'time_created': :'timeCreated',
|
80
|
+
'lifecycle_state': :'lifecycleState',
|
81
|
+
'freeform_tags': :'freeformTags',
|
82
|
+
'defined_tags': :'definedTags'
|
83
|
+
# rubocop:enable Style/SymbolLiteral
|
84
|
+
}
|
85
|
+
end
|
86
|
+
|
87
|
+
# Attribute type mapping.
|
88
|
+
def self.swagger_types
|
89
|
+
{
|
90
|
+
# rubocop:disable Style/SymbolLiteral
|
91
|
+
'id': :'String',
|
92
|
+
'compartment_id': :'String',
|
93
|
+
'name': :'String',
|
94
|
+
'statements': :'Array<String>',
|
95
|
+
'description': :'String',
|
96
|
+
'time_created': :'DateTime',
|
97
|
+
'lifecycle_state': :'String',
|
98
|
+
'freeform_tags': :'Hash<String, String>',
|
99
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
100
|
+
# rubocop:enable Style/SymbolLiteral
|
101
|
+
}
|
102
|
+
end
|
103
|
+
|
104
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
105
|
+
# rubocop:disable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
106
|
+
|
107
|
+
|
108
|
+
# Initializes the object
|
109
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
110
|
+
# @option attributes [String] :id The value to assign to the {#id} property
|
111
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
112
|
+
# @option attributes [String] :name The value to assign to the {#name} property
|
113
|
+
# @option attributes [Array<String>] :statements The value to assign to the {#statements} property
|
114
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
115
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
116
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
117
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
118
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
119
|
+
def initialize(attributes = {})
|
120
|
+
return unless attributes.is_a?(Hash)
|
121
|
+
|
122
|
+
# convert string to symbol for hash key
|
123
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
124
|
+
|
125
|
+
self.id = attributes[:'id'] if attributes[:'id']
|
126
|
+
|
127
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
128
|
+
|
129
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
130
|
+
|
131
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
132
|
+
|
133
|
+
self.name = attributes[:'name'] if attributes[:'name']
|
134
|
+
|
135
|
+
self.statements = attributes[:'statements'] if attributes[:'statements']
|
136
|
+
|
137
|
+
self.description = attributes[:'description'] if attributes[:'description']
|
138
|
+
|
139
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
140
|
+
|
141
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
142
|
+
|
143
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
144
|
+
|
145
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
146
|
+
|
147
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
148
|
+
|
149
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
150
|
+
|
151
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
152
|
+
|
153
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
154
|
+
|
155
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
156
|
+
|
157
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
158
|
+
|
159
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
160
|
+
|
161
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
162
|
+
end
|
163
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
164
|
+
# rubocop:enable Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
165
|
+
|
166
|
+
# Custom attribute writer method checking allowed values (enum).
|
167
|
+
# @param [Object] lifecycle_state Object to be assigned
|
168
|
+
def lifecycle_state=(lifecycle_state)
|
169
|
+
# rubocop:disable Style/ConditionalAssignment
|
170
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
171
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
172
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
173
|
+
else
|
174
|
+
@lifecycle_state = lifecycle_state
|
175
|
+
end
|
176
|
+
# rubocop:enable Style/ConditionalAssignment
|
177
|
+
end
|
178
|
+
|
179
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
180
|
+
|
181
|
+
|
182
|
+
# Checks equality by comparing each attribute.
|
183
|
+
# @param [Object] other the other object to be compared
|
184
|
+
def ==(other)
|
185
|
+
return true if equal?(other)
|
186
|
+
|
187
|
+
self.class == other.class &&
|
188
|
+
id == other.id &&
|
189
|
+
compartment_id == other.compartment_id &&
|
190
|
+
name == other.name &&
|
191
|
+
statements == other.statements &&
|
192
|
+
description == other.description &&
|
193
|
+
time_created == other.time_created &&
|
194
|
+
lifecycle_state == other.lifecycle_state &&
|
195
|
+
freeform_tags == other.freeform_tags &&
|
196
|
+
defined_tags == other.defined_tags
|
197
|
+
end
|
198
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Layout/EmptyLines
|
199
|
+
|
200
|
+
# @see the `==` method
|
201
|
+
# @param [Object] other the other object to be compared
|
202
|
+
def eql?(other)
|
203
|
+
self == other
|
204
|
+
end
|
205
|
+
|
206
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
207
|
+
|
208
|
+
|
209
|
+
# Calculates hash code according to all attributes.
|
210
|
+
# @return [Fixnum] Hash code
|
211
|
+
def hash
|
212
|
+
[id, compartment_id, name, statements, description, time_created, lifecycle_state, freeform_tags, defined_tags].hash
|
213
|
+
end
|
214
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
215
|
+
|
216
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
217
|
+
|
218
|
+
|
219
|
+
# Builds the object from hash
|
220
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
221
|
+
# @return [Object] Returns the model itself
|
222
|
+
def build_from_hash(attributes)
|
223
|
+
return nil unless attributes.is_a?(Hash)
|
224
|
+
|
225
|
+
self.class.swagger_types.each_pair do |key, type|
|
226
|
+
if type =~ /^Array<(.*)>/i
|
227
|
+
# check to ensure the input is an array given that the the attribute
|
228
|
+
# is documented as an array but the input is not
|
229
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
230
|
+
public_method("#{key}=").call(
|
231
|
+
attributes[self.class.attribute_map[key]]
|
232
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
233
|
+
)
|
234
|
+
end
|
235
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
236
|
+
public_method("#{key}=").call(
|
237
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
238
|
+
)
|
239
|
+
end
|
240
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
241
|
+
end
|
242
|
+
|
243
|
+
self
|
244
|
+
end
|
245
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
246
|
+
|
247
|
+
# Returns the string representation of the object
|
248
|
+
# @return [String] String presentation of the object
|
249
|
+
def to_s
|
250
|
+
to_hash.to_s
|
251
|
+
end
|
252
|
+
|
253
|
+
# Returns the object in the form of hash
|
254
|
+
# @return [Hash] Returns the object in the form of hash
|
255
|
+
def to_hash
|
256
|
+
hash = {}
|
257
|
+
self.class.attribute_map.each_pair do |attr, param|
|
258
|
+
value = public_method(attr).call
|
259
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
260
|
+
|
261
|
+
hash[param] = _to_hash(value)
|
262
|
+
end
|
263
|
+
hash
|
264
|
+
end
|
265
|
+
|
266
|
+
private
|
267
|
+
|
268
|
+
# Outputs non-array value in the form of hash
|
269
|
+
# For object, use to_hash. Otherwise, just return the value
|
270
|
+
# @param [Object] value Any valid value
|
271
|
+
# @return [Hash] Returns the value in the form of hash
|
272
|
+
def _to_hash(value)
|
273
|
+
if value.is_a?(Array)
|
274
|
+
value.compact.map { |v| _to_hash(v) }
|
275
|
+
elsif value.is_a?(Hash)
|
276
|
+
{}.tap do |hash|
|
277
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
278
|
+
end
|
279
|
+
elsif value.respond_to? :to_hash
|
280
|
+
value.to_hash
|
281
|
+
else
|
282
|
+
value
|
283
|
+
end
|
284
|
+
end
|
285
|
+
end
|
286
|
+
end
|
287
|
+
# rubocop:enable Lint/UnneededCopDisableDirective, Metrics/LineLength
|