Class Database.MaintenanceSchedule
java.lang.Object
com.github.cowwoc.digitalocean.resource.Database.MaintenanceSchedule
-
Constructor Summary
ConstructorsConstructorDescriptionMaintenanceSchedule
(DigitalOceanClient client, OffsetTime hour, DayOfWeek day, boolean pending, List<String> descriptions) Creates a new schedule. -
Method Summary
Modifier and TypeMethodDescriptionday()
Returns the day of the week when maintenance may take place.boolean
Converts this object to a type that is accepted byDatabaseCreator
.Returns a list of strings, each containing information about a pending maintenance update.int
hashCode()
hour()
Returns the start hour when maintenance may take place.boolean
Determines whether any maintenance is scheduled to be performed in the next maintenance window.toString()
-
Constructor Details
-
MaintenanceSchedule
public MaintenanceSchedule(DigitalOceanClient client, OffsetTime hour, DayOfWeek day, boolean pending, List<String> descriptions) Creates a new schedule.- Parameters:
client
- the client configurationhour
- the start hour when maintenance may take placeday
- the day of the week when maintenance may take placepending
- determines whether any maintenance is scheduled to be performed in the next maintenance windowdescriptions
- a list of strings, each containing information about a pending maintenance update- Throws:
NullPointerException
- if any of the arguments are nullIllegalArgumentException
- if:- one of the
descriptions
contains leading or trailing whitespace or is empty. hour
contains a non-zero minute, second or nano component.
- one of the
-
-
Method Details
-
hour
-
day
Returns the day of the week when maintenance may take place.- Returns:
- the day
-
isPending
public boolean isPending()Determines whether any maintenance is scheduled to be performed in the next maintenance window.- Returns:
true
if maintenance is scheduled
-
getDescriptions
-
hashCode
-
equals
-
toString
-
forCreator
Converts this object to a type that is accepted byDatabaseCreator
.- Returns:
- the
DatabaseCreator.MaintenanceSchedule
-