/**
 * Copyright (c) Microsoft Corporation. All rights reserved.
 * Licensed under the MIT License. See License.txt in the project root for
 * license information.
 *
 * Code generated by Microsoft (R) AutoRest Code Generator.
 */

package com.microsoft.azure.batch.protocol.models;

import java.util.List;
import com.fasterxml.jackson.annotation.JsonProperty;

/**
 * The set of changes to be made to a Job Schedule.
 */
public class JobSchedulePatchParameter {
    /**
     * The schedule according to which Jobs will be created.
     * All times are fixed respective to UTC and are not impacted by daylight
     * saving time. If you do not specify this element, the existing schedule
     * is left unchanged.
     */
    @JsonProperty(value = "schedule")
    private Schedule schedule;

    /**
     * The details of the Jobs to be created on this schedule.
     * Updates affect only Jobs that are started after the update has taken
     * place. Any currently active Job continues with the older specification.
     */
    @JsonProperty(value = "jobSpecification")
    private JobSpecification jobSpecification;

    /**
     * A list of name-value pairs associated with the Job Schedule as metadata.
     * If you do not specify this element, existing metadata is left unchanged.
     */
    @JsonProperty(value = "metadata")
    private List<MetadataItem> metadata;

    /**
     * Get all times are fixed respective to UTC and are not impacted by daylight saving time. If you do not specify this element, the existing schedule is left unchanged.
     *
     * @return the schedule value
     */
    public Schedule schedule() {
        return this.schedule;
    }

    /**
     * Set all times are fixed respective to UTC and are not impacted by daylight saving time. If you do not specify this element, the existing schedule is left unchanged.
     *
     * @param schedule the schedule value to set
     * @return the JobSchedulePatchParameter object itself.
     */
    public JobSchedulePatchParameter withSchedule(Schedule schedule) {
        this.schedule = schedule;
        return this;
    }

    /**
     * Get updates affect only Jobs that are started after the update has taken place. Any currently active Job continues with the older specification.
     *
     * @return the jobSpecification value
     */
    public JobSpecification jobSpecification() {
        return this.jobSpecification;
    }

    /**
     * Set updates affect only Jobs that are started after the update has taken place. Any currently active Job continues with the older specification.
     *
     * @param jobSpecification the jobSpecification value to set
     * @return the JobSchedulePatchParameter object itself.
     */
    public JobSchedulePatchParameter withJobSpecification(JobSpecification jobSpecification) {
        this.jobSpecification = jobSpecification;
        return this;
    }

    /**
     * Get if you do not specify this element, existing metadata is left unchanged.
     *
     * @return the metadata value
     */
    public List<MetadataItem> metadata() {
        return this.metadata;
    }

    /**
     * Set if you do not specify this element, existing metadata is left unchanged.
     *
     * @param metadata the metadata value to set
     * @return the JobSchedulePatchParameter object itself.
     */
    public JobSchedulePatchParameter withMetadata(List<MetadataItem> metadata) {
        this.metadata = metadata;
        return this;
    }

}
