Class: MistApi::LicenseUsageOrg
- Defined in:
- lib/mist_api/models/license_usage_org.rb
Overview
LicenseUsageOrg Model.
Instance Attribute Summary collapse
-
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method.
-
#fully_loaded ⇒ Hash[String, Integer]
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices.
-
#num_devices ⇒ Integer
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices.
-
#site_id ⇒ UUID | String
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices.
-
#summary ⇒ Hash[String, Integer]
Number of licenses currently consumed.
-
#usages ⇒ Hash[String, Integer]
Number of available licenes.
Class Method Summary collapse
-
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
-
.names ⇒ Object
A mapping from model property names to API property names.
-
.nullables ⇒ Object
An array for nullable fields.
-
.optionals ⇒ Object
An array for optional fields.
Instance Method Summary collapse
-
#initialize(num_devices = nil, site_id = nil, usages = nil, for_site = SKIP, fully_loaded = SKIP, summary = SKIP) ⇒ LicenseUsageOrg
constructor
A new instance of LicenseUsageOrg.
-
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
-
#to_s ⇒ Object
Provides a human-readable string representation of the object.
Methods inherited from BaseModel
#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json
Constructor Details
#initialize(num_devices = nil, site_id = nil, usages = nil, for_site = SKIP, fully_loaded = SKIP, summary = SKIP) ⇒ LicenseUsageOrg
Returns a new instance of LicenseUsageOrg.
70 71 72 73 74 75 76 77 78 |
# File 'lib/mist_api/models/license_usage_org.rb', line 70 def initialize(num_devices = nil, site_id = nil, usages = nil, for_site = SKIP, fully_loaded = SKIP, summary = SKIP) @for_site = for_site unless for_site == SKIP @fully_loaded = fully_loaded unless fully_loaded == SKIP @num_devices = num_devices @site_id = site_id @summary = summary unless summary == SKIP @usages = usages end |
Instance Attribute Details
#for_site ⇒ TrueClass | FalseClass
TODO: Write general description for this method
14 15 16 |
# File 'lib/mist_api/models/license_usage_org.rb', line 14 def for_site @for_site end |
#fully_loaded ⇒ Hash[String, Integer]
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices. Property key is the service name (e.g. “SUB-MAN”).
20 21 22 |
# File 'lib/mist_api/models/license_usage_org.rb', line 20 def fully_loaded @fully_loaded end |
#num_devices ⇒ Integer
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices. Property key is the service name (e.g. “SUB-MAN”).
26 27 28 |
# File 'lib/mist_api/models/license_usage_org.rb', line 26 def num_devices @num_devices end |
#site_id ⇒ UUID | String
Maximum number of licenses that may be required if the service is enabled on all the Organization Devices. Property key is the service name (e.g. “SUB-MAN”).
32 33 34 |
# File 'lib/mist_api/models/license_usage_org.rb', line 32 def site_id @site_id end |
#summary ⇒ Hash[String, Integer]
Number of licenses currently consumed. Property key is license type (e.g. SUB-MAN).
37 38 39 |
# File 'lib/mist_api/models/license_usage_org.rb', line 37 def summary @summary end |
#usages ⇒ Hash[String, Integer]
Number of available licenes. Property key is the service name (e.g. “SUB-MAN”). name (e.g. “SUB-MAN”)
42 43 44 |
# File 'lib/mist_api/models/license_usage_org.rb', line 42 def usages @usages end |
Class Method Details
.from_hash(hash) ⇒ Object
Creates an instance of the object from a hash.
81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 |
# File 'lib/mist_api/models/license_usage_org.rb', line 81 def self.from_hash(hash) return nil unless hash # Extract variables from the hash. num_devices = hash.key?('num_devices') ? hash['num_devices'] : nil site_id = hash.key?('site_id') ? hash['site_id'] : nil usages = hash.key?('usages') ? hash['usages'] : nil for_site = hash.key?('for_site') ? hash['for_site'] : SKIP fully_loaded = hash.key?('fully_loaded') ? hash['fully_loaded'] : SKIP summary = hash.key?('summary') ? hash['summary'] : SKIP # Create object from extracted values. LicenseUsageOrg.new(num_devices, site_id, usages, for_site, fully_loaded, summary) end |
.names ⇒ Object
A mapping from model property names to API property names.
45 46 47 48 49 50 51 52 53 54 |
# File 'lib/mist_api/models/license_usage_org.rb', line 45 def self.names @_hash = {} if @_hash.nil? @_hash['for_site'] = 'for_site' @_hash['fully_loaded'] = 'fully_loaded' @_hash['num_devices'] = 'num_devices' @_hash['site_id'] = 'site_id' @_hash['summary'] = 'summary' @_hash['usages'] = 'usages' @_hash end |
.nullables ⇒ Object
An array for nullable fields
66 67 68 |
# File 'lib/mist_api/models/license_usage_org.rb', line 66 def self.nullables [] end |
.optionals ⇒ Object
An array for optional fields
57 58 59 60 61 62 63 |
# File 'lib/mist_api/models/license_usage_org.rb', line 57 def self.optionals %w[ for_site fully_loaded summary ] end |
Instance Method Details
#inspect ⇒ Object
Provides a debugging-friendly string with detailed object information.
109 110 111 112 113 114 |
# File 'lib/mist_api/models/license_usage_org.rb', line 109 def inspect class_name = self.class.name.split('::').last "<#{class_name} for_site: #{@for_site.inspect}, fully_loaded: #{@fully_loaded.inspect},"\ " num_devices: #{@num_devices.inspect}, site_id: #{@site_id.inspect}, summary:"\ " #{@summary.inspect}, usages: #{@usages.inspect}>" end |
#to_s ⇒ Object
Provides a human-readable string representation of the object.
102 103 104 105 106 |
# File 'lib/mist_api/models/license_usage_org.rb', line 102 def to_s class_name = self.class.name.split('::').last "<#{class_name} for_site: #{@for_site}, fully_loaded: #{@fully_loaded}, num_devices:"\ " #{@num_devices}, site_id: #{@site_id}, summary: #{@summary}, usages: #{@usages}>" end |