Class: OCI::FleetAppsManagement::Models::ComplianceDetailPolicy
- Inherits:
-
Object
- Object
- OCI::FleetAppsManagement::Models::ComplianceDetailPolicy
- Defined in:
- lib/oci/fleet_apps_management/models/compliance_detail_policy.rb
Overview
Details of the Policy associated
Instance Attribute Summary collapse
-
#compliance_policy_display_name ⇒ String
Compliane Policy DisplayName.
-
#compliance_policy_id ⇒ String
[Required] Compliance Policy Id.
-
#compliance_policy_rule_display_name ⇒ String
Product Name.
-
#compliance_policy_rule_id ⇒ String
Compliane Policy Rule Id.
-
#grace_period ⇒ String
Grace period in days,weeks,months or years the exemption is applicable for the rule.
- #patch_selection ⇒ OCI::FleetAppsManagement::Models::PatchSelectionDetails
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 = {}) ⇒ ComplianceDetailPolicy
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.
Constructor Details
#initialize(attributes = {}) ⇒ ComplianceDetailPolicy
Initializes the object
74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 74 def initialize(attributes = {}) return unless attributes.is_a?(Hash) # convert string to symbol for hash key attributes = attributes.each_with_object({}) { |(k, v), h| h[k.to_sym] = v } self.compliance_policy_id = attributes[:'compliancePolicyId'] if attributes[:'compliancePolicyId'] raise 'You cannot provide both :compliancePolicyId and :compliance_policy_id' if attributes.key?(:'compliancePolicyId') && attributes.key?(:'compliance_policy_id') self.compliance_policy_id = attributes[:'compliance_policy_id'] if attributes[:'compliance_policy_id'] self.compliance_policy_display_name = attributes[:'compliancePolicyDisplayName'] if attributes[:'compliancePolicyDisplayName'] raise 'You cannot provide both :compliancePolicyDisplayName and :compliance_policy_display_name' if attributes.key?(:'compliancePolicyDisplayName') && attributes.key?(:'compliance_policy_display_name') self.compliance_policy_display_name = attributes[:'compliance_policy_display_name'] if attributes[:'compliance_policy_display_name'] self.compliance_policy_rule_id = attributes[:'compliancePolicyRuleId'] if attributes[:'compliancePolicyRuleId'] raise 'You cannot provide both :compliancePolicyRuleId and :compliance_policy_rule_id' if attributes.key?(:'compliancePolicyRuleId') && attributes.key?(:'compliance_policy_rule_id') self.compliance_policy_rule_id = attributes[:'compliance_policy_rule_id'] if attributes[:'compliance_policy_rule_id'] self.compliance_policy_rule_display_name = attributes[:'compliancePolicyRuleDisplayName'] if attributes[:'compliancePolicyRuleDisplayName'] raise 'You cannot provide both :compliancePolicyRuleDisplayName and :compliance_policy_rule_display_name' if attributes.key?(:'compliancePolicyRuleDisplayName') && attributes.key?(:'compliance_policy_rule_display_name') self.compliance_policy_rule_display_name = attributes[:'compliance_policy_rule_display_name'] if attributes[:'compliance_policy_rule_display_name'] self.grace_period = attributes[:'gracePeriod'] if attributes[:'gracePeriod'] raise 'You cannot provide both :gracePeriod and :grace_period' if attributes.key?(:'gracePeriod') && attributes.key?(:'grace_period') self.grace_period = attributes[:'grace_period'] if attributes[:'grace_period'] self.patch_selection = attributes[:'patchSelection'] if attributes[:'patchSelection'] raise 'You cannot provide both :patchSelection and :patch_selection' if attributes.key?(:'patchSelection') && attributes.key?(:'patch_selection') self.patch_selection = attributes[:'patch_selection'] if attributes[:'patch_selection'] end |
Instance Attribute Details
#compliance_policy_display_name ⇒ String
Compliane Policy DisplayName
17 18 19 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 17 def compliance_policy_display_name @compliance_policy_display_name end |
#compliance_policy_id ⇒ String
[Required] Compliance Policy Id
13 14 15 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 13 def compliance_policy_id @compliance_policy_id end |
#compliance_policy_rule_display_name ⇒ String
Product Name
25 26 27 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 25 def compliance_policy_rule_display_name @compliance_policy_rule_display_name end |
#compliance_policy_rule_id ⇒ String
Compliane Policy Rule Id
21 22 23 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 21 def compliance_policy_rule_id @compliance_policy_rule_id end |
#grace_period ⇒ String
Grace period in days,weeks,months or years the exemption is applicable for the rule.
29 30 31 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 29 def grace_period @grace_period end |
#patch_selection ⇒ OCI::FleetAppsManagement::Models::PatchSelectionDetails
32 33 34 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 32 def patch_selection @patch_selection end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
35 36 37 38 39 40 41 42 43 44 45 46 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 35 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'compliance_policy_id': :'compliancePolicyId', 'compliance_policy_display_name': :'compliancePolicyDisplayName', 'compliance_policy_rule_id': :'compliancePolicyRuleId', 'compliance_policy_rule_display_name': :'compliancePolicyRuleDisplayName', 'grace_period': :'gracePeriod', 'patch_selection': :'patchSelection' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 49 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'compliance_policy_id': :'String', 'compliance_policy_display_name': :'String', 'compliance_policy_rule_id': :'String', 'compliance_policy_rule_display_name': :'String', 'grace_period': :'String', 'patch_selection': :'OCI::FleetAppsManagement::Models::PatchSelectionDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
124 125 126 127 128 129 130 131 132 133 134 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 124 def ==(other) return true if equal?(other) self.class == other.class && compliance_policy_id == other.compliance_policy_id && compliance_policy_display_name == other.compliance_policy_display_name && compliance_policy_rule_id == other.compliance_policy_rule_id && compliance_policy_rule_display_name == other.compliance_policy_rule_display_name && grace_period == other.grace_period && patch_selection == other.patch_selection end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 159 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
139 140 141 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 139 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
148 149 150 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 148 def hash [compliance_policy_id, compliance_policy_display_name, compliance_policy_rule_id, compliance_policy_rule_display_name, grace_period, patch_selection].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
192 193 194 195 196 197 198 199 200 201 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 192 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
186 187 188 |
# File 'lib/oci/fleet_apps_management/models/compliance_detail_policy.rb', line 186 def to_s to_hash.to_s end |