com.azure.resourcemanager.automation.models.ScheduleCreateOrUpdateParameters Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of azure-resourcemanager-automation Show documentation
Show all versions of azure-resourcemanager-automation Show documentation
This package contains Microsoft Azure SDK for Automation Management SDK. For documentation on how to use this package, please see https://aka.ms/azsdk/java/mgmt. Automation Client. Package tag package-2019-06.
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.automation.models;
import com.azure.core.annotation.Fluent;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonProperty;
import java.time.OffsetDateTime;
/** The parameters supplied to the create or update schedule operation. */
@JsonFlatten
@Fluent
public class ScheduleCreateOrUpdateParameters {
@JsonIgnore private final ClientLogger logger = new ClientLogger(ScheduleCreateOrUpdateParameters.class);
/*
* Gets or sets the name of the Schedule.
*/
@JsonProperty(value = "name", required = true)
private String name;
/*
* Gets or sets the description of the schedule.
*/
@JsonProperty(value = "properties.description")
private String description;
/*
* Gets or sets the start time of the schedule.
*/
@JsonProperty(value = "properties.startTime", required = true)
private OffsetDateTime startTime;
/*
* Gets or sets the end time of the schedule.
*/
@JsonProperty(value = "properties.expiryTime")
private OffsetDateTime expiryTime;
/*
* Gets or sets the interval of the schedule.
*/
@JsonProperty(value = "properties.interval")
private Object interval;
/*
* Gets or sets the frequency of the schedule.
*/
@JsonProperty(value = "properties.frequency", required = true)
private ScheduleFrequency frequency;
/*
* Gets or sets the time zone of the schedule.
*/
@JsonProperty(value = "properties.timeZone")
private String timeZone;
/*
* Gets or sets the AdvancedSchedule.
*/
@JsonProperty(value = "properties.advancedSchedule")
private AdvancedSchedule advancedSchedule;
/**
* Get the name property: Gets or sets the name of the Schedule.
*
* @return the name value.
*/
public String name() {
return this.name;
}
/**
* Set the name property: Gets or sets the name of the Schedule.
*
* @param name the name value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withName(String name) {
this.name = name;
return this;
}
/**
* Get the description property: Gets or sets the description of the schedule.
*
* @return the description value.
*/
public String description() {
return this.description;
}
/**
* Set the description property: Gets or sets the description of the schedule.
*
* @param description the description value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withDescription(String description) {
this.description = description;
return this;
}
/**
* Get the startTime property: Gets or sets the start time of the schedule.
*
* @return the startTime value.
*/
public OffsetDateTime startTime() {
return this.startTime;
}
/**
* Set the startTime property: Gets or sets the start time of the schedule.
*
* @param startTime the startTime value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withStartTime(OffsetDateTime startTime) {
this.startTime = startTime;
return this;
}
/**
* Get the expiryTime property: Gets or sets the end time of the schedule.
*
* @return the expiryTime value.
*/
public OffsetDateTime expiryTime() {
return this.expiryTime;
}
/**
* Set the expiryTime property: Gets or sets the end time of the schedule.
*
* @param expiryTime the expiryTime value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withExpiryTime(OffsetDateTime expiryTime) {
this.expiryTime = expiryTime;
return this;
}
/**
* Get the interval property: Gets or sets the interval of the schedule.
*
* @return the interval value.
*/
public Object interval() {
return this.interval;
}
/**
* Set the interval property: Gets or sets the interval of the schedule.
*
* @param interval the interval value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withInterval(Object interval) {
this.interval = interval;
return this;
}
/**
* Get the frequency property: Gets or sets the frequency of the schedule.
*
* @return the frequency value.
*/
public ScheduleFrequency frequency() {
return this.frequency;
}
/**
* Set the frequency property: Gets or sets the frequency of the schedule.
*
* @param frequency the frequency value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withFrequency(ScheduleFrequency frequency) {
this.frequency = frequency;
return this;
}
/**
* Get the timeZone property: Gets or sets the time zone of the schedule.
*
* @return the timeZone value.
*/
public String timeZone() {
return this.timeZone;
}
/**
* Set the timeZone property: Gets or sets the time zone of the schedule.
*
* @param timeZone the timeZone value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withTimeZone(String timeZone) {
this.timeZone = timeZone;
return this;
}
/**
* Get the advancedSchedule property: Gets or sets the AdvancedSchedule.
*
* @return the advancedSchedule value.
*/
public AdvancedSchedule advancedSchedule() {
return this.advancedSchedule;
}
/**
* Set the advancedSchedule property: Gets or sets the AdvancedSchedule.
*
* @param advancedSchedule the advancedSchedule value to set.
* @return the ScheduleCreateOrUpdateParameters object itself.
*/
public ScheduleCreateOrUpdateParameters withAdvancedSchedule(AdvancedSchedule advancedSchedule) {
this.advancedSchedule = advancedSchedule;
return this;
}
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
if (name() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property name in model ScheduleCreateOrUpdateParameters"));
}
if (startTime() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property startTime in model ScheduleCreateOrUpdateParameters"));
}
if (frequency() == null) {
throw logger
.logExceptionAsError(
new IllegalArgumentException(
"Missing required property frequency in model ScheduleCreateOrUpdateParameters"));
}
if (advancedSchedule() != null) {
advancedSchedule().validate();
}
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy