Class: CtdDocumentation::NewTaskobject

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/ctd_documentation/models/new_taskobject.rb

Overview

NewTaskobject Model.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#to_hash, #to_json

Constructor Details

#initialize(allowed_days = SKIP, allowed_run_time_end = SKIP, allowed_run_time_start = SKIP, attached_queries = SKIP, enabled = SKIP, interval = SKIP, is_recurring = SKIP, name = SKIP, network_id = SKIP, type = SKIP, end_time = SKIP, start_time = SKIP, extra_params = SKIP) ⇒ NewTaskobject

Returns a new instance of NewTaskobject.



133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 133

def initialize(allowed_days = SKIP,
               allowed_run_time_end = SKIP,
               allowed_run_time_start = SKIP,
               attached_queries = SKIP,
               enabled = SKIP,
               interval = SKIP,
               is_recurring = SKIP,
               name = SKIP,
               network_id = SKIP,
               type = SKIP,
               end_time = SKIP,
               start_time = SKIP,
               extra_params = SKIP)
  @allowed_days = allowed_days unless allowed_days == SKIP
  @allowed_run_time_end = allowed_run_time_end unless allowed_run_time_end == SKIP
  @allowed_run_time_start = allowed_run_time_start unless allowed_run_time_start == SKIP
  @attached_queries = attached_queries unless attached_queries == SKIP
  @enabled = enabled unless enabled == SKIP
  @interval = interval unless interval == SKIP
  @is_recurring = is_recurring unless is_recurring == SKIP
  @name = name unless name == SKIP
  @network_id = network_id unless network_id == SKIP
  @type = type unless type == SKIP
  @end_time = end_time unless end_time == SKIP
  @start_time = start_time unless start_time == SKIP
  @extra_params = extra_params unless extra_params == SKIP
end

Instance Attribute Details

#allowed_daysString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


16
17
18
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 16

def allowed_days
  @allowed_days
end

#allowed_run_time_endString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


22
23
24
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 22

def allowed_run_time_end
  @allowed_run_time_end
end

#allowed_run_time_startString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


28
29
30
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 28

def allowed_run_time_start
  @allowed_run_time_start
end

#attached_queriesList of Integer

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (List of Integer)


34
35
36
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 34

def attached_queries
  @attached_queries
end

#enabledTrueClass|FalseClass

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (TrueClass|FalseClass)


40
41
42
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 40

def enabled
  @enabled
end

#end_timeString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


76
77
78
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 76

def end_time
  @end_time
end

#extra_paramsTaskextraparams

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:



88
89
90
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 88

def extra_params
  @extra_params
end

#intervalString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


46
47
48
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 46

def interval
  @interval
end

#is_recurringTrueClass|FalseClass

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (TrueClass|FalseClass)


52
53
54
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 52

def is_recurring
  @is_recurring
end

#nameString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


58
59
60
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 58

def name
  @name
end

#network_idInteger

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (Integer)


64
65
66
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 64

def network_id
  @network_id
end

#start_timeString

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (String)


82
83
84
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 82

def start_time
  @start_time
end

#typeInteger

A string that represents specific days in a week, Sunday being 0 and Friday being 6. To select more than a specific day just concatenate the day number to the string

Returns:

  • (Integer)


70
71
72
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 70

def type
  @type
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 162

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  allowed_days = hash.key?('allowed_days') ? hash['allowed_days'] : SKIP
  allowed_run_time_end =
    hash.key?('allowed_run_time_end') ? hash['allowed_run_time_end'] : SKIP
  allowed_run_time_start =
    hash.key?('allowed_run_time_start') ? hash['allowed_run_time_start'] : SKIP
  attached_queries =
    hash.key?('attached_queries') ? hash['attached_queries'] : SKIP
  enabled = hash.key?('enabled') ? hash['enabled'] : SKIP
  interval = hash.key?('interval') ? hash['interval'] : SKIP
  is_recurring = hash.key?('is_recurring') ? hash['is_recurring'] : SKIP
  name = hash.key?('name') ? hash['name'] : SKIP
  network_id = hash.key?('network_id') ? hash['network_id'] : SKIP
  type = hash.key?('type') ? hash['type'] : SKIP
  end_time = hash.key?('end_time') ? hash['end_time'] : SKIP
  start_time = hash.key?('start_time') ? hash['start_time'] : SKIP
  extra_params = Taskextraparams.from_hash(hash['extra_params']) if hash['extra_params']

  # Create object from extracted values.
  NewTaskobject.new(allowed_days,
                    allowed_run_time_end,
                    allowed_run_time_start,
                    attached_queries,
                    enabled,
                    interval,
                    is_recurring,
                    name,
                    network_id,
                    type,
                    end_time,
                    start_time,
                    extra_params)
end

.namesObject

A mapping from model property names to API property names.



91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 91

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['allowed_days'] = 'allowed_days'
  @_hash['allowed_run_time_end'] = 'allowed_run_time_end'
  @_hash['allowed_run_time_start'] = 'allowed_run_time_start'
  @_hash['attached_queries'] = 'attached_queries'
  @_hash['enabled'] = 'enabled'
  @_hash['interval'] = 'interval'
  @_hash['is_recurring'] = 'is_recurring'
  @_hash['name'] = 'name'
  @_hash['network_id'] = 'network_id'
  @_hash['type'] = 'type'
  @_hash['end_time'] = 'end_time'
  @_hash['start_time'] = 'start_time'
  @_hash['extra_params'] = 'extra_params'
  @_hash
end

.nullablesObject

An array for nullable fields



129
130
131
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 129

def self.nullables
  []
end

.optionalsObject

An array for optional fields



110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
# File 'lib/ctd_documentation/models/new_taskobject.rb', line 110

def self.optionals
  %w[
    allowed_days
    allowed_run_time_end
    allowed_run_time_start
    attached_queries
    enabled
    interval
    is_recurring
    name
    network_id
    type
    end_time
    start_time
    extra_params
  ]
end