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,184 @@
|
|
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
|
+
# Updates the property details for the configuration source.
|
8
|
+
#
|
9
|
+
# This class has direct subclasses. If you are using this class as input to a service operations then you should favor using a subclass over the base class
|
10
|
+
class ResourceManager::Models::UpdateConfigSourceDetails # rubocop:disable Metrics/LineLength
|
11
|
+
# **[Required]** Terraform configuration file type.
|
12
|
+
# @return [String]
|
13
|
+
attr_accessor :config_source_type
|
14
|
+
|
15
|
+
# The path of the directory from which to run terraform. If not specified, the the root will be used.
|
16
|
+
# @return [String]
|
17
|
+
attr_accessor :working_directory
|
18
|
+
|
19
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
20
|
+
def self.attribute_map
|
21
|
+
{
|
22
|
+
# rubocop:disable Style/SymbolLiteral
|
23
|
+
'config_source_type': :'configSourceType',
|
24
|
+
'working_directory': :'workingDirectory'
|
25
|
+
# rubocop:enable Style/SymbolLiteral
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
# Attribute type mapping.
|
30
|
+
def self.swagger_types
|
31
|
+
{
|
32
|
+
# rubocop:disable Style/SymbolLiteral
|
33
|
+
'config_source_type': :'String',
|
34
|
+
'working_directory': :'String'
|
35
|
+
# rubocop:enable Style/SymbolLiteral
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Layout/EmptyLines
|
40
|
+
|
41
|
+
|
42
|
+
# Given the hash representation of a subtype of this class,
|
43
|
+
# use the info in the hash to return the class of the subtype.
|
44
|
+
def self.get_subtype(object_hash)
|
45
|
+
type = object_hash[:'configSourceType'] # rubocop:disable Style/SymbolLiteral
|
46
|
+
|
47
|
+
return 'OCI::ResourceManager::Models::UpdateZipUploadConfigSourceDetails' if type == 'ZIP_UPLOAD'
|
48
|
+
|
49
|
+
# TODO: Log a warning when the subtype is not found.
|
50
|
+
'OCI::ResourceManager::Models::UpdateConfigSourceDetails'
|
51
|
+
end
|
52
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Layout/EmptyLines
|
53
|
+
|
54
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
55
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
56
|
+
|
57
|
+
|
58
|
+
# Initializes the object
|
59
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
60
|
+
# @option attributes [String] :config_source_type The value to assign to the {#config_source_type} property
|
61
|
+
# @option attributes [String] :working_directory The value to assign to the {#working_directory} property
|
62
|
+
def initialize(attributes = {})
|
63
|
+
return unless attributes.is_a?(Hash)
|
64
|
+
|
65
|
+
# convert string to symbol for hash key
|
66
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
67
|
+
|
68
|
+
self.config_source_type = attributes[:'configSourceType'] if attributes[:'configSourceType']
|
69
|
+
|
70
|
+
raise 'You cannot provide both :configSourceType and :config_source_type' if attributes.key?(:'configSourceType') && attributes.key?(:'config_source_type')
|
71
|
+
|
72
|
+
self.config_source_type = attributes[:'config_source_type'] if attributes[:'config_source_type']
|
73
|
+
|
74
|
+
self.working_directory = attributes[:'workingDirectory'] if attributes[:'workingDirectory']
|
75
|
+
|
76
|
+
raise 'You cannot provide both :workingDirectory and :working_directory' if attributes.key?(:'workingDirectory') && attributes.key?(:'working_directory')
|
77
|
+
|
78
|
+
self.working_directory = attributes[:'working_directory'] if attributes[:'working_directory']
|
79
|
+
end
|
80
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
81
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
82
|
+
|
83
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
84
|
+
|
85
|
+
|
86
|
+
# Checks equality by comparing each attribute.
|
87
|
+
# @param [Object] other the other object to be compared
|
88
|
+
def ==(other)
|
89
|
+
return true if equal?(other)
|
90
|
+
|
91
|
+
self.class == other.class &&
|
92
|
+
config_source_type == other.config_source_type &&
|
93
|
+
working_directory == other.working_directory
|
94
|
+
end
|
95
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
96
|
+
|
97
|
+
# @see the `==` method
|
98
|
+
# @param [Object] other the other object to be compared
|
99
|
+
def eql?(other)
|
100
|
+
self == other
|
101
|
+
end
|
102
|
+
|
103
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
104
|
+
|
105
|
+
|
106
|
+
# Calculates hash code according to all attributes.
|
107
|
+
# @return [Fixnum] Hash code
|
108
|
+
def hash
|
109
|
+
[config_source_type, working_directory].hash
|
110
|
+
end
|
111
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
112
|
+
|
113
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
114
|
+
|
115
|
+
|
116
|
+
# Builds the object from hash
|
117
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
118
|
+
# @return [Object] Returns the model itself
|
119
|
+
def build_from_hash(attributes)
|
120
|
+
return nil unless attributes.is_a?(Hash)
|
121
|
+
|
122
|
+
self.class.swagger_types.each_pair do |key, type|
|
123
|
+
if type =~ /^Array<(.*)>/i
|
124
|
+
# check to ensure the input is an array given that the the attribute
|
125
|
+
# is documented as an array but the input is not
|
126
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
127
|
+
public_method("#{key}=").call(
|
128
|
+
attributes[self.class.attribute_map[key]]
|
129
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
130
|
+
)
|
131
|
+
end
|
132
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
133
|
+
public_method("#{key}=").call(
|
134
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
135
|
+
)
|
136
|
+
end
|
137
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
138
|
+
end
|
139
|
+
|
140
|
+
self
|
141
|
+
end
|
142
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
143
|
+
|
144
|
+
# Returns the string representation of the object
|
145
|
+
# @return [String] String presentation of the object
|
146
|
+
def to_s
|
147
|
+
to_hash.to_s
|
148
|
+
end
|
149
|
+
|
150
|
+
# Returns the object in the form of hash
|
151
|
+
# @return [Hash] Returns the object in the form of hash
|
152
|
+
def to_hash
|
153
|
+
hash = {}
|
154
|
+
self.class.attribute_map.each_pair do |attr, param|
|
155
|
+
value = public_method(attr).call
|
156
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
157
|
+
|
158
|
+
hash[param] = _to_hash(value)
|
159
|
+
end
|
160
|
+
hash
|
161
|
+
end
|
162
|
+
|
163
|
+
private
|
164
|
+
|
165
|
+
# Outputs non-array value in the form of hash
|
166
|
+
# For object, use to_hash. Otherwise, just return the value
|
167
|
+
# @param [Object] value Any valid value
|
168
|
+
# @return [Hash] Returns the value in the form of hash
|
169
|
+
def _to_hash(value)
|
170
|
+
if value.is_a?(Array)
|
171
|
+
value.compact.map { |v| _to_hash(v) }
|
172
|
+
elsif value.is_a?(Hash)
|
173
|
+
{}.tap do |hash|
|
174
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
175
|
+
end
|
176
|
+
elsif value.respond_to? :to_hash
|
177
|
+
value.to_hash
|
178
|
+
else
|
179
|
+
value
|
180
|
+
end
|
181
|
+
end
|
182
|
+
end
|
183
|
+
end
|
184
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,188 @@
|
|
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
|
+
# Updates the display name, free-form tags, and/or defined tag properties of the job.
|
8
|
+
#
|
9
|
+
class ResourceManager::Models::UpdateJobDetails # rubocop:disable Metrics/LineLength
|
10
|
+
# The new display name to set.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :display_name
|
13
|
+
|
14
|
+
# Free-form tags associated with this resource. Each tag is a key-value pair with no predefined name, type, or namespace.
|
15
|
+
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/resourcetags.htm).
|
16
|
+
# Example: `{\"Department\": \"Finance\"}`
|
17
|
+
#
|
18
|
+
# @return [Hash<String, String>]
|
19
|
+
attr_accessor :freeform_tags
|
20
|
+
|
21
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
22
|
+
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/resourcetags.htm).
|
23
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
24
|
+
#
|
25
|
+
# @return [Hash<String, Hash<String, Object>>]
|
26
|
+
attr_accessor :defined_tags
|
27
|
+
|
28
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
29
|
+
def self.attribute_map
|
30
|
+
{
|
31
|
+
# rubocop:disable Style/SymbolLiteral
|
32
|
+
'display_name': :'displayName',
|
33
|
+
'freeform_tags': :'freeformTags',
|
34
|
+
'defined_tags': :'definedTags'
|
35
|
+
# rubocop:enable Style/SymbolLiteral
|
36
|
+
}
|
37
|
+
end
|
38
|
+
|
39
|
+
# Attribute type mapping.
|
40
|
+
def self.swagger_types
|
41
|
+
{
|
42
|
+
# rubocop:disable Style/SymbolLiteral
|
43
|
+
'display_name': :'String',
|
44
|
+
'freeform_tags': :'Hash<String, String>',
|
45
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
46
|
+
# rubocop:enable Style/SymbolLiteral
|
47
|
+
}
|
48
|
+
end
|
49
|
+
|
50
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
51
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
52
|
+
|
53
|
+
|
54
|
+
# Initializes the object
|
55
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
56
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
57
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
58
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
59
|
+
def initialize(attributes = {})
|
60
|
+
return unless attributes.is_a?(Hash)
|
61
|
+
|
62
|
+
# convert string to symbol for hash key
|
63
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
64
|
+
|
65
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
66
|
+
|
67
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
68
|
+
|
69
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
70
|
+
|
71
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
72
|
+
|
73
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
74
|
+
|
75
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
76
|
+
|
77
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
78
|
+
|
79
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
80
|
+
|
81
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
82
|
+
end
|
83
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
84
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
85
|
+
|
86
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
87
|
+
|
88
|
+
|
89
|
+
# Checks equality by comparing each attribute.
|
90
|
+
# @param [Object] other the other object to be compared
|
91
|
+
def ==(other)
|
92
|
+
return true if equal?(other)
|
93
|
+
|
94
|
+
self.class == other.class &&
|
95
|
+
display_name == other.display_name &&
|
96
|
+
freeform_tags == other.freeform_tags &&
|
97
|
+
defined_tags == other.defined_tags
|
98
|
+
end
|
99
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
100
|
+
|
101
|
+
# @see the `==` method
|
102
|
+
# @param [Object] other the other object to be compared
|
103
|
+
def eql?(other)
|
104
|
+
self == other
|
105
|
+
end
|
106
|
+
|
107
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
108
|
+
|
109
|
+
|
110
|
+
# Calculates hash code according to all attributes.
|
111
|
+
# @return [Fixnum] Hash code
|
112
|
+
def hash
|
113
|
+
[display_name, freeform_tags, defined_tags].hash
|
114
|
+
end
|
115
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
116
|
+
|
117
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
118
|
+
|
119
|
+
|
120
|
+
# Builds the object from hash
|
121
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
122
|
+
# @return [Object] Returns the model itself
|
123
|
+
def build_from_hash(attributes)
|
124
|
+
return nil unless attributes.is_a?(Hash)
|
125
|
+
|
126
|
+
self.class.swagger_types.each_pair do |key, type|
|
127
|
+
if type =~ /^Array<(.*)>/i
|
128
|
+
# check to ensure the input is an array given that the the attribute
|
129
|
+
# is documented as an array but the input is not
|
130
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
131
|
+
public_method("#{key}=").call(
|
132
|
+
attributes[self.class.attribute_map[key]]
|
133
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
134
|
+
)
|
135
|
+
end
|
136
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
137
|
+
public_method("#{key}=").call(
|
138
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
139
|
+
)
|
140
|
+
end
|
141
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
142
|
+
end
|
143
|
+
|
144
|
+
self
|
145
|
+
end
|
146
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
147
|
+
|
148
|
+
# Returns the string representation of the object
|
149
|
+
# @return [String] String presentation of the object
|
150
|
+
def to_s
|
151
|
+
to_hash.to_s
|
152
|
+
end
|
153
|
+
|
154
|
+
# Returns the object in the form of hash
|
155
|
+
# @return [Hash] Returns the object in the form of hash
|
156
|
+
def to_hash
|
157
|
+
hash = {}
|
158
|
+
self.class.attribute_map.each_pair do |attr, param|
|
159
|
+
value = public_method(attr).call
|
160
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
161
|
+
|
162
|
+
hash[param] = _to_hash(value)
|
163
|
+
end
|
164
|
+
hash
|
165
|
+
end
|
166
|
+
|
167
|
+
private
|
168
|
+
|
169
|
+
# Outputs non-array value in the form of hash
|
170
|
+
# For object, use to_hash. Otherwise, just return the value
|
171
|
+
# @param [Object] value Any valid value
|
172
|
+
# @return [Hash] Returns the value in the form of hash
|
173
|
+
def _to_hash(value)
|
174
|
+
if value.is_a?(Array)
|
175
|
+
value.compact.map { |v| _to_hash(v) }
|
176
|
+
elsif value.is_a?(Hash)
|
177
|
+
{}.tap do |hash|
|
178
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
179
|
+
end
|
180
|
+
elsif value.respond_to? :to_hash
|
181
|
+
value.to_hash
|
182
|
+
else
|
183
|
+
value
|
184
|
+
end
|
185
|
+
end
|
186
|
+
end
|
187
|
+
end
|
188
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|
@@ -0,0 +1,225 @@
|
|
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
|
+
# Specifies which fields and the data for each to update on the specified stack.
|
8
|
+
#
|
9
|
+
class ResourceManager::Models::UpdateStackDetails # rubocop:disable Metrics/LineLength
|
10
|
+
# The name of the stack.
|
11
|
+
# @return [String]
|
12
|
+
attr_accessor :display_name
|
13
|
+
|
14
|
+
# Description of the stack.
|
15
|
+
# @return [String]
|
16
|
+
attr_accessor :description
|
17
|
+
|
18
|
+
# @return [OCI::ResourceManager::Models::UpdateConfigSourceDetails]
|
19
|
+
attr_accessor :config_source
|
20
|
+
|
21
|
+
# Terraform variables associated with this resource.
|
22
|
+
# The maximum number of variables supported is 100.
|
23
|
+
# The maximum size of each variable, including both name and value, is 4096 bytes.
|
24
|
+
# Example: `{\"CompartmentId\": \"compartment-id-value\"}`
|
25
|
+
#
|
26
|
+
# @return [Hash<String, String>]
|
27
|
+
attr_accessor :variables
|
28
|
+
|
29
|
+
# Free-form tags associated with this resource. Each tag is a simple key-value pair with no predefined name, type, or namespace.
|
30
|
+
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/iaas/Content/General/Concepts/resourcetags.htm).
|
31
|
+
# Example: `{\"Department\": \"Finance\"}`
|
32
|
+
#
|
33
|
+
# @return [Hash<String, String>]
|
34
|
+
attr_accessor :freeform_tags
|
35
|
+
|
36
|
+
# Defined tags for this resource. Each key is predefined and scoped to a namespace.
|
37
|
+
# For more information, see [Resource Tags](https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/resourcetags.htm).
|
38
|
+
# Example: `{\"Operations\": {\"CostCenter\": \"42\"}}`
|
39
|
+
#
|
40
|
+
# @return [Hash<String, Hash<String, Object>>]
|
41
|
+
attr_accessor :defined_tags
|
42
|
+
|
43
|
+
# Attribute mapping from ruby-style variable name to JSON key.
|
44
|
+
def self.attribute_map
|
45
|
+
{
|
46
|
+
# rubocop:disable Style/SymbolLiteral
|
47
|
+
'display_name': :'displayName',
|
48
|
+
'description': :'description',
|
49
|
+
'config_source': :'configSource',
|
50
|
+
'variables': :'variables',
|
51
|
+
'freeform_tags': :'freeformTags',
|
52
|
+
'defined_tags': :'definedTags'
|
53
|
+
# rubocop:enable Style/SymbolLiteral
|
54
|
+
}
|
55
|
+
end
|
56
|
+
|
57
|
+
# Attribute type mapping.
|
58
|
+
def self.swagger_types
|
59
|
+
{
|
60
|
+
# rubocop:disable Style/SymbolLiteral
|
61
|
+
'display_name': :'String',
|
62
|
+
'description': :'String',
|
63
|
+
'config_source': :'OCI::ResourceManager::Models::UpdateConfigSourceDetails',
|
64
|
+
'variables': :'Hash<String, String>',
|
65
|
+
'freeform_tags': :'Hash<String, String>',
|
66
|
+
'defined_tags': :'Hash<String, Hash<String, Object>>'
|
67
|
+
# rubocop:enable Style/SymbolLiteral
|
68
|
+
}
|
69
|
+
end
|
70
|
+
|
71
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
72
|
+
# rubocop:disable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
73
|
+
|
74
|
+
|
75
|
+
# Initializes the object
|
76
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
77
|
+
# @option attributes [String] :display_name The value to assign to the {#display_name} property
|
78
|
+
# @option attributes [String] :description The value to assign to the {#description} property
|
79
|
+
# @option attributes [OCI::ResourceManager::Models::UpdateConfigSourceDetails] :config_source The value to assign to the {#config_source} property
|
80
|
+
# @option attributes [Hash<String, String>] :variables The value to assign to the {#variables} property
|
81
|
+
# @option attributes [Hash<String, String>] :freeform_tags The value to assign to the {#freeform_tags} property
|
82
|
+
# @option attributes [Hash<String, Hash<String, Object>>] :defined_tags The value to assign to the {#defined_tags} property
|
83
|
+
def initialize(attributes = {})
|
84
|
+
return unless attributes.is_a?(Hash)
|
85
|
+
|
86
|
+
# convert string to symbol for hash key
|
87
|
+
attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v }
|
88
|
+
|
89
|
+
self.display_name = attributes[:'displayName'] if attributes[:'displayName']
|
90
|
+
|
91
|
+
raise 'You cannot provide both :displayName and :display_name' if attributes.key?(:'displayName') && attributes.key?(:'display_name')
|
92
|
+
|
93
|
+
self.display_name = attributes[:'display_name'] if attributes[:'display_name']
|
94
|
+
|
95
|
+
self.description = attributes[:'description'] if attributes[:'description']
|
96
|
+
|
97
|
+
self.config_source = attributes[:'configSource'] if attributes[:'configSource']
|
98
|
+
|
99
|
+
raise 'You cannot provide both :configSource and :config_source' if attributes.key?(:'configSource') && attributes.key?(:'config_source')
|
100
|
+
|
101
|
+
self.config_source = attributes[:'config_source'] if attributes[:'config_source']
|
102
|
+
|
103
|
+
self.variables = attributes[:'variables'] if attributes[:'variables']
|
104
|
+
|
105
|
+
self.freeform_tags = attributes[:'freeformTags'] if attributes[:'freeformTags']
|
106
|
+
|
107
|
+
raise 'You cannot provide both :freeformTags and :freeform_tags' if attributes.key?(:'freeformTags') && attributes.key?(:'freeform_tags')
|
108
|
+
|
109
|
+
self.freeform_tags = attributes[:'freeform_tags'] if attributes[:'freeform_tags']
|
110
|
+
|
111
|
+
self.defined_tags = attributes[:'definedTags'] if attributes[:'definedTags']
|
112
|
+
|
113
|
+
raise 'You cannot provide both :definedTags and :defined_tags' if attributes.key?(:'definedTags') && attributes.key?(:'defined_tags')
|
114
|
+
|
115
|
+
self.defined_tags = attributes[:'defined_tags'] if attributes[:'defined_tags']
|
116
|
+
end
|
117
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity
|
118
|
+
# rubocop:enable Metrics/LineLength, Metrics/MethodLength, Layout/EmptyLines, Style/SymbolLiteral
|
119
|
+
|
120
|
+
# rubocop:disable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
121
|
+
|
122
|
+
|
123
|
+
# Checks equality by comparing each attribute.
|
124
|
+
# @param [Object] other the other object to be compared
|
125
|
+
def ==(other)
|
126
|
+
return true if equal?(other)
|
127
|
+
|
128
|
+
self.class == other.class &&
|
129
|
+
display_name == other.display_name &&
|
130
|
+
description == other.description &&
|
131
|
+
config_source == other.config_source &&
|
132
|
+
variables == other.variables &&
|
133
|
+
freeform_tags == other.freeform_tags &&
|
134
|
+
defined_tags == other.defined_tags
|
135
|
+
end
|
136
|
+
# rubocop:enable Metrics/CyclomaticComplexity, Metrics/AbcSize, Metrics/PerceivedComplexity, Metrics/LineLength, Layout/EmptyLines
|
137
|
+
|
138
|
+
# @see the `==` method
|
139
|
+
# @param [Object] other the other object to be compared
|
140
|
+
def eql?(other)
|
141
|
+
self == other
|
142
|
+
end
|
143
|
+
|
144
|
+
# rubocop:disable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
145
|
+
|
146
|
+
|
147
|
+
# Calculates hash code according to all attributes.
|
148
|
+
# @return [Fixnum] Hash code
|
149
|
+
def hash
|
150
|
+
[display_name, description, config_source, variables, freeform_tags, defined_tags].hash
|
151
|
+
end
|
152
|
+
# rubocop:enable Metrics/AbcSize, Metrics/LineLength, Layout/EmptyLines
|
153
|
+
|
154
|
+
# rubocop:disable Metrics/AbcSize, Layout/EmptyLines
|
155
|
+
|
156
|
+
|
157
|
+
# Builds the object from hash
|
158
|
+
# @param [Hash] attributes Model attributes in the form of hash
|
159
|
+
# @return [Object] Returns the model itself
|
160
|
+
def build_from_hash(attributes)
|
161
|
+
return nil unless attributes.is_a?(Hash)
|
162
|
+
|
163
|
+
self.class.swagger_types.each_pair do |key, type|
|
164
|
+
if type =~ /^Array<(.*)>/i
|
165
|
+
# check to ensure the input is an array given that the the attribute
|
166
|
+
# is documented as an array but the input is not
|
167
|
+
if attributes[self.class.attribute_map[key]].is_a?(Array)
|
168
|
+
public_method("#{key}=").call(
|
169
|
+
attributes[self.class.attribute_map[key]]
|
170
|
+
.map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) }
|
171
|
+
)
|
172
|
+
end
|
173
|
+
elsif !attributes[self.class.attribute_map[key]].nil?
|
174
|
+
public_method("#{key}=").call(
|
175
|
+
OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]])
|
176
|
+
)
|
177
|
+
end
|
178
|
+
# or else data not found in attributes(hash), not an issue as the data can be optional
|
179
|
+
end
|
180
|
+
|
181
|
+
self
|
182
|
+
end
|
183
|
+
# rubocop:enable Metrics/AbcSize, Layout/EmptyLines
|
184
|
+
|
185
|
+
# Returns the string representation of the object
|
186
|
+
# @return [String] String presentation of the object
|
187
|
+
def to_s
|
188
|
+
to_hash.to_s
|
189
|
+
end
|
190
|
+
|
191
|
+
# Returns the object in the form of hash
|
192
|
+
# @return [Hash] Returns the object in the form of hash
|
193
|
+
def to_hash
|
194
|
+
hash = {}
|
195
|
+
self.class.attribute_map.each_pair do |attr, param|
|
196
|
+
value = public_method(attr).call
|
197
|
+
next if value.nil? && !instance_variable_defined?("@#{attr}")
|
198
|
+
|
199
|
+
hash[param] = _to_hash(value)
|
200
|
+
end
|
201
|
+
hash
|
202
|
+
end
|
203
|
+
|
204
|
+
private
|
205
|
+
|
206
|
+
# Outputs non-array value in the form of hash
|
207
|
+
# For object, use to_hash. Otherwise, just return the value
|
208
|
+
# @param [Object] value Any valid value
|
209
|
+
# @return [Hash] Returns the value in the form of hash
|
210
|
+
def _to_hash(value)
|
211
|
+
if value.is_a?(Array)
|
212
|
+
value.compact.map { |v| _to_hash(v) }
|
213
|
+
elsif value.is_a?(Hash)
|
214
|
+
{}.tap do |hash|
|
215
|
+
value.each { |k, v| hash[k] = _to_hash(v) }
|
216
|
+
end
|
217
|
+
elsif value.respond_to? :to_hash
|
218
|
+
value.to_hash
|
219
|
+
else
|
220
|
+
value
|
221
|
+
end
|
222
|
+
end
|
223
|
+
end
|
224
|
+
end
|
225
|
+
# rubocop:enable Lint/UnneededCopDisableDirective
|