/* * 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.applicationdiscovery.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.AmazonWebServiceRequest; @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StartExportTaskRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable { /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

*/ private java.util.List exportDataFormat; /** *

* If a filter is present, it selects the single agentId of the Application Discovery Agent for which * data is exported. The agentId can be found in the results of the DescribeAgents API or * CLI. If no filter is present, startTime and endTime are ignored and exported data * includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary * data from Application Discovery Agent agents. *

*/ private java.util.List filters; /** *

* The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, data is exported starting from the first data collected by the agent. *

*/ private java.util.Date startTime; /** *

* The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, exported data includes the most recent data collected by the agent. *

*/ private java.util.Date endTime; /** *

* Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. *

*/ private ExportPreferences preferences; /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

* * @return The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. * @see ExportDataFormat */ public java.util.List getExportDataFormat() { return exportDataFormat; } /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

* * @param exportDataFormat * The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. * @see ExportDataFormat */ public void setExportDataFormat(java.util.Collection exportDataFormat) { if (exportDataFormat == null) { this.exportDataFormat = null; return; } this.exportDataFormat = new java.util.ArrayList(exportDataFormat); } /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setExportDataFormat(java.util.Collection)} or {@link #withExportDataFormat(java.util.Collection)} if you * want to override the existing values. *

* * @param exportDataFormat * The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. * @return Returns a reference to this object so that method calls can be chained together. * @see ExportDataFormat */ public StartExportTaskRequest withExportDataFormat(String... exportDataFormat) { if (this.exportDataFormat == null) { setExportDataFormat(new java.util.ArrayList(exportDataFormat.length)); } for (String ele : exportDataFormat) { this.exportDataFormat.add(ele); } return this; } /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

* * @param exportDataFormat * The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. * @return Returns a reference to this object so that method calls can be chained together. * @see ExportDataFormat */ public StartExportTaskRequest withExportDataFormat(java.util.Collection exportDataFormat) { setExportDataFormat(exportDataFormat); return this; } /** *

* The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. *

* * @param exportDataFormat * The file format for the returned export data. Default value is CSV. Note: The * GRAPHML option has been deprecated. * @return Returns a reference to this object so that method calls can be chained together. * @see ExportDataFormat */ public StartExportTaskRequest withExportDataFormat(ExportDataFormat... exportDataFormat) { java.util.ArrayList exportDataFormatCopy = new java.util.ArrayList(exportDataFormat.length); for (ExportDataFormat value : exportDataFormat) { exportDataFormatCopy.add(value.toString()); } if (getExportDataFormat() == null) { setExportDataFormat(exportDataFormatCopy); } else { getExportDataFormat().addAll(exportDataFormatCopy); } return this; } /** *

* If a filter is present, it selects the single agentId of the Application Discovery Agent for which * data is exported. The agentId can be found in the results of the DescribeAgents API or * CLI. If no filter is present, startTime and endTime are ignored and exported data * includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary * data from Application Discovery Agent agents. *

* * @return If a filter is present, it selects the single agentId of the Application Discovery Agent for * which data is exported. The agentId can be found in the results of the * DescribeAgents API or CLI. If no filter is present, startTime and * endTime are ignored and exported data includes both Amazon Web Services Application * Discovery Service Agentless Collector collectors data and summary data from Application Discovery Agent * agents. */ public java.util.List getFilters() { return filters; } /** *

* If a filter is present, it selects the single agentId of the Application Discovery Agent for which * data is exported. The agentId can be found in the results of the DescribeAgents API or * CLI. If no filter is present, startTime and endTime are ignored and exported data * includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary * data from Application Discovery Agent agents. *

* * @param filters * If a filter is present, it selects the single agentId of the Application Discovery Agent for * which data is exported. The agentId can be found in the results of the * DescribeAgents API or CLI. If no filter is present, startTime and * endTime are ignored and exported data includes both Amazon Web Services Application Discovery * Service Agentless Collector collectors data and summary data from Application Discovery Agent agents. */ public void setFilters(java.util.Collection filters) { if (filters == null) { this.filters = null; return; } this.filters = new java.util.ArrayList(filters); } /** *

* If a filter is present, it selects the single agentId of the Application Discovery Agent for which * data is exported. The agentId can be found in the results of the DescribeAgents API or * CLI. If no filter is present, startTime and endTime are ignored and exported data * includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary * data from Application Discovery Agent agents. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setFilters(java.util.Collection)} or {@link #withFilters(java.util.Collection)} if you want to override * the existing values. *

* * @param filters * If a filter is present, it selects the single agentId of the Application Discovery Agent for * which data is exported. The agentId can be found in the results of the * DescribeAgents API or CLI. If no filter is present, startTime and * endTime are ignored and exported data includes both Amazon Web Services Application Discovery * Service Agentless Collector collectors data and summary data from Application Discovery Agent agents. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExportTaskRequest withFilters(ExportFilter... filters) { if (this.filters == null) { setFilters(new java.util.ArrayList(filters.length)); } for (ExportFilter ele : filters) { this.filters.add(ele); } return this; } /** *

* If a filter is present, it selects the single agentId of the Application Discovery Agent for which * data is exported. The agentId can be found in the results of the DescribeAgents API or * CLI. If no filter is present, startTime and endTime are ignored and exported data * includes both Amazon Web Services Application Discovery Service Agentless Collector collectors data and summary * data from Application Discovery Agent agents. *

* * @param filters * If a filter is present, it selects the single agentId of the Application Discovery Agent for * which data is exported. The agentId can be found in the results of the * DescribeAgents API or CLI. If no filter is present, startTime and * endTime are ignored and exported data includes both Amazon Web Services Application Discovery * Service Agentless Collector collectors data and summary data from Application Discovery Agent agents. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExportTaskRequest withFilters(java.util.Collection filters) { setFilters(filters); return this; } /** *

* The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, data is exported starting from the first data collected by the agent. *

* * @param startTime * The start timestamp for exported data from the single Application Discovery Agent selected in the filters. * If no value is specified, data is exported starting from the first data collected by the agent. */ public void setStartTime(java.util.Date startTime) { this.startTime = startTime; } /** *

* The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, data is exported starting from the first data collected by the agent. *

* * @return The start timestamp for exported data from the single Application Discovery Agent selected in the * filters. If no value is specified, data is exported starting from the first data collected by the agent. */ public java.util.Date getStartTime() { return this.startTime; } /** *

* The start timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, data is exported starting from the first data collected by the agent. *

* * @param startTime * The start timestamp for exported data from the single Application Discovery Agent selected in the filters. * If no value is specified, data is exported starting from the first data collected by the agent. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExportTaskRequest withStartTime(java.util.Date startTime) { setStartTime(startTime); return this; } /** *

* The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, exported data includes the most recent data collected by the agent. *

* * @param endTime * The end timestamp for exported data from the single Application Discovery Agent selected in the filters. * If no value is specified, exported data includes the most recent data collected by the agent. */ public void setEndTime(java.util.Date endTime) { this.endTime = endTime; } /** *

* The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, exported data includes the most recent data collected by the agent. *

* * @return The end timestamp for exported data from the single Application Discovery Agent selected in the filters. * If no value is specified, exported data includes the most recent data collected by the agent. */ public java.util.Date getEndTime() { return this.endTime; } /** *

* The end timestamp for exported data from the single Application Discovery Agent selected in the filters. If no * value is specified, exported data includes the most recent data collected by the agent. *

* * @param endTime * The end timestamp for exported data from the single Application Discovery Agent selected in the filters. * If no value is specified, exported data includes the most recent data collected by the agent. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExportTaskRequest withEndTime(java.util.Date endTime) { setEndTime(endTime); return this; } /** *

* Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. *

* * @param preferences * Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. */ public void setPreferences(ExportPreferences preferences) { this.preferences = preferences; } /** *

* Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. *

* * @return Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. */ public ExportPreferences getPreferences() { return this.preferences; } /** *

* Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. *

* * @param preferences * Indicates the type of data that needs to be exported. Only one ExportPreferences can be enabled at any time. * @return Returns a reference to this object so that method calls can be chained together. */ public StartExportTaskRequest withPreferences(ExportPreferences preferences) { setPreferences(preferences); 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 (getExportDataFormat() != null) sb.append("ExportDataFormat: ").append(getExportDataFormat()).append(","); if (getFilters() != null) sb.append("Filters: ").append(getFilters()).append(","); if (getStartTime() != null) sb.append("StartTime: ").append(getStartTime()).append(","); if (getEndTime() != null) sb.append("EndTime: ").append(getEndTime()).append(","); if (getPreferences() != null) sb.append("Preferences: ").append(getPreferences()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StartExportTaskRequest == false) return false; StartExportTaskRequest other = (StartExportTaskRequest) obj; if (other.getExportDataFormat() == null ^ this.getExportDataFormat() == null) return false; if (other.getExportDataFormat() != null && other.getExportDataFormat().equals(this.getExportDataFormat()) == false) return false; if (other.getFilters() == null ^ this.getFilters() == null) return false; if (other.getFilters() != null && other.getFilters().equals(this.getFilters()) == false) return false; if (other.getStartTime() == null ^ this.getStartTime() == null) return false; if (other.getStartTime() != null && other.getStartTime().equals(this.getStartTime()) == false) return false; if (other.getEndTime() == null ^ this.getEndTime() == null) return false; if (other.getEndTime() != null && other.getEndTime().equals(this.getEndTime()) == false) return false; if (other.getPreferences() == null ^ this.getPreferences() == null) return false; if (other.getPreferences() != null && other.getPreferences().equals(this.getPreferences()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getExportDataFormat() == null) ? 0 : getExportDataFormat().hashCode()); hashCode = prime * hashCode + ((getFilters() == null) ? 0 : getFilters().hashCode()); hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode()); hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode()); hashCode = prime * hashCode + ((getPreferences() == null) ? 0 : getPreferences().hashCode()); return hashCode; } @Override public StartExportTaskRequest clone() { return (StartExportTaskRequest) super.clone(); } }