@@ -22,22 +22,22 @@ class CreateMaintenanceRequestDataAttributes
2222 include BaseGenericModel
2323
2424 # Timestamp of when the maintenance was completed.
25- attr_accessor :completed_date
25+ attr_reader :completed_date
2626
2727 # The description shown when the maintenance is completed.
28- attr_accessor :completed_description
28+ attr_reader :completed_description
2929
3030 # The components affected by the maintenance.
3131 attr_reader :components_affected
3232
3333 # The description shown while the maintenance is in progress.
34- attr_accessor :in_progress_description
34+ attr_reader :in_progress_description
3535
3636 # The description shown when the maintenance is scheduled.
37- attr_accessor :scheduled_description
37+ attr_reader :scheduled_description
3838
3939 # Timestamp of when the maintenance is scheduled to start.
40- attr_accessor :start_date
40+ attr_reader :start_date
4141
4242 # The title of the maintenance.
4343 attr_reader :title
@@ -125,11 +125,36 @@ def initialize(attributes = {})
125125 # @return true if the model is valid
126126 # @!visibility private
127127 def valid?
128+ return false if @completed_date . nil?
129+ return false if @completed_description . nil?
128130 return false if @components_affected . nil?
131+ return false if @in_progress_description . nil?
132+ return false if @scheduled_description . nil?
133+ return false if @start_date . nil?
129134 return false if @title . nil?
130135 true
131136 end
132137
138+ # Custom attribute writer method with validation
139+ # @param completed_date [Object] Object to be assigned
140+ # @!visibility private
141+ def completed_date = ( completed_date )
142+ if completed_date . nil?
143+ fail ArgumentError , 'invalid value for "completed_date", completed_date cannot be nil.'
144+ end
145+ @completed_date = completed_date
146+ end
147+
148+ # Custom attribute writer method with validation
149+ # @param completed_description [Object] Object to be assigned
150+ # @!visibility private
151+ def completed_description = ( completed_description )
152+ if completed_description . nil?
153+ fail ArgumentError , 'invalid value for "completed_description", completed_description cannot be nil.'
154+ end
155+ @completed_description = completed_description
156+ end
157+
133158 # Custom attribute writer method with validation
134159 # @param components_affected [Object] Object to be assigned
135160 # @!visibility private
@@ -140,6 +165,36 @@ def components_affected=(components_affected)
140165 @components_affected = components_affected
141166 end
142167
168+ # Custom attribute writer method with validation
169+ # @param in_progress_description [Object] Object to be assigned
170+ # @!visibility private
171+ def in_progress_description = ( in_progress_description )
172+ if in_progress_description . nil?
173+ fail ArgumentError , 'invalid value for "in_progress_description", in_progress_description cannot be nil.'
174+ end
175+ @in_progress_description = in_progress_description
176+ end
177+
178+ # Custom attribute writer method with validation
179+ # @param scheduled_description [Object] Object to be assigned
180+ # @!visibility private
181+ def scheduled_description = ( scheduled_description )
182+ if scheduled_description . nil?
183+ fail ArgumentError , 'invalid value for "scheduled_description", scheduled_description cannot be nil.'
184+ end
185+ @scheduled_description = scheduled_description
186+ end
187+
188+ # Custom attribute writer method with validation
189+ # @param start_date [Object] Object to be assigned
190+ # @!visibility private
191+ def start_date = ( start_date )
192+ if start_date . nil?
193+ fail ArgumentError , 'invalid value for "start_date", start_date cannot be nil.'
194+ end
195+ @start_date = start_date
196+ end
197+
143198 # Custom attribute writer method with validation
144199 # @param title [Object] Object to be assigned
145200 # @!visibility private
0 commit comments