Class: OCI::StackMonitoring::Models::OnboardConfigDetails
- Defined in:
- lib/oci/stack_monitoring/models/onboard_config_details.rb
Overview
A configuration of the ONBOARD type, contains fields describing Onboarding customization: policies, dynamic groups, user groups.
Constant Summary
Constants inherited from Config
Config::CONFIG_TYPE_ENUM, Config::LIFECYCLE_STATE_ENUM
Instance Attribute Summary collapse
- #additional_configurations ⇒ OCI::StackMonitoring::Models::AdditionalConfigurationDetails
-
#dynamic_groups ⇒ Array<OCI::StackMonitoring::Models::DynamicGroupDetails>
List of dynamic groups dedicated for Stack Monitoring.
-
#is_manually_onboarded ⇒ BOOLEAN
[Required] True if customer decides marks configuration as manually configured.
-
#policy_names ⇒ Array<String>
List of policy names assigned for onboarding.
-
#user_groups ⇒ Array<OCI::StackMonitoring::Models::GroupDetails>
List of user groups dedicated for Stack Monitoring.
-
#version ⇒ String
Assigned version to given onboard configuration.
Attributes inherited from Config
#compartment_id, #config_type, #defined_tags, #display_name, #freeform_tags, #id, #lifecycle_state, #system_tags, #time_created, #time_updated
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ OnboardConfigDetails
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Methods inherited from Config
Constructor Details
#initialize(attributes = {}) ⇒ OnboardConfigDetails
Initializes the object
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 106 def initialize(attributes = {}) return unless attributes.is_a?(Hash) attributes['configType'] = 'ONBOARD' super(attributes) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.version = attributes[:'version'] if attributes[:'version'] self.is_manually_onboarded = attributes[:'isManuallyOnboarded'] unless attributes[:'isManuallyOnboarded'].nil? raise 'You cannot provide both :isManuallyOnboarded and :is_manually_onboarded' if attributes.key?(:'isManuallyOnboarded') && attributes.key?(:'is_manually_onboarded') self.is_manually_onboarded = attributes[:'is_manually_onboarded'] unless attributes[:'is_manually_onboarded'].nil? self.policy_names = attributes[:'policyNames'] if attributes[:'policyNames'] raise 'You cannot provide both :policyNames and :policy_names' if attributes.key?(:'policyNames') && attributes.key?(:'policy_names') self.policy_names = attributes[:'policy_names'] if attributes[:'policy_names'] self.dynamic_groups = attributes[:'dynamicGroups'] if attributes[:'dynamicGroups'] raise 'You cannot provide both :dynamicGroups and :dynamic_groups' if attributes.key?(:'dynamicGroups') && attributes.key?(:'dynamic_groups') self.dynamic_groups = attributes[:'dynamic_groups'] if attributes[:'dynamic_groups'] self.user_groups = attributes[:'userGroups'] if attributes[:'userGroups'] raise 'You cannot provide both :userGroups and :user_groups' if attributes.key?(:'userGroups') && attributes.key?(:'user_groups') self.user_groups = attributes[:'user_groups'] if attributes[:'user_groups'] self.additional_configurations = attributes[:'additionalConfigurations'] if attributes[:'additionalConfigurations'] raise 'You cannot provide both :additionalConfigurations and :additional_configurations' if attributes.key?(:'additionalConfigurations') && attributes.key?(:'additional_configurations') self.additional_configurations = attributes[:'additional_configurations'] if attributes[:'additional_configurations'] end |
Instance Attribute Details
#additional_configurations ⇒ OCI::StackMonitoring::Models::AdditionalConfigurationDetails
35 36 37 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 35 def additional_configurations @additional_configurations end |
#dynamic_groups ⇒ Array<OCI::StackMonitoring::Models::DynamicGroupDetails>
List of dynamic groups dedicated for Stack Monitoring.
28 29 30 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 28 def dynamic_groups @dynamic_groups end |
#is_manually_onboarded ⇒ BOOLEAN
[Required] True if customer decides marks configuration as manually configured.
20 21 22 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 20 def is_manually_onboarded @is_manually_onboarded end |
#policy_names ⇒ Array<String>
List of policy names assigned for onboarding
24 25 26 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 24 def policy_names @policy_names end |
#user_groups ⇒ Array<OCI::StackMonitoring::Models::GroupDetails>
List of user groups dedicated for Stack Monitoring.
32 33 34 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 32 def user_groups @user_groups end |
#version ⇒ String
Assigned version to given onboard configuration.
16 17 18 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 16 def version @version end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 38 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'compartment_id': :'compartmentId', 'display_name': :'displayName', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'lifecycle_state': :'lifecycleState', 'config_type': :'configType', 'freeform_tags': :'freeformTags', 'defined_tags': :'definedTags', 'system_tags': :'systemTags', 'version': :'version', 'is_manually_onboarded': :'isManuallyOnboarded', 'policy_names': :'policyNames', 'dynamic_groups': :'dynamicGroups', 'user_groups': :'userGroups', 'additional_configurations': :'additionalConfigurations' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 62 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'compartment_id': :'String', 'display_name': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'lifecycle_state': :'String', 'config_type': :'String', 'freeform_tags': :'Hash<String, String>', 'defined_tags': :'Hash<String, Hash<String, Object>>', 'system_tags': :'Hash<String, Hash<String, Object>>', 'version': :'String', 'is_manually_onboarded': :'BOOLEAN', 'policy_names': :'Array<String>', 'dynamic_groups': :'Array<OCI::StackMonitoring::Models::DynamicGroupDetails>', 'user_groups': :'Array<OCI::StackMonitoring::Models::GroupDetails>', 'additional_configurations': :'OCI::StackMonitoring::Models::AdditionalConfigurationDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 156 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && compartment_id == other.compartment_id && display_name == other.display_name && time_created == other.time_created && time_updated == other.time_updated && lifecycle_state == other.lifecycle_state && config_type == other.config_type && == other. && == other. && == other. && version == other.version && is_manually_onboarded == other.is_manually_onboarded && policy_names == other.policy_names && dynamic_groups == other.dynamic_groups && user_groups == other.user_groups && additional_configurations == other.additional_configurations end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 201 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
181 182 183 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 181 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
190 191 192 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 190 def hash [id, compartment_id, display_name, time_created, time_updated, lifecycle_state, config_type, , , , version, is_manually_onboarded, policy_names, dynamic_groups, user_groups, additional_configurations].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
234 235 236 237 238 239 240 241 242 243 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 234 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
228 229 230 |
# File 'lib/oci/stack_monitoring/models/onboard_config_details.rb', line 228 def to_s to_hash.to_s end |