Class: Cadenya::Types::AgentScheduleSpec_Schedule
- Inherits:
-
Object
- Object
- Cadenya::Types::AgentScheduleSpec_Schedule
- Defined in:
- lib/cadenya/types.rb
Instance Attribute Summary collapse
-
#calendars ⇒ Object
readonly
Returns the value of attribute calendars.
-
#intervals ⇒ Object
readonly
Returns the value of attribute intervals.
-
#timezone ⇒ Object
readonly
Returns the value of attribute timezone.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(calendars: nil, intervals: nil, timezone: nil) ⇒ AgentScheduleSpec_Schedule
constructor
A new instance of AgentScheduleSpec_Schedule.
- #to_h ⇒ Object
Constructor Details
#initialize(calendars: nil, intervals: nil, timezone: nil) ⇒ AgentScheduleSpec_Schedule
Returns a new instance of AgentScheduleSpec_Schedule.
546 547 548 549 550 |
# File 'lib/cadenya/types.rb', line 546 def initialize(calendars: nil, intervals: nil, timezone: nil) @calendars = calendars @intervals = intervals @timezone = timezone end |
Instance Attribute Details
#calendars ⇒ Object (readonly)
Returns the value of attribute calendars.
544 545 546 |
# File 'lib/cadenya/types.rb', line 544 def calendars @calendars end |
#intervals ⇒ Object (readonly)
Returns the value of attribute intervals.
544 545 546 |
# File 'lib/cadenya/types.rb', line 544 def intervals @intervals end |
#timezone ⇒ Object (readonly)
Returns the value of attribute timezone.
544 545 546 |
# File 'lib/cadenya/types.rb', line 544 def timezone @timezone end |
Class Method Details
.from_json(data) ⇒ Object
552 553 554 555 556 557 558 |
# File 'lib/cadenya/types.rb', line 552 def self.from_json(data) new( calendars: data["calendars"].nil? ? nil : (data["calendars"]).map { |item| Types::Schedule_Calendar.from_json(item) }, intervals: data["intervals"].nil? ? nil : (data["intervals"]).map { |item| Types::Schedule_Interval.from_json(item) }, timezone: data["timezone"], ) end |