/* * Copyright 2018-2023 Amazon.com, Inc. or its affiliates. All Rights Reserved. * * Licensed under the Apache License, Version 2.0 (the "License"). You may not use this file except in compliance with * the License. A copy of the License is located at * * http://aws.amazon.com/apache2.0 * * or in the "license" file accompanying this file. This file is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR * CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions * and limitations under the License. */ package com.amazonaws.services.gluedatabrew.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; /** * * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class CreateScheduleRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *
* The name or names of one or more jobs to be run. *
*/ private java.util.List* The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue DataBrew * Developer Guide. *
*/ private String cronExpression; /** ** Metadata tags to apply to this schedule. *
*/ private java.util.Map* A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and * space. *
*/ private String name; /** ** The name or names of one or more jobs to be run. *
* * @return The name or names of one or more jobs to be run. */ public java.util.List* The name or names of one or more jobs to be run. *
* * @param jobNames * The name or names of one or more jobs to be run. */ public void setJobNames(java.util.Collection* The name or names of one or more jobs to be run. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setJobNames(java.util.Collection)} or {@link #withJobNames(java.util.Collection)} if you want to override * the existing values. *
* * @param jobNames * The name or names of one or more jobs to be run. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduleRequest withJobNames(String... jobNames) { if (this.jobNames == null) { setJobNames(new java.util.ArrayList* The name or names of one or more jobs to be run. *
* * @param jobNames * The name or names of one or more jobs to be run. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduleRequest withJobNames(java.util.Collection* The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue DataBrew * Developer Guide. *
* * @param cronExpression * The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue * DataBrew Developer Guide. */ public void setCronExpression(String cronExpression) { this.cronExpression = cronExpression; } /** ** The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue DataBrew * Developer Guide. *
* * @return The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue * DataBrew Developer Guide. */ public String getCronExpression() { return this.cronExpression; } /** ** The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue DataBrew * Developer Guide. *
* * @param cronExpression * The date or dates and time or times when the jobs are to be run. For more information, see Cron expressions in the Glue * DataBrew Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduleRequest withCronExpression(String cronExpression) { setCronExpression(cronExpression); return this; } /** ** Metadata tags to apply to this schedule. *
* * @return Metadata tags to apply to this schedule. */ public java.util.Map* Metadata tags to apply to this schedule. *
* * @param tags * Metadata tags to apply to this schedule. */ public void setTags(java.util.Map* Metadata tags to apply to this schedule. *
* * @param tags * Metadata tags to apply to this schedule. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduleRequest withTags(java.util.Map* A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and * space. *
* * @param name * A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), * and space. */ public void setName(String name) { this.name = name; } /** ** A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and * space. *
* * @return A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period * (.), and space. */ public String getName() { return this.name; } /** ** A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), and * space. *
* * @param name * A unique name for the schedule. Valid characters are alphanumeric (A-Z, a-z, 0-9), hyphen (-), period (.), * and space. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateScheduleRequest withName(String name) { setName(name); return this; } /** * Returns a string representation of this object. This is useful for testing and debugging. Sensitive data will be * redacted from this string using a placeholder value. * * @return A string representation of this object. * * @see java.lang.Object#toString() */ @Override public String toString() { StringBuilder sb = new StringBuilder(); sb.append("{"); if (getJobNames() != null) sb.append("JobNames: ").append(getJobNames()).append(","); if (getCronExpression() != null) sb.append("CronExpression: ").append(getCronExpression()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateScheduleRequest == false) return false; CreateScheduleRequest other = (CreateScheduleRequest) obj; if (other.getJobNames() == null ^ this.getJobNames() == null) return false; if (other.getJobNames() != null && other.getJobNames().equals(this.getJobNames()) == false) return false; if (other.getCronExpression() == null ^ this.getCronExpression() == null) return false; if (other.getCronExpression() != null && other.getCronExpression().equals(this.getCronExpression()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getJobNames() == null) ? 0 : getJobNames().hashCode()); hashCode = prime * hashCode + ((getCronExpression() == null) ? 0 : getCronExpression().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; } @Override public CreateScheduleRequest clone() { return (CreateScheduleRequest) super.clone(); } }