class OCI::Jms::Models::RequestSummarizedManagedInstanceUsageDetails
Parameters for filtering managed instances.
Constants
- MANAGED_INSTANCE_TYPE_ENUM
- SORT_BY_ENUM
- SORT_ORDER_ENUM
Attributes
The ID of the related application. @return [String]
Additional fields to include into the returned model on top of the required ones. This parameter can also include 'approximateJreCount', 'approximateInstallationCount' and 'approximateApplicationCount'. For example 'approximateJreCount,approximateInstallationCount'.
@return [Array<OCI::Jms::Models::SummarizeManagedInstanceUsageFields>]
The installation path of the related installation. @return [String]
The distribution of the related Java Runtime. @return [String]
The vendor of the related Java Runtime. @return [String]
The version of the related Java Runtime. @return [String]
The ID of the managed instance. @return [String]
type of the managed instance @return [String]
The field to sort managed instance views. Only one sort order may be provided. Default order for timeFirstSeen, timeLastSeen, approximateJreCount_, approximateInstallationCount and approximateApplicationCount is descending. If no value is specified timeLastSeen is default.
@return [String]
The sort order to use, either 'asc' or 'desc'. @return [String]
The end of the time period during which resources are searched (formatted according to RFC3339). Defaults to current time.
@return [DateTime]
The start of the time period during which resources are searched (formatted according to RFC3339). Defaults to current time minus seven days.
@return [DateTime]
Public Class Methods
Attribute mapping from ruby-style variable name to JSON key.
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 85 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'time_start': :'timeStart', 'time_end': :'timeEnd', 'installation_path': :'installationPath', 'jre_vendor': :'jreVendor', 'jre_distribution': :'jreDistribution', 'jre_version': :'jreVersion', 'application_id': :'applicationId', 'managed_instance_id': :'managedInstanceId', 'managed_instance_type': :'managedInstanceType', 'sort_order': :'sortOrder', 'sort_by': :'sortBy', 'fields': :'fields' # rubocop:enable Style/SymbolLiteral } end
Initializes the object @param [Hash] attributes Model attributes in the form of hash @option attributes [DateTime] :time_start The value to assign to the {#time_start} property @option attributes [DateTime] :time_end The value to assign to the {#time_end} property @option attributes [String] :installation_path The value to assign to the {#installation_path} property @option attributes [String] :jre_vendor The value to assign to the {#jre_vendor} property @option attributes [String] :jre_distribution The value to assign to the {#jre_distribution} property @option attributes [String] :jre_version The value to assign to the {#jre_version} property @option attributes [String] :application_id The value to assign to the {#application_id} property @option attributes [String] :managed_instance_id The value to assign to the {#managed_instance_id} property @option attributes [String] :managed_instance_type The value to assign to the {#managed_instance_type} property @option attributes [String] :sort_order The value to assign to the {#sort_order} property @option attributes [String] :sort_by The value to assign to the {#sort_by} property @option attributes [Array<OCI::Jms::Models::SummarizeManagedInstanceUsageFields>] :fields The value to assign to the {#fields} property
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 142 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.time_start = attributes[:'timeStart'] if attributes[:'timeStart'] raise 'You cannot provide both :timeStart and :time_start' if attributes.key?(:'timeStart') && attributes.key?(:'time_start') self.time_start = attributes[:'time_start'] if attributes[:'time_start'] self.time_end = attributes[:'timeEnd'] if attributes[:'timeEnd'] raise 'You cannot provide both :timeEnd and :time_end' if attributes.key?(:'timeEnd') && attributes.key?(:'time_end') self.time_end = attributes[:'time_end'] if attributes[:'time_end'] self.installation_path = attributes[:'installationPath'] if attributes[:'installationPath'] raise 'You cannot provide both :installationPath and :installation_path' if attributes.key?(:'installationPath') && attributes.key?(:'installation_path') self.installation_path = attributes[:'installation_path'] if attributes[:'installation_path'] self.jre_vendor = attributes[:'jreVendor'] if attributes[:'jreVendor'] raise 'You cannot provide both :jreVendor and :jre_vendor' if attributes.key?(:'jreVendor') && attributes.key?(:'jre_vendor') self.jre_vendor = attributes[:'jre_vendor'] if attributes[:'jre_vendor'] self.jre_distribution = attributes[:'jreDistribution'] if attributes[:'jreDistribution'] raise 'You cannot provide both :jreDistribution and :jre_distribution' if attributes.key?(:'jreDistribution') && attributes.key?(:'jre_distribution') self.jre_distribution = attributes[:'jre_distribution'] if attributes[:'jre_distribution'] self.jre_version = attributes[:'jreVersion'] if attributes[:'jreVersion'] raise 'You cannot provide both :jreVersion and :jre_version' if attributes.key?(:'jreVersion') && attributes.key?(:'jre_version') self.jre_version = attributes[:'jre_version'] if attributes[:'jre_version'] self.application_id = attributes[:'applicationId'] if attributes[:'applicationId'] raise 'You cannot provide both :applicationId and :application_id' if attributes.key?(:'applicationId') && attributes.key?(:'application_id') self.application_id = attributes[:'application_id'] if attributes[:'application_id'] self.managed_instance_id = attributes[:'managedInstanceId'] if attributes[:'managedInstanceId'] raise 'You cannot provide both :managedInstanceId and :managed_instance_id' if attributes.key?(:'managedInstanceId') && attributes.key?(:'managed_instance_id') self.managed_instance_id = attributes[:'managed_instance_id'] if attributes[:'managed_instance_id'] self.managed_instance_type = attributes[:'managedInstanceType'] if attributes[:'managedInstanceType'] raise 'You cannot provide both :managedInstanceType and :managed_instance_type' if attributes.key?(:'managedInstanceType') && attributes.key?(:'managed_instance_type') self.managed_instance_type = attributes[:'managed_instance_type'] if attributes[:'managed_instance_type'] self.sort_order = attributes[:'sortOrder'] if attributes[:'sortOrder'] self.sort_order = "ASC" if sort_order.nil? && !attributes.key?(:'sortOrder') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :sortOrder and :sort_order' if attributes.key?(:'sortOrder') && attributes.key?(:'sort_order') self.sort_order = attributes[:'sort_order'] if attributes[:'sort_order'] self.sort_order = "ASC" if sort_order.nil? && !attributes.key?(:'sortOrder') && !attributes.key?(:'sort_order') # rubocop:disable Style/StringLiterals self.sort_by = attributes[:'sortBy'] if attributes[:'sortBy'] self.sort_by = "timeLastSeen" if sort_by.nil? && !attributes.key?(:'sortBy') # rubocop:disable Style/StringLiterals raise 'You cannot provide both :sortBy and :sort_by' if attributes.key?(:'sortBy') && attributes.key?(:'sort_by') self.sort_by = attributes[:'sort_by'] if attributes[:'sort_by'] self.sort_by = "timeLastSeen" if sort_by.nil? && !attributes.key?(:'sortBy') && !attributes.key?(:'sort_by') # rubocop:disable Style/StringLiterals self.fields = attributes[:'fields'] if attributes[:'fields'] end
Attribute type mapping.
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 105 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'time_start': :'DateTime', 'time_end': :'DateTime', 'installation_path': :'String', 'jre_vendor': :'String', 'jre_distribution': :'String', 'jre_version': :'String', 'application_id': :'String', 'managed_instance_id': :'String', 'managed_instance_type': :'String', 'sort_order': :'String', 'sort_by': :'String', 'fields': :'Array<OCI::Jms::Models::SummarizeManagedInstanceUsageFields>' # rubocop:enable Style/SymbolLiteral } end
Public Instance Methods
Checks equality by comparing each attribute. @param [Object] other the other object to be compared
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 252 def ==(other) return true if equal?(other) self.class == other.class && time_start == other.time_start && time_end == other.time_end && installation_path == other.installation_path && jre_vendor == other.jre_vendor && jre_distribution == other.jre_distribution && jre_version == other.jre_version && application_id == other.application_id && managed_instance_id == other.managed_instance_id && managed_instance_type == other.managed_instance_type && sort_order == other.sort_order && sort_by == other.sort_by && fields == other.fields end
Builds the object from hash @param [Hash] attributes Model attributes in the form of hash @return [Object] Returns the model itself
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 293 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
@see the `==` method @param [Object] other the other object to be compared
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 273 def eql?(other) self == other end
Calculates hash code according to all attributes. @return [Fixnum] Hash code
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 282 def hash [time_start, time_end, installation_path, jre_vendor, jre_distribution, jre_version, application_id, managed_instance_id, managed_instance_type, sort_order, sort_by, fields].hash end
Custom attribute writer method checking allowed values (enum). @param [Object] managed_instance_type
Object
to be assigned
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 225 def managed_instance_type=(managed_instance_type) raise "Invalid value for 'managed_instance_type': this must be one of the values in MANAGED_INSTANCE_TYPE_ENUM." if managed_instance_type && !MANAGED_INSTANCE_TYPE_ENUM.include?(managed_instance_type) @managed_instance_type = managed_instance_type end
Custom attribute writer method checking allowed values (enum). @param [Object] sort_by
Object
to be assigned
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 241 def sort_by=(sort_by) raise "Invalid value for 'sort_by': this must be one of the values in SORT_BY_ENUM." if sort_by && !SORT_BY_ENUM.include?(sort_by) @sort_by = sort_by end
Custom attribute writer method checking allowed values (enum). @param [Object] sort_order
Object
to be assigned
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 233 def sort_order=(sort_order) raise "Invalid value for 'sort_order': this must be one of the values in SORT_ORDER_ENUM." if sort_order && !SORT_ORDER_ENUM.include?(sort_order) @sort_order = sort_order end
Returns the object in the form of hash @return [Hash] Returns the object in the form of hash
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 326 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
Returns the string representation of the object @return [String] String presentation of the object
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 320 def to_s to_hash.to_s end
Private Instance Methods
Outputs non-array value in the form of hash For object, use to_hash. Otherwise, just return the value @param [Object] value Any valid value @return [Hash] Returns the value in the form of hash
# File lib/oci/jms/models/request_summarized_managed_instance_usage_details.rb, line 343 def _to_hash(value) if value.is_a?(Array) value.compact.map { |v| _to_hash(v) } elsif value.is_a?(Hash) {}.tap do |hash| value.each { |k, v| hash[k] = _to_hash(v) } end elsif value.respond_to? :to_hash value.to_hash else value end end