
com.amazonaws.services.deadline.model.SearchJobsRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-deadline Show documentation
/*
* Copyright 2019-2024 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.deadline.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 SearchJobsRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The farm ID of the job.
*
*/
private String farmId;
/**
*
* The filter expression, AND
or OR
, to use when searching among a group of search strings
* in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*
*/
private SearchGroupedFilterExpressions filterExpressions;
/**
*
* Defines how far into the scrollable list to start the return of results.
*
*/
private Integer itemOffset;
/**
*
* Specifies the number of items per page for the resource.
*
*/
private Integer pageSize;
/**
*
* The queue ID to use in the job search.
*
*/
private java.util.List queueIds;
/**
*
* The search terms for a resource.
*
*/
private java.util.List sortExpressions;
/**
*
* The farm ID of the job.
*
*
* @param farmId
* The farm ID of the job.
*/
public void setFarmId(String farmId) {
this.farmId = farmId;
}
/**
*
* The farm ID of the job.
*
*
* @return The farm ID of the job.
*/
public String getFarmId() {
return this.farmId;
}
/**
*
* The farm ID of the job.
*
*
* @param farmId
* The farm ID of the job.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withFarmId(String farmId) {
setFarmId(farmId);
return this;
}
/**
*
* The filter expression, AND
or OR
, to use when searching among a group of search strings
* in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*
*
* @param filterExpressions
* The filter expression, AND
or OR
, to use when searching among a group of search
* strings in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*/
public void setFilterExpressions(SearchGroupedFilterExpressions filterExpressions) {
this.filterExpressions = filterExpressions;
}
/**
*
* The filter expression, AND
or OR
, to use when searching among a group of search strings
* in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*
*
* @return The filter expression, AND
or OR
, to use when searching among a group of search
* strings in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*/
public SearchGroupedFilterExpressions getFilterExpressions() {
return this.filterExpressions;
}
/**
*
* The filter expression, AND
or OR
, to use when searching among a group of search strings
* in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
*
*
* @param filterExpressions
* The filter expression, AND
or OR
, to use when searching among a group of search
* strings in a resource.
*
* You can use two groupings per search each within parenthesis ()
.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withFilterExpressions(SearchGroupedFilterExpressions filterExpressions) {
setFilterExpressions(filterExpressions);
return this;
}
/**
*
* Defines how far into the scrollable list to start the return of results.
*
*
* @param itemOffset
* Defines how far into the scrollable list to start the return of results.
*/
public void setItemOffset(Integer itemOffset) {
this.itemOffset = itemOffset;
}
/**
*
* Defines how far into the scrollable list to start the return of results.
*
*
* @return Defines how far into the scrollable list to start the return of results.
*/
public Integer getItemOffset() {
return this.itemOffset;
}
/**
*
* Defines how far into the scrollable list to start the return of results.
*
*
* @param itemOffset
* Defines how far into the scrollable list to start the return of results.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withItemOffset(Integer itemOffset) {
setItemOffset(itemOffset);
return this;
}
/**
*
* Specifies the number of items per page for the resource.
*
*
* @param pageSize
* Specifies the number of items per page for the resource.
*/
public void setPageSize(Integer pageSize) {
this.pageSize = pageSize;
}
/**
*
* Specifies the number of items per page for the resource.
*
*
* @return Specifies the number of items per page for the resource.
*/
public Integer getPageSize() {
return this.pageSize;
}
/**
*
* Specifies the number of items per page for the resource.
*
*
* @param pageSize
* Specifies the number of items per page for the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withPageSize(Integer pageSize) {
setPageSize(pageSize);
return this;
}
/**
*
* The queue ID to use in the job search.
*
*
* @return The queue ID to use in the job search.
*/
public java.util.List getQueueIds() {
return queueIds;
}
/**
*
* The queue ID to use in the job search.
*
*
* @param queueIds
* The queue ID to use in the job search.
*/
public void setQueueIds(java.util.Collection queueIds) {
if (queueIds == null) {
this.queueIds = null;
return;
}
this.queueIds = new java.util.ArrayList(queueIds);
}
/**
*
* The queue ID to use in the job search.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setQueueIds(java.util.Collection)} or {@link #withQueueIds(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param queueIds
* The queue ID to use in the job search.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withQueueIds(String... queueIds) {
if (this.queueIds == null) {
setQueueIds(new java.util.ArrayList(queueIds.length));
}
for (String ele : queueIds) {
this.queueIds.add(ele);
}
return this;
}
/**
*
* The queue ID to use in the job search.
*
*
* @param queueIds
* The queue ID to use in the job search.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withQueueIds(java.util.Collection queueIds) {
setQueueIds(queueIds);
return this;
}
/**
*
* The search terms for a resource.
*
*
* @return The search terms for a resource.
*/
public java.util.List getSortExpressions() {
return sortExpressions;
}
/**
*
* The search terms for a resource.
*
*
* @param sortExpressions
* The search terms for a resource.
*/
public void setSortExpressions(java.util.Collection sortExpressions) {
if (sortExpressions == null) {
this.sortExpressions = null;
return;
}
this.sortExpressions = new java.util.ArrayList(sortExpressions);
}
/**
*
* The search terms for a resource.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setSortExpressions(java.util.Collection)} or {@link #withSortExpressions(java.util.Collection)} if you
* want to override the existing values.
*
*
* @param sortExpressions
* The search terms for a resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withSortExpressions(SearchSortExpression... sortExpressions) {
if (this.sortExpressions == null) {
setSortExpressions(new java.util.ArrayList(sortExpressions.length));
}
for (SearchSortExpression ele : sortExpressions) {
this.sortExpressions.add(ele);
}
return this;
}
/**
*
* The search terms for a resource.
*
*
* @param sortExpressions
* The search terms for a resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public SearchJobsRequest withSortExpressions(java.util.Collection sortExpressions) {
setSortExpressions(sortExpressions);
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 (getFarmId() != null)
sb.append("FarmId: ").append(getFarmId()).append(",");
if (getFilterExpressions() != null)
sb.append("FilterExpressions: ").append(getFilterExpressions()).append(",");
if (getItemOffset() != null)
sb.append("ItemOffset: ").append(getItemOffset()).append(",");
if (getPageSize() != null)
sb.append("PageSize: ").append(getPageSize()).append(",");
if (getQueueIds() != null)
sb.append("QueueIds: ").append(getQueueIds()).append(",");
if (getSortExpressions() != null)
sb.append("SortExpressions: ").append(getSortExpressions());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof SearchJobsRequest == false)
return false;
SearchJobsRequest other = (SearchJobsRequest) obj;
if (other.getFarmId() == null ^ this.getFarmId() == null)
return false;
if (other.getFarmId() != null && other.getFarmId().equals(this.getFarmId()) == false)
return false;
if (other.getFilterExpressions() == null ^ this.getFilterExpressions() == null)
return false;
if (other.getFilterExpressions() != null && other.getFilterExpressions().equals(this.getFilterExpressions()) == false)
return false;
if (other.getItemOffset() == null ^ this.getItemOffset() == null)
return false;
if (other.getItemOffset() != null && other.getItemOffset().equals(this.getItemOffset()) == false)
return false;
if (other.getPageSize() == null ^ this.getPageSize() == null)
return false;
if (other.getPageSize() != null && other.getPageSize().equals(this.getPageSize()) == false)
return false;
if (other.getQueueIds() == null ^ this.getQueueIds() == null)
return false;
if (other.getQueueIds() != null && other.getQueueIds().equals(this.getQueueIds()) == false)
return false;
if (other.getSortExpressions() == null ^ this.getSortExpressions() == null)
return false;
if (other.getSortExpressions() != null && other.getSortExpressions().equals(this.getSortExpressions()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFarmId() == null) ? 0 : getFarmId().hashCode());
hashCode = prime * hashCode + ((getFilterExpressions() == null) ? 0 : getFilterExpressions().hashCode());
hashCode = prime * hashCode + ((getItemOffset() == null) ? 0 : getItemOffset().hashCode());
hashCode = prime * hashCode + ((getPageSize() == null) ? 0 : getPageSize().hashCode());
hashCode = prime * hashCode + ((getQueueIds() == null) ? 0 : getQueueIds().hashCode());
hashCode = prime * hashCode + ((getSortExpressions() == null) ? 0 : getSortExpressions().hashCode());
return hashCode;
}
@Override
public SearchJobsRequest clone() {
return (SearchJobsRequest) super.clone();
}
}