oci 2.5.0 → 2.5.1
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 +5 -1
- data/lib/oci.rb +4 -0
- data/lib/oci/auth/federation_client.rb +4 -4
- data/lib/oci/auth/signers/instance_principals_security_token_signer.rb +22 -16
- data/lib/oci/autoscaling/auto_scaling_client.rb +774 -0
- data/lib/oci/autoscaling/auto_scaling_client_composite_operations.rb +24 -0
- data/lib/oci/autoscaling/autoscaling.rb +38 -0
- data/lib/oci/autoscaling/models/action.rb +182 -0
- data/lib/oci/autoscaling/models/auto_scaling_configuration.rb +282 -0
- data/lib/oci/autoscaling/models/auto_scaling_configuration_summary.rb +234 -0
- data/lib/oci/autoscaling/models/auto_scaling_policy.rb +222 -0
- data/lib/oci/autoscaling/models/auto_scaling_policy_summary.rb +179 -0
- data/lib/oci/autoscaling/models/capacity.rb +170 -0
- data/lib/oci/autoscaling/models/condition.rb +186 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_configuration_details.rb +256 -0
- data/lib/oci/autoscaling/models/create_auto_scaling_policy_details.rb +196 -0
- data/lib/oci/autoscaling/models/create_condition_details.rb +176 -0
- data/lib/oci/autoscaling/models/create_threshold_policy_details.rb +166 -0
- data/lib/oci/autoscaling/models/instance_pool_resource.rb +148 -0
- data/lib/oci/autoscaling/models/metric.rb +186 -0
- data/lib/oci/autoscaling/models/resource.rb +177 -0
- data/lib/oci/autoscaling/models/threshold.rb +188 -0
- data/lib/oci/autoscaling/models/threshold_policy.rb +173 -0
- data/lib/oci/autoscaling/models/update_auto_scaling_configuration_details.rb +219 -0
- data/lib/oci/autoscaling/models/update_auto_scaling_policy_details.rb +194 -0
- data/lib/oci/autoscaling/models/update_condition_details.rb +176 -0
- data/lib/oci/autoscaling/models/update_threshold_policy_details.rb +164 -0
- data/lib/oci/autoscaling/util.rb +2 -0
- data/lib/oci/core/blockstorage_client.rb +1 -1
- data/lib/oci/core/compute_client.rb +1 -1
- data/lib/oci/core/compute_management_client.rb +135 -1
- data/lib/oci/core/compute_management_client_composite_operations.rb +80 -0
- data/lib/oci/core/core.rb +8 -0
- data/lib/oci/core/models/attach_load_balancer_details.rb +191 -0
- data/lib/oci/core/models/create_instance_pool_details.rb +19 -4
- data/lib/oci/core/models/detach_load_balancer_details.rb +167 -0
- data/lib/oci/core/models/image.rb +14 -1
- data/lib/oci/core/models/instance.rb +18 -2
- data/lib/oci/core/models/instance_agent_config.rb +154 -0
- data/lib/oci/core/models/instance_agent_features.rb +154 -0
- data/lib/oci/core/models/instance_pool.rb +19 -4
- data/lib/oci/core/models/instance_pool_instance_load_balancer_backend.rb +219 -0
- data/lib/oci/core/models/instance_pool_load_balancer_attachment.rb +253 -0
- data/lib/oci/core/models/instance_summary.rb +19 -4
- data/lib/oci/core/models/launch_instance_agent_config_details.rb +155 -0
- data/lib/oci/core/models/launch_instance_details.rb +14 -1
- data/lib/oci/core/models/update_instance_agent_config_details.rb +154 -0
- data/lib/oci/core/models/update_instance_details.rb +16 -1
- data/lib/oci/core/virtual_network_client.rb +1 -1
- data/lib/oci/database/database_client.rb +12 -14
- data/lib/oci/database/models/autonomous_data_warehouse_connection_strings.rb +3 -1
- data/lib/oci/database/models/autonomous_database_connection_strings.rb +3 -1
- data/lib/oci/database/models/create_data_guard_association_details.rb +2 -7
- data/lib/oci/database/models/create_data_guard_association_to_existing_db_system_details.rb +5 -1
- data/lib/oci/database/models/create_data_guard_association_with_new_db_system_details.rb +4 -1
- data/lib/oci/database/models/database_summary.rb +1 -1
- data/lib/oci/database/models/db_node.rb +15 -1
- data/lib/oci/database/models/db_node_summary.rb +15 -1
- data/lib/oci/database/models/db_system.rb +15 -1
- data/lib/oci/database/models/db_system_summary.rb +15 -1
- data/lib/oci/database/models/db_version_summary.rb +1 -1
- data/lib/oci/database/models/launch_db_system_base.rb +33 -2
- data/lib/oci/database/models/launch_db_system_details.rb +5 -1
- data/lib/oci/database/models/launch_db_system_from_backup_details.rb +5 -1
- data/lib/oci/database/models/update_db_system_details.rb +1 -1
- data/lib/oci/identity/identity.rb +4 -0
- data/lib/oci/identity/identity_client.rb +468 -12
- data/lib/oci/identity/identity_client_composite_operations.rb +79 -0
- data/lib/oci/identity/models/change_tag_namespace_compartment_detail.rb +154 -0
- data/lib/oci/identity/models/create_identity_provider_details.rb +2 -1
- data/lib/oci/identity/models/mfa_totp_device.rb +279 -0
- data/lib/oci/identity/models/mfa_totp_device_summary.rb +267 -0
- data/lib/oci/identity/models/mfa_totp_token.rb +155 -0
- data/lib/oci/identity/models/tag_namespace_summary.rb +1 -1
- data/lib/oci/identity/models/user.rb +18 -4
- data/lib/oci/monitoring/models/aggregated_datapoint.rb +166 -0
- data/lib/oci/monitoring/models/alarm.rb +538 -0
- data/lib/oci/monitoring/models/alarm_history_collection.rb +183 -0
- data/lib/oci/monitoring/models/alarm_history_entry.rb +187 -0
- data/lib/oci/monitoring/models/alarm_status_summary.rb +277 -0
- data/lib/oci/monitoring/models/alarm_summary.rb +386 -0
- data/lib/oci/monitoring/models/create_alarm_details.rb +423 -0
- data/lib/oci/monitoring/models/datapoint.rb +179 -0
- data/lib/oci/monitoring/models/failed_metric_record.rb +166 -0
- data/lib/oci/monitoring/models/list_metrics_details.rb +271 -0
- data/lib/oci/monitoring/models/metric.rb +197 -0
- data/lib/oci/monitoring/models/metric_data.rb +243 -0
- data/lib/oci/monitoring/models/metric_data_details.rb +227 -0
- data/lib/oci/monitoring/models/post_metric_data_details.rb +194 -0
- data/lib/oci/monitoring/models/post_metric_data_response_details.rb +170 -0
- data/lib/oci/monitoring/models/summarize_metrics_data_details.rb +229 -0
- data/lib/oci/monitoring/models/suppression.rb +196 -0
- data/lib/oci/monitoring/models/update_alarm_details.rb +423 -0
- data/lib/oci/monitoring/monitoring.rb +37 -0
- data/lib/oci/monitoring/monitoring_client.rb +923 -0
- data/lib/oci/monitoring/monitoring_client_composite_operations.rb +145 -0
- data/lib/oci/monitoring/util.rb +2 -0
- data/lib/oci/ons/models/backoff_retry_policy.rb +192 -0
- data/lib/oci/ons/models/confirmation_result.rb +221 -0
- data/lib/oci/ons/models/create_subscription_details.rb +238 -0
- data/lib/oci/ons/models/create_topic_details.rb +209 -0
- data/lib/oci/ons/models/delivery_policy.rb +153 -0
- data/lib/oci/ons/models/message_details.rb +163 -0
- data/lib/oci/ons/models/notification_topic.rb +302 -0
- data/lib/oci/ons/models/notification_topic_summary.rb +303 -0
- data/lib/oci/ons/models/publish_result.rb +168 -0
- data/lib/oci/ons/models/subscription.rb +273 -0
- data/lib/oci/ons/models/subscription_summary.rb +300 -0
- data/lib/oci/ons/models/topic_attributes_details.rb +184 -0
- data/lib/oci/ons/models/update_subscription_details.rb +188 -0
- data/lib/oci/ons/notification_control_plane_client.rb +463 -0
- data/lib/oci/ons/notification_control_plane_client_composite_operations.rb +24 -0
- data/lib/oci/ons/notification_data_plane_client.rb +680 -0
- data/lib/oci/ons/notification_data_plane_client_composite_operations.rb +104 -0
- data/lib/oci/ons/ons.rb +33 -0
- data/lib/oci/ons/util.rb +2 -0
- data/lib/oci/regions.rb +5 -0
- data/lib/oci/resource_manager/models/apply_job_plan_resolution.rb +189 -0
- data/lib/oci/resource_manager/models/config_source.rb +208 -0
- data/lib/oci/resource_manager/models/create_config_source_details.rb +187 -0
- data/lib/oci/resource_manager/models/create_job_details.rb +225 -0
- data/lib/oci/resource_manager/models/create_stack_details.rb +239 -0
- data/lib/oci/resource_manager/models/create_zip_upload_config_source_details.rb +166 -0
- data/lib/oci/resource_manager/models/failure_details.rb +185 -0
- data/lib/oci/resource_manager/models/job.rb +399 -0
- data/lib/oci/resource_manager/models/job_summary.rb +311 -0
- data/lib/oci/resource_manager/models/log_entry.rb +225 -0
- data/lib/oci/resource_manager/models/stack.rb +305 -0
- data/lib/oci/resource_manager/models/stack_summary.rb +249 -0
- data/lib/oci/resource_manager/models/update_config_source_details.rb +184 -0
- data/lib/oci/resource_manager/models/update_job_details.rb +188 -0
- data/lib/oci/resource_manager/models/update_stack_details.rb +225 -0
- data/lib/oci/resource_manager/models/update_zip_upload_config_source_details.rb +164 -0
- data/lib/oci/resource_manager/models/zip_upload_config_source.rb +149 -0
- data/lib/oci/resource_manager/resource_manager.rb +36 -0
- data/lib/oci/resource_manager/resource_manager_client.rb +1264 -0
- data/lib/oci/resource_manager/resource_manager_client_composite_operations.rb +263 -0
- data/lib/oci/resource_manager/util.rb +2 -0
- data/lib/oci/version.rb +1 -1
- metadata +100 -2
@@ -0,0 +1,163 @@
|
|
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 content of the message to be published.
|
8
|
+
#
|
9
|
+
class Ons::Models::MessageDetails # rubocop:disable Metrics/LineLength
|
10
|
+
# The title of the message to be published. Avoid entering confidential information.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :title
|
13
|
+
|
14
|
+
# **[Required]** The body of the message to be published.
|
15
|
+
# For `messageType` of JSON, a default key-value pair is required. Example: `{\"default\": \"Alarm breached\", \"Email\": \"Alarm breached: <url>\"}.`
|
16
|
+
# Avoid entering confidential information.
|
17
|
+
#
|
18
|
+
# @return [String]
|
19
|
+
attr_accessor :body
|
20
|
+
|
21
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
22
|
+
def self.attribute_map
|
23
|
+
{
|
24
|
+
# rubocop:disable Style/SymbolLiteral
|
25
|
+
'title': :'title',
|
26
|
+
'body': :'body'
|
27
|
+
# rubocop:enable Style/SymbolLiteral
|
28
|
+
}
|
29
|
+
end
|
30
|
+
|
31
|
+
# Attribute type mapping.
|
32
|
+
def self.swagger_types
|
33
|
+
{
|
34
|
+
# rubocop:disable Style/SymbolLiteral
|
35
|
+
'title': :'String',
|
36
|
+
'body': :'String'
|
37
|
+
# rubocop:enable Style/SymbolLiteral
|
38
|
+
}
|
39
|
+
end
|
40
|
+
|
41
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
42
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
43
|
+
|
44
|
+
|
45
|
+
# Initializes the object
|
46
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
47
|
+
# @option attributes [String] :title The value to assign to the {#title} property
|
48
|
+
# @option attributes [String] :body The value to assign to the {#body} property
|
49
|
+
def initialize(attributes = {})
|
50
|
+
return unless attributes.is_a?(Hash)
|
51
|
+
|
52
|
+
# convert string to symbol for hash key
|
53
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
54
|
+
|
55
|
+
self.title = attributes[:'title'] if attributes[:'title']
|
56
|
+
|
57
|
+
self.body = attributes[:'body'] if attributes[:'body']
|
58
|
+
end
|
59
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
60
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
61
|
+
|
62
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
63
|
+
|
64
|
+
|
65
|
+
# Checks equality by comparing each attribute.
|
66
|
+
# @param [Object] other the other object to be compared
|
67
|
+
def ==(other)
|
68
|
+
return true if equal?(other)
|
69
|
+
|
70
|
+
self.class == other.class &&
|
71
|
+
title == other.title &&
|
72
|
+
body == other.body
|
73
|
+
end
|
74
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
75
|
+
|
76
|
+
# @see the `==` method
|
77
|
+
# @param [Object] other the other object to be compared
|
78
|
+
def eql?(other)
|
79
|
+
self == other
|
80
|
+
end
|
81
|
+
|
82
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
83
|
+
|
84
|
+
|
85
|
+
# Calculates hash code according to all attributes.
|
86
|
+
# @return [Fixnum] Hash code
|
87
|
+
def hash
|
88
|
+
[title, body].hash
|
89
|
+
end
|
90
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
91
|
+
|
92
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
93
|
+
|
94
|
+
|
95
|
+
# Builds the object from hash
|
96
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
97
|
+
# @return [Object] Returns the model itself
|
98
|
+
def build_from_hash(attributes)
|
99
|
+
return nil unless attributes.is_a?(Hash)
|
100
|
+
|
101
|
+
self.class.swagger_types.each_pair do |key, type|
|
102
|
+
if type =~ /^Array<(.*)>/i
|
103
|
+
# check to ensure the input is an array given that the the attribute
|
104
|
+
# is documented as an array but the input is not
|
105
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
106
|
+
public_method("#{key}=").call(
|
107
|
+
attributes[self.class.attribute_map[key]]
|
108
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
109
|
+
)
|
110
|
+
end
|
111
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
112
|
+
public_method("#{key}=").call(
|
113
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
114
|
+
)
|
115
|
+
end
|
116
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
117
|
+
end
|
118
|
+
|
119
|
+
self
|
120
|
+
end
|
121
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
122
|
+
|
123
|
+
# Returns the string representation of the object
|
124
|
+
# @return [String] String presentation of the object
|
125
|
+
def to_s
|
126
|
+
to_hash.to_s
|
127
|
+
end
|
128
|
+
|
129
|
+
# Returns the object in the form of hash
|
130
|
+
# @return [Hash] Returns the object in the form of hash
|
131
|
+
def to_hash
|
132
|
+
hash = {}
|
133
|
+
self.class.attribute_map.each_pair do |attr, param|
|
134
|
+
value = public_method(attr).call
|
135
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
136
|
+
|
137
|
+
hash[param] = _to_hash(value)
|
138
|
+
end
|
139
|
+
hash
|
140
|
+
end
|
141
|
+
|
142
|
+
private
|
143
|
+
|
144
|
+
# Outputs non-array value in the form of hash
|
145
|
+
# For object, use to_hash. Otherwise, just return the value
|
146
|
+
# @param [Object] value Any valid value
|
147
|
+
# @return [Hash] Returns the value in the form of hash
|
148
|
+
def _to_hash(value)
|
149
|
+
if value.is_a?(Array)
|
150
|
+
value.compact.map { |v| _to_hash(v) }
|
151
|
+
elsif value.is_a?(Hash)
|
152
|
+
{}.tap do |hash|
|
153
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
154
|
+
end
|
155
|
+
elsif value.respond_to? :to_hash
|
156
|
+
value.to_hash
|
157
|
+
else
|
158
|
+
value
|
159
|
+
end
|
160
|
+
end
|
161
|
+
end
|
162
|
+
end
|
163
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,302 @@
|
|
1
|
+
# Copyright (c) 2016, 2019, Oracle and/or its affiliates. All rights reserved.
|
2
|
+
|
3
|
+
require 'date'
|
4
|
+
require 'logger'
|
5
|
+
|
6
|
+
# rubocop:disable Lint/UnneededCopDisableDirective
|
7
|
+
module OCI
|
8
|
+
# The properties that define a topic.
|
9
|
+
#
|
10
|
+
class Ons::Models::NotificationTopic # rubocop:disable Metrics/LineLength
|
11
|
+
LIFECYCLE_STATE_ENUM = [
|
12
|
+
LIFECYCLE_STATE_ACTIVE = 'ACTIVE'.freeze,
|
13
|
+
LIFECYCLE_STATE_DELETING = 'DELETING'.freeze,
|
14
|
+
LIFECYCLE_STATE_CREATING = 'CREATING'.freeze,
|
15
|
+
LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze
|
16
|
+
].freeze
|
17
|
+
|
18
|
+
# **[Required]** The name of the topic. Avoid entering confidential information.
|
19
|
+
# @return [String]
|
20
|
+
attr_accessor :name
|
21
|
+
|
22
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the topic.
|
23
|
+
#
|
24
|
+
# @return [String]
|
25
|
+
attr_accessor :topic_id
|
26
|
+
|
27
|
+
# **[Required]** The [OCID](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/identifiers.htm) of the compartment for the topic.
|
28
|
+
#
|
29
|
+
# @return [String]
|
30
|
+
attr_accessor :compartment_id
|
31
|
+
|
32
|
+
# **[Required]** The lifecycle state of the topic.
|
33
|
+
#
|
34
|
+
# @return [String]
|
35
|
+
attr_reader :lifecycle_state
|
36
|
+
|
37
|
+
# The description of the topic. Avoid entering confidential information.
|
38
|
+
# @return [String]
|
39
|
+
attr_accessor :description
|
40
|
+
|
41
|
+
# **[Required]** The time the topic was created.
|
42
|
+
# @return [DateTime]
|
43
|
+
attr_accessor :time_created
|
44
|
+
|
45
|
+
# For optimistic concurrency control. See `if-match`.
|
46
|
+
#
|
47
|
+
# @return [String]
|
48
|
+
attr_accessor :etag
|
49
|
+
|
50
|
+
# Free-form tags for this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
51
|
+
#
|
52
|
+
# Example: `{\"Department\": \"Finance\"}`
|
53
|
+
#
|
54
|
+
# @return [Hash<String, String>]
|
55
|
+
attr_accessor :freeform_tags
|
56
|
+
|
57
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace. For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
58
|
+
#
|
59
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
60
|
+
#
|
61
|
+
# @return [Hash<String, Hash<String, Object>>]
|
62
|
+
attr_accessor :defined_tags
|
63
|
+
|
64
|
+
# **[Required]** The endpoint for managing topic subscriptions or publishing messages to the topic.
|
65
|
+
#
|
66
|
+
# @return [String]
|
67
|
+
attr_accessor :api_endpoint
|
68
|
+
|
69
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
70
|
+
def self.attribute_map
|
71
|
+
{
|
72
|
+
# rubocop:disable Style/SymbolLiteral
|
73
|
+
'name': :'name',
|
74
|
+
'topic_id': :'topicId',
|
75
|
+
'compartment_id': :'compartmentId',
|
76
|
+
'lifecycle_state': :'lifecycleState',
|
77
|
+
'description': :'description',
|
78
|
+
'time_created': :'timeCreated',
|
79
|
+
'etag': :'etag',
|
80
|
+
'freeform_tags': :'freeformTags',
|
81
|
+
'defined_tags': :'definedTags',
|
82
|
+
'api_endpoint': :'apiEndpoint'
|
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
|
+
'name': :'String',
|
92
|
+
'topic_id': :'String',
|
93
|
+
'compartment_id': :'String',
|
94
|
+
'lifecycle_state': :'String',
|
95
|
+
'description': :'String',
|
96
|
+
'time_created': :'DateTime',
|
97
|
+
'etag': :'String',
|
98
|
+
'freeform_tags': :'Hash<String, String>',
|
99
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>',
|
100
|
+
'api_endpoint': :'String'
|
101
|
+
# rubocop:enable Style/SymbolLiteral
|
102
|
+
}
|
103
|
+
end
|
104
|
+
|
105
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
106
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
107
|
+
|
108
|
+
|
109
|
+
# Initializes the object
|
110
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
111
|
+
# @option attributes [String] :name The value to assign to the {#name} property
|
112
|
+
# @option attributes [String] :topic_id The value to assign to the {#topic_id} property
|
113
|
+
# @option attributes [String] :compartment_id The value to assign to the {#compartment_id} property
|
114
|
+
# @option attributes [String] :lifecycle_state The value to assign to the {#lifecycle_state} property
|
115
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
116
|
+
# @option attributes [DateTime] :time_created The value to assign to the {#time_created} property
|
117
|
+
# @option attributes [String] :etag The value to assign to the {#etag} property
|
118
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
119
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
120
|
+
# @option attributes [String] :api_endpoint The value to assign to the {#api_endpoint} property
|
121
|
+
def initialize(attributes = {})
|
122
|
+
return unless attributes.is_a?(Hash)
|
123
|
+
|
124
|
+
# convert string to symbol for hash key
|
125
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
126
|
+
|
127
|
+
self.name = attributes[:'name'] if attributes[:'name']
|
128
|
+
|
129
|
+
self.topic_id = attributes[:'topicId'] if attributes[:'topicId']
|
130
|
+
|
131
|
+
raise 'You cannot provide both :topicId and :topic_id' if attributes.key?(:'topicId') && attributes.key?(:'topic_id')
|
132
|
+
|
133
|
+
self.topic_id = attributes[:'topic_id'] if attributes[:'topic_id']
|
134
|
+
|
135
|
+
self.compartment_id = attributes[:'compartmentId'] if attributes[:'compartmentId']
|
136
|
+
|
137
|
+
raise 'You cannot provide both :compartmentId and :compartment_id' if attributes.key?(:'compartmentId') && attributes.key?(:'compartment_id')
|
138
|
+
|
139
|
+
self.compartment_id = attributes[:'compartment_id'] if attributes[:'compartment_id']
|
140
|
+
|
141
|
+
self.lifecycle_state = attributes[:'lifecycleState'] if attributes[:'lifecycleState']
|
142
|
+
|
143
|
+
raise 'You cannot provide both :lifecycleState and :lifecycle_state' if attributes.key?(:'lifecycleState') && attributes.key?(:'lifecycle_state')
|
144
|
+
|
145
|
+
self.lifecycle_state = attributes[:'lifecycle_state'] if attributes[:'lifecycle_state']
|
146
|
+
|
147
|
+
self.description = attributes[:'description'] if attributes[:'description']
|
148
|
+
|
149
|
+
self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated']
|
150
|
+
|
151
|
+
raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created')
|
152
|
+
|
153
|
+
self.time_created = attributes[:'time_created'] if attributes[:'time_created']
|
154
|
+
|
155
|
+
self.etag = attributes[:'etag'] if attributes[:'etag']
|
156
|
+
|
157
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
158
|
+
|
159
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
160
|
+
|
161
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
162
|
+
|
163
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
164
|
+
|
165
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
166
|
+
|
167
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
168
|
+
|
169
|
+
self.api_endpoint = attributes[:'apiEndpoint'] if attributes[:'apiEndpoint']
|
170
|
+
|
171
|
+
raise 'You cannot provide both :apiEndpoint and :api_endpoint' if attributes.key?(:'apiEndpoint') && attributes.key?(:'api_endpoint')
|
172
|
+
|
173
|
+
self.api_endpoint = attributes[:'api_endpoint'] if attributes[:'api_endpoint']
|
174
|
+
end
|
175
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
176
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
177
|
+
|
178
|
+
# Custom attribute writer method checking allowed values (enum).
|
179
|
+
# @param [Object] lifecycle_state Object to be assigned
|
180
|
+
def lifecycle_state=(lifecycle_state)
|
181
|
+
# rubocop:disable Style/ConditionalAssignment
|
182
|
+
if lifecycle_state && !LIFECYCLE_STATE_ENUM.include?(lifecycle_state)
|
183
|
+
# rubocop: disable Metrics/LineLength
|
184
|
+
OCI.logger.debug("Unknown value for 'lifecycle_state' [" + lifecycle_state + "]. Mapping to 'LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE'") if OCI.logger
|
185
|
+
# rubocop: enable Metrics/LineLength
|
186
|
+
@lifecycle_state = LIFECYCLE_STATE_UNKNOWN_ENUM_VALUE
|
187
|
+
else
|
188
|
+
@lifecycle_state = lifecycle_state
|
189
|
+
end
|
190
|
+
# rubocop:enable Style/ConditionalAssignment
|
191
|
+
end
|
192
|
+
|
193
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
194
|
+
|
195
|
+
|
196
|
+
# Checks equality by comparing each attribute.
|
197
|
+
# @param [Object] other the other object to be compared
|
198
|
+
def ==(other)
|
199
|
+
return true if equal?(other)
|
200
|
+
|
201
|
+
self.class == other.class &&
|
202
|
+
name == other.name &&
|
203
|
+
topic_id == other.topic_id &&
|
204
|
+
compartment_id == other.compartment_id &&
|
205
|
+
lifecycle_state == other.lifecycle_state &&
|
206
|
+
description == other.description &&
|
207
|
+
time_created == other.time_created &&
|
208
|
+
etag == other.etag &&
|
209
|
+
freeform_tags == other.freeform_tags &&
|
210
|
+
defined_tags == other.defined_tags &&
|
211
|
+
api_endpoint == other.api_endpoint
|
212
|
+
end
|
213
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
214
|
+
|
215
|
+
# @see the `==` method
|
216
|
+
# @param [Object] other the other object to be compared
|
217
|
+
def eql?(other)
|
218
|
+
self == other
|
219
|
+
end
|
220
|
+
|
221
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
222
|
+
|
223
|
+
|
224
|
+
# Calculates hash code according to all attributes.
|
225
|
+
# @return [Fixnum] Hash code
|
226
|
+
def hash
|
227
|
+
[name, topic_id, compartment_id, lifecycle_state, description, time_created, etag, freeform_tags, defined_tags, api_endpoint].hash
|
228
|
+
end
|
229
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
230
|
+
|
231
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
232
|
+
|
233
|
+
|
234
|
+
# Builds the object from hash
|
235
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
236
|
+
# @return [Object] Returns the model itself
|
237
|
+
def build_from_hash(attributes)
|
238
|
+
return nil unless attributes.is_a?(Hash)
|
239
|
+
|
240
|
+
self.class.swagger_types.each_pair do |key, type|
|
241
|
+
if type =~ /^Array<(.*)>/i
|
242
|
+
# check to ensure the input is an array given that the the attribute
|
243
|
+
# is documented as an array but the input is not
|
244
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
245
|
+
public_method("#{key}=").call(
|
246
|
+
attributes[self.class.attribute_map[key]]
|
247
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
248
|
+
)
|
249
|
+
end
|
250
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
251
|
+
public_method("#{key}=").call(
|
252
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
253
|
+
)
|
254
|
+
end
|
255
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
256
|
+
end
|
257
|
+
|
258
|
+
self
|
259
|
+
end
|
260
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
261
|
+
|
262
|
+
# Returns the string representation of the object
|
263
|
+
# @return [String] String presentation of the object
|
264
|
+
def to_s
|
265
|
+
to_hash.to_s
|
266
|
+
end
|
267
|
+
|
268
|
+
# Returns the object in the form of hash
|
269
|
+
# @return [Hash] Returns the object in the form of hash
|
270
|
+
def to_hash
|
271
|
+
hash = {}
|
272
|
+
self.class.attribute_map.each_pair do |attr, param|
|
273
|
+
value = public_method(attr).call
|
274
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
275
|
+
|
276
|
+
hash[param] = _to_hash(value)
|
277
|
+
end
|
278
|
+
hash
|
279
|
+
end
|
280
|
+
|
281
|
+
private
|
282
|
+
|
283
|
+
# Outputs non-array value in the form of hash
|
284
|
+
# For object, use to_hash. Otherwise, just return the value
|
285
|
+
# @param [Object] value Any valid value
|
286
|
+
# @return [Hash] Returns the value in the form of hash
|
287
|
+
def _to_hash(value)
|
288
|
+
if value.is_a?(Array)
|
289
|
+
value.compact.map { |v| _to_hash(v) }
|
290
|
+
elsif value.is_a?(Hash)
|
291
|
+
{}.tap do |hash|
|
292
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
293
|
+
end
|
294
|
+
elsif value.respond_to? :to_hash
|
295
|
+
value.to_hash
|
296
|
+
else
|
297
|
+
value
|
298
|
+
end
|
299
|
+
end
|
300
|
+
end
|
301
|
+
end
|
302
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|