Class: OCI::OsManagementHub::Models::PackageGroupSummary
- Inherits:
-
Object
- Object
- OCI::OsManagementHub::Models::PackageGroupSummary
- Defined in:
- lib/oci/os_management_hub/models/package_group_summary.rb
Overview
The yum or DNF package group that is associated with a software source.
Instance Attribute Summary collapse
-
#description ⇒ String
Description of the package group.
-
#display_order ⇒ Integer
Indicates the order to display category or environment.
-
#group_type ⇒ String
Indicates if this is a group, category or environment.
-
#id ⇒ String
[Required] Package group identifier.
-
#is_default ⇒ BOOLEAN
Indicates if this package group is the default.
-
#is_user_visible ⇒ BOOLEAN
Indicates if this package group is visible to users.
-
#name ⇒ String
[Required] Package group name.
-
#repositories ⇒ Array<String>
The repository IDs of the package group.
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 = {}) ⇒ PackageGroupSummary
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 = {}) ⇒ PackageGroupSummary
Initializes the object
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 116 117 118 119 120 121 122 123 124 125 126 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 89 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.id = attributes[:'id'] if attributes[:'id'] self.name = attributes[:'name'] if attributes[:'name'] self.description = attributes[:'description'] if attributes[:'description'] self.is_user_visible = attributes[:'isUserVisible'] unless attributes[:'isUserVisible'].nil? raise 'You cannot provide both :isUserVisible and :is_user_visible' if attributes.key?(:'isUserVisible') && attributes.key?(:'is_user_visible') self.is_user_visible = attributes[:'is_user_visible'] unless attributes[:'is_user_visible'].nil? self.is_default = attributes[:'isDefault'] unless attributes[:'isDefault'].nil? raise 'You cannot provide both :isDefault and :is_default' if attributes.key?(:'isDefault') && attributes.key?(:'is_default') self.is_default = attributes[:'is_default'] unless attributes[:'is_default'].nil? self.repositories = attributes[:'repositories'] if attributes[:'repositories'] self.group_type = attributes[:'groupType'] if attributes[:'groupType'] raise 'You cannot provide both :groupType and :group_type' if attributes.key?(:'groupType') && attributes.key?(:'group_type') self.group_type = attributes[:'group_type'] if attributes[:'group_type'] self.display_order = attributes[:'displayOrder'] if attributes[:'displayOrder'] raise 'You cannot provide both :displayOrder and :display_order' if attributes.key?(:'displayOrder') && attributes.key?(:'display_order') self.display_order = attributes[:'display_order'] if attributes[:'display_order'] end |
Instance Attribute Details
#description ⇒ String
Description of the package group.
21 22 23 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 21 def description @description end |
#display_order ⇒ Integer
Indicates the order to display category or environment.
41 42 43 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 41 def display_order @display_order end |
#group_type ⇒ String
Indicates if this is a group, category or environment.
37 38 39 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 37 def group_type @group_type end |
#id ⇒ String
[Required] Package group identifier.
13 14 15 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 13 def id @id end |
#is_default ⇒ BOOLEAN
Indicates if this package group is the default.
29 30 31 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 29 def is_default @is_default end |
#is_user_visible ⇒ BOOLEAN
Indicates if this package group is visible to users.
25 26 27 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 25 def is_user_visible @is_user_visible end |
#name ⇒ String
[Required] Package group name.
17 18 19 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 17 def name @name end |
#repositories ⇒ Array<String>
The repository IDs of the package group.
33 34 35 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 33 def repositories @repositories end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 44 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'id': :'id', 'name': :'name', 'description': :'description', 'is_user_visible': :'isUserVisible', 'is_default': :'isDefault', 'repositories': :'repositories', 'group_type': :'groupType', 'display_order': :'displayOrder' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 60 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'id': :'String', 'name': :'String', 'description': :'String', 'is_user_visible': :'BOOLEAN', 'is_default': :'BOOLEAN', 'repositories': :'Array<String>', 'group_type': :'String', 'display_order': :'Integer' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
135 136 137 138 139 140 141 142 143 144 145 146 147 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 135 def ==(other) return true if equal?(other) self.class == other.class && id == other.id && name == other.name && description == other.description && is_user_visible == other.is_user_visible && is_default == other.is_default && repositories == other.repositories && group_type == other.group_type && display_order == other.display_order end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 172 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
152 153 154 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 152 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
161 162 163 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 161 def hash [id, name, description, is_user_visible, is_default, repositories, group_type, display_order].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
205 206 207 208 209 210 211 212 213 214 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 205 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
199 200 201 |
# File 'lib/oci/os_management_hub/models/package_group_summary.rb', line 199 def to_s to_hash.to_s end |