Class: Files::SyncApiUsageSnapshotReport

Inherits:
Object
  • Object
show all
Defined in:
lib/files.com/models/sync_api_usage_snapshot_report.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(attributes = {}, options = {}) ⇒ SyncApiUsageSnapshotReport

Returns a new instance of SyncApiUsageSnapshotReport.



7
8
9
10
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 7

def initialize(attributes = {}, options = {})
  @attributes = attributes || {}
  @options = options || {}
end

Instance Attribute Details

#attributesObject (readonly)

Returns the value of attribute attributes.



5
6
7
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 5

def attributes
  @attributes
end

#optionsObject (readonly)

Returns the value of attribute options.



5
6
7
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 5

def options
  @options
end

Class Method Details

.create(params = {}, options = {}) ⇒ Object

Parameters:

start_time - string - start time of statistics collection
end_time - string - end time of statistics collection
uuid - string - Unique ID for this entry
auth_cache_hits - int64 - Numbers of hits of the authentication cache
auth_cache_misses - int64 - Numbers of misses of the authentication cache
auth_api_requests_for_sftp - int64 - A count of api authentications requests for SFTP
auth_api_requests_for_ftp - int64 - A count of api authentications requests for FTP
auth_api_requests_for_dav - int64 - A count of api authentications requests for DAV
auth_api_requests_for_desktop - int64 - A count of api authentications requests for Desktop
auth_api_requests_for_restapi - int64 - A count of api authentications requests for Restapi
number_of_sync_api_usage_snapshots - int64 - A count of the number of api usage logs
sync_api_usage_snapshots - array(object)


144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 144

def self.create(params = {}, options = {})
  raise InvalidParameterError.new("Bad parameter: start_time must be an String") if params[:start_time] and !params[:start_time].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: end_time must be an String") if params[:end_time] and !params[:end_time].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: uuid must be an String") if params[:uuid] and !params[:uuid].is_a?(String)
  raise InvalidParameterError.new("Bad parameter: auth_cache_hits must be an Integer") if params[:auth_cache_hits] and !params[:auth_cache_hits].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_cache_misses must be an Integer") if params[:auth_cache_misses] and !params[:auth_cache_misses].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_api_requests_for_sftp must be an Integer") if params[:auth_api_requests_for_sftp] and !params[:auth_api_requests_for_sftp].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_api_requests_for_ftp must be an Integer") if params[:auth_api_requests_for_ftp] and !params[:auth_api_requests_for_ftp].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_api_requests_for_dav must be an Integer") if params[:auth_api_requests_for_dav] and !params[:auth_api_requests_for_dav].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_api_requests_for_desktop must be an Integer") if params[:auth_api_requests_for_desktop] and !params[:auth_api_requests_for_desktop].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: auth_api_requests_for_restapi must be an Integer") if params[:auth_api_requests_for_restapi] and !params[:auth_api_requests_for_restapi].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: number_of_sync_api_usage_snapshots must be an Integer") if params[:number_of_sync_api_usage_snapshots] and !params[:number_of_sync_api_usage_snapshots].is_a?(Integer)
  raise InvalidParameterError.new("Bad parameter: sync_api_usage_snapshots must be an Array") if params[:sync_api_usage_snapshots] and !params[:sync_api_usage_snapshots].is_a?(Array)

  response, options = Api.send_request("/sync_api_usage_snapshot_reports", :post, params, options)
  SyncApiUsageSnapshotReport.new(response.data, options)
end

Instance Method Details

#auth_api_requests_for_davObject

int64 - A count of api authentications requests for DAV



76
77
78
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 76

def auth_api_requests_for_dav
  @attributes[:auth_api_requests_for_dav]
end

#auth_api_requests_for_dav=(value) ⇒ Object



80
81
82
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 80

def auth_api_requests_for_dav=(value)
  @attributes[:auth_api_requests_for_dav] = value
end

#auth_api_requests_for_desktopObject

int64 - A count of api authentications requests for Desktop



85
86
87
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 85

def auth_api_requests_for_desktop
  @attributes[:auth_api_requests_for_desktop]
end

#auth_api_requests_for_desktop=(value) ⇒ Object



89
90
91
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 89

def auth_api_requests_for_desktop=(value)
  @attributes[:auth_api_requests_for_desktop] = value
end

#auth_api_requests_for_ftpObject

int64 - A count of api authentications requests for FTP



67
68
69
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 67

def auth_api_requests_for_ftp
  @attributes[:auth_api_requests_for_ftp]
end

#auth_api_requests_for_ftp=(value) ⇒ Object



71
72
73
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 71

def auth_api_requests_for_ftp=(value)
  @attributes[:auth_api_requests_for_ftp] = value
end

#auth_api_requests_for_restapiObject

int64 - A count of api authentications requests for Restapi



94
95
96
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 94

def auth_api_requests_for_restapi
  @attributes[:auth_api_requests_for_restapi]
end

#auth_api_requests_for_restapi=(value) ⇒ Object



98
99
100
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 98

def auth_api_requests_for_restapi=(value)
  @attributes[:auth_api_requests_for_restapi] = value
end

#auth_api_requests_for_sftpObject

int64 - A count of api authentications requests for SFTP



58
59
60
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 58

def auth_api_requests_for_sftp
  @attributes[:auth_api_requests_for_sftp]
end

#auth_api_requests_for_sftp=(value) ⇒ Object



62
63
64
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 62

def auth_api_requests_for_sftp=(value)
  @attributes[:auth_api_requests_for_sftp] = value
end

#auth_cache_hitsObject

int64 - Numbers of hits of the authentication cache



40
41
42
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 40

def auth_cache_hits
  @attributes[:auth_cache_hits]
end

#auth_cache_hits=(value) ⇒ Object



44
45
46
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 44

def auth_cache_hits=(value)
  @attributes[:auth_cache_hits] = value
end

#auth_cache_missesObject

int64 - Numbers of misses of the authentication cache



49
50
51
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 49

def auth_cache_misses
  @attributes[:auth_cache_misses]
end

#auth_cache_misses=(value) ⇒ Object



53
54
55
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 53

def auth_cache_misses=(value)
  @attributes[:auth_cache_misses] = value
end

#end_timeObject

date-time - end time of statistics collection



22
23
24
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 22

def end_time
  @attributes[:end_time]
end

#end_time=(value) ⇒ Object



26
27
28
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 26

def end_time=(value)
  @attributes[:end_time] = value
end

#number_of_sync_api_usage_snapshotsObject

int64 - A count of the number of api usage logs



103
104
105
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 103

def number_of_sync_api_usage_snapshots
  @attributes[:number_of_sync_api_usage_snapshots]
end

#number_of_sync_api_usage_snapshots=(value) ⇒ Object



107
108
109
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 107

def number_of_sync_api_usage_snapshots=(value)
  @attributes[:number_of_sync_api_usage_snapshots] = value
end

#saveObject



120
121
122
123
124
125
126
127
128
129
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 120

def save
  if @attributes[:id]
    raise NotImplementedError.new("The SyncApiUsageSnapshotReport object doesn't support updates.")
  else
    new_obj = SyncApiUsageSnapshotReport.create(@attributes, @options)
  end

  @attributes = new_obj.attributes
  true
end

#start_timeObject

date-time - start time of statistics collection



13
14
15
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 13

def start_time
  @attributes[:start_time]
end

#start_time=(value) ⇒ Object



17
18
19
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 17

def start_time=(value)
  @attributes[:start_time] = value
end

#sync_api_usage_snapshotsObject

array(object) - A list of all the api usage logs



112
113
114
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 112

def sync_api_usage_snapshots
  @attributes[:sync_api_usage_snapshots]
end

#sync_api_usage_snapshots=(value) ⇒ Object



116
117
118
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 116

def sync_api_usage_snapshots=(value)
  @attributes[:sync_api_usage_snapshots] = value
end

#uuidObject

string - Unique ID for this entry



31
32
33
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 31

def uuid
  @attributes[:uuid]
end

#uuid=(value) ⇒ Object



35
36
37
# File 'lib/files.com/models/sync_api_usage_snapshot_report.rb', line 35

def uuid=(value)
  @attributes[:uuid] = value
end