Class: OCI::Opsi::Models::ChargebackPlanReportSummary
- Inherits:
-
Object
- Object
- OCI::Opsi::Models::ChargebackPlanReportSummary
- Defined in:
- lib/oci/opsi/models/chargeback_plan_report_summary.rb
Overview
Summary of a Ops Insights chargeback plan report
Constant Summary collapse
- RESOURCE_TYPE_ENUM =
[ RESOURCE_TYPE_EXADATA_INSIGHT = 'EXADATA_INSIGHT'.freeze, RESOURCE_TYPE_DATABASE_INSIGHT = 'DATABASE_INSIGHT'.freeze, RESOURCE_TYPE_HOST_INSIGHT = 'HOST_INSIGHT'.freeze, RESOURCE_TYPE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#report_id ⇒ String
[Required] OCID of the Chargeback plan report.
-
#report_name ⇒ String
[Required] The chargeback plan report name.
-
#report_properties ⇒ OCI::Opsi::Models::ReportPropertyDetails
This attribute is required.
-
#resource_id ⇒ String
[Required] OCID of the Chargeback plan report.
-
#resource_type ⇒ String
[Required] Defines the type of resource (example: EXADATA, HOST).
-
#time_created ⇒ DateTime
[Required] The date and time the chargeback plan was created, in the format defined by RFC3339.
-
#time_updated ⇒ DateTime
[Required] The time chargeback plan was 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 = {}) ⇒ ChargebackPlanReportSummary
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 = {}) ⇒ ChargebackPlanReportSummary
Initializes the object
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 127 128 129 130 131 132 133 134 135 136 137 138 139 140 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 93 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.report_id = attributes[:'reportId'] if attributes[:'reportId'] raise 'You cannot provide both :reportId and :report_id' if attributes.key?(:'reportId') && attributes.key?(:'report_id') self.report_id = attributes[:'report_id'] if attributes[:'report_id'] self.report_name = attributes[:'reportName'] if attributes[:'reportName'] raise 'You cannot provide both :reportName and :report_name' if attributes.key?(:'reportName') && attributes.key?(:'report_name') self.report_name = attributes[:'report_name'] if attributes[:'report_name'] self.resource_type = attributes[:'resourceType'] if attributes[:'resourceType'] raise 'You cannot provide both :resourceType and :resource_type' if attributes.key?(:'resourceType') && attributes.key?(:'resource_type') self.resource_type = attributes[:'resource_type'] if attributes[:'resource_type'] self.resource_id = attributes[:'resourceId'] if attributes[:'resourceId'] raise 'You cannot provide both :resourceId and :resource_id' if attributes.key?(:'resourceId') && attributes.key?(:'resource_id') self.resource_id = attributes[:'resource_id'] if attributes[:'resource_id'] self.time_created = attributes[:'timeCreated'] if attributes[:'timeCreated'] raise 'You cannot provide both :timeCreated and :time_created' if attributes.key?(:'timeCreated') && attributes.key?(:'time_created') self.time_created = attributes[:'time_created'] if attributes[:'time_created'] self.time_updated = attributes[:'timeUpdated'] if attributes[:'timeUpdated'] raise 'You cannot provide both :timeUpdated and :time_updated' if attributes.key?(:'timeUpdated') && attributes.key?(:'time_updated') self.time_updated = attributes[:'time_updated'] if attributes[:'time_updated'] self.report_properties = attributes[:'reportProperties'] if attributes[:'reportProperties'] raise 'You cannot provide both :reportProperties and :report_properties' if attributes.key?(:'reportProperties') && attributes.key?(:'report_properties') self.report_properties = attributes[:'report_properties'] if attributes[:'report_properties'] end |
Instance Attribute Details
#report_id ⇒ String
[Required] OCID of the Chargeback plan report.
22 23 24 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 22 def report_id @report_id end |
#report_name ⇒ String
[Required] The chargeback plan report name.
26 27 28 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 26 def report_name @report_name end |
#report_properties ⇒ OCI::Opsi::Models::ReportPropertyDetails
This attribute is required.
48 49 50 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 48 def report_properties @report_properties end |
#resource_id ⇒ String
[Required] OCID of the Chargeback plan report.
36 37 38 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 36 def resource_id @resource_id end |
#resource_type ⇒ String
[Required] Defines the type of resource (example: EXADATA, HOST)
31 32 33 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 31 def resource_type @resource_type end |
#time_created ⇒ DateTime
[Required] The date and time the chargeback plan was created, in the format defined by RFC3339.
40 41 42 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 40 def time_created @time_created end |
#time_updated ⇒ DateTime
[Required] The time chargeback plan was updated. An RFC3339 formatted datetime string
44 45 46 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 44 def time_updated @time_updated end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
51 52 53 54 55 56 57 58 59 60 61 62 63 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 51 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'report_id': :'reportId', 'report_name': :'reportName', 'resource_type': :'resourceType', 'resource_id': :'resourceId', 'time_created': :'timeCreated', 'time_updated': :'timeUpdated', 'report_properties': :'reportProperties' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
66 67 68 69 70 71 72 73 74 75 76 77 78 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 66 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'report_id': :'String', 'report_name': :'String', 'resource_type': :'String', 'resource_id': :'String', 'time_created': :'DateTime', 'time_updated': :'DateTime', 'report_properties': :'OCI::Opsi::Models::ReportPropertyDetails' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
162 163 164 165 166 167 168 169 170 171 172 173 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 162 def ==(other) return true if equal?(other) self.class == other.class && report_id == other.report_id && report_name == other.report_name && resource_type == other.resource_type && resource_id == other.resource_id && time_created == other.time_created && time_updated == other.time_updated && report_properties == other.report_properties end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 198 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
178 179 180 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 178 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
187 188 189 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 187 def hash [report_id, report_name, resource_type, resource_id, time_created, time_updated, report_properties].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
231 232 233 234 235 236 237 238 239 240 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 231 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
225 226 227 |
# File 'lib/oci/opsi/models/chargeback_plan_report_summary.rb', line 225 def to_s to_hash.to_s end |