Class: MistApi::OrgE911Report

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/mist_api/models/org_e911_report.rb

Overview

E911 AP BSSID report status for the organization

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(detail = SKIP, last_generated = SKIP, status = SKIP, url = SKIP) ⇒ OrgE911Report

Returns a new instance of OrgE911Report.



56
57
58
59
60
61
62
# File 'lib/mist_api/models/org_e911_report.rb', line 56

def initialize(detail = SKIP, last_generated = SKIP, status = SKIP,
               url = SKIP)
  @detail = detail unless detail == SKIP
  @last_generated = last_generated unless last_generated == SKIP
  @status = status unless status == SKIP
  @url = url unless url == SKIP
end

Instance Attribute Details

#detailString

Human-readable description of the action taken

Returns:

  • (String)


14
15
16
# File 'lib/mist_api/models/org_e911_report.rb', line 14

def detail
  @detail
end

#last_generatedInteger

Unix timestamp of when the report file was last generated. Only present when ‘status` is `available`.

Returns:

  • (Integer)


19
20
21
# File 'lib/mist_api/models/org_e911_report.rb', line 19

def last_generated
  @last_generated
end

#statusOrgE911ReportStatusEnum

Current status of E911 report generation. enum: ‘disabled`, `scheduled`, `available`



24
25
26
# File 'lib/mist_api/models/org_e911_report.rb', line 24

def status
  @status
end

#urlString

Presigned URL to download the CSV file. Only present when ‘status` is `available`.

Returns:

  • (String)


29
30
31
# File 'lib/mist_api/models/org_e911_report.rb', line 29

def url
  @url
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
# File 'lib/mist_api/models/org_e911_report.rb', line 65

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  detail = hash.key?('detail') ? hash['detail'] : SKIP
  last_generated =
    hash.key?('last_generated') ? hash['last_generated'] : SKIP
  status = hash.key?('status') ? hash['status'] : SKIP
  url = hash.key?('url') ? hash['url'] : SKIP

  # Create object from extracted values.
  OrgE911Report.new(detail,
                    last_generated,
                    status,
                    url)
end

.namesObject

A mapping from model property names to API property names.



32
33
34
35
36
37
38
39
# File 'lib/mist_api/models/org_e911_report.rb', line 32

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['detail'] = 'detail'
  @_hash['last_generated'] = 'last_generated'
  @_hash['status'] = 'status'
  @_hash['url'] = 'url'
  @_hash
end

.nullablesObject

An array for nullable fields



52
53
54
# File 'lib/mist_api/models/org_e911_report.rb', line 52

def self.nullables
  []
end

.optionalsObject

An array for optional fields



42
43
44
45
46
47
48
49
# File 'lib/mist_api/models/org_e911_report.rb', line 42

def self.optionals
  %w[
    detail
    last_generated
    status
    url
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



90
91
92
93
94
# File 'lib/mist_api/models/org_e911_report.rb', line 90

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} detail: #{@detail.inspect}, last_generated: #{@last_generated.inspect},"\
  " status: #{@status.inspect}, url: #{@url.inspect}>"
end

#to_sObject

Provides a human-readable string representation of the object.



83
84
85
86
87
# File 'lib/mist_api/models/org_e911_report.rb', line 83

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} detail: #{@detail}, last_generated: #{@last_generated}, status: #{@status},"\
  " url: #{@url}>"
end