com.amazonaws.services.qapps.model.FileUploadCardInput Maven / Gradle / Ivy
Show all versions of aws-java-sdk-qapps 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.qapps.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Represents a file upload card. It can optionally receive a filename
and fileId
to set a
* default file. If not received, the user must provide the file when the Q App runs.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class FileUploadCardInput implements Serializable, Cloneable, StructuredPojo {
/**
*
* The title or label of the file upload card.
*
*/
private String title;
/**
*
* The unique identifier of the file upload card.
*
*/
private String id;
/**
*
* The type of the card.
*
*/
private String type;
/**
*
* The default filename to use for the file upload card.
*
*/
private String filename;
/**
*
* The identifier of a pre-uploaded file associated with the card.
*
*/
private String fileId;
/**
*
* A flag indicating if the user can override the default file for the upload card.
*
*/
private Boolean allowOverride;
/**
*
* The title or label of the file upload card.
*
*
* @param title
* The title or label of the file upload card.
*/
public void setTitle(String title) {
this.title = title;
}
/**
*
* The title or label of the file upload card.
*
*
* @return The title or label of the file upload card.
*/
public String getTitle() {
return this.title;
}
/**
*
* The title or label of the file upload card.
*
*
* @param title
* The title or label of the file upload card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileUploadCardInput withTitle(String title) {
setTitle(title);
return this;
}
/**
*
* The unique identifier of the file upload card.
*
*
* @param id
* The unique identifier of the file upload card.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique identifier of the file upload card.
*
*
* @return The unique identifier of the file upload card.
*/
public String getId() {
return this.id;
}
/**
*
* The unique identifier of the file upload card.
*
*
* @param id
* The unique identifier of the file upload card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileUploadCardInput withId(String id) {
setId(id);
return this;
}
/**
*
* The type of the card.
*
*
* @param type
* The type of the card.
* @see CardType
*/
public void setType(String type) {
this.type = type;
}
/**
*
* The type of the card.
*
*
* @return The type of the card.
* @see CardType
*/
public String getType() {
return this.type;
}
/**
*
* The type of the card.
*
*
* @param type
* The type of the card.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CardType
*/
public FileUploadCardInput withType(String type) {
setType(type);
return this;
}
/**
*
* The type of the card.
*
*
* @param type
* The type of the card.
* @return Returns a reference to this object so that method calls can be chained together.
* @see CardType
*/
public FileUploadCardInput withType(CardType type) {
this.type = type.toString();
return this;
}
/**
*
* The default filename to use for the file upload card.
*
*
* @param filename
* The default filename to use for the file upload card.
*/
public void setFilename(String filename) {
this.filename = filename;
}
/**
*
* The default filename to use for the file upload card.
*
*
* @return The default filename to use for the file upload card.
*/
public String getFilename() {
return this.filename;
}
/**
*
* The default filename to use for the file upload card.
*
*
* @param filename
* The default filename to use for the file upload card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileUploadCardInput withFilename(String filename) {
setFilename(filename);
return this;
}
/**
*
* The identifier of a pre-uploaded file associated with the card.
*
*
* @param fileId
* The identifier of a pre-uploaded file associated with the card.
*/
public void setFileId(String fileId) {
this.fileId = fileId;
}
/**
*
* The identifier of a pre-uploaded file associated with the card.
*
*
* @return The identifier of a pre-uploaded file associated with the card.
*/
public String getFileId() {
return this.fileId;
}
/**
*
* The identifier of a pre-uploaded file associated with the card.
*
*
* @param fileId
* The identifier of a pre-uploaded file associated with the card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileUploadCardInput withFileId(String fileId) {
setFileId(fileId);
return this;
}
/**
*
* A flag indicating if the user can override the default file for the upload card.
*
*
* @param allowOverride
* A flag indicating if the user can override the default file for the upload card.
*/
public void setAllowOverride(Boolean allowOverride) {
this.allowOverride = allowOverride;
}
/**
*
* A flag indicating if the user can override the default file for the upload card.
*
*
* @return A flag indicating if the user can override the default file for the upload card.
*/
public Boolean getAllowOverride() {
return this.allowOverride;
}
/**
*
* A flag indicating if the user can override the default file for the upload card.
*
*
* @param allowOverride
* A flag indicating if the user can override the default file for the upload card.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public FileUploadCardInput withAllowOverride(Boolean allowOverride) {
setAllowOverride(allowOverride);
return this;
}
/**
*
* A flag indicating if the user can override the default file for the upload card.
*
*
* @return A flag indicating if the user can override the default file for the upload card.
*/
public Boolean isAllowOverride() {
return this.allowOverride;
}
/**
* 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 (getTitle() != null)
sb.append("Title: ").append(getTitle()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getType() != null)
sb.append("Type: ").append(getType()).append(",");
if (getFilename() != null)
sb.append("Filename: ").append(getFilename()).append(",");
if (getFileId() != null)
sb.append("FileId: ").append(getFileId()).append(",");
if (getAllowOverride() != null)
sb.append("AllowOverride: ").append(getAllowOverride());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof FileUploadCardInput == false)
return false;
FileUploadCardInput other = (FileUploadCardInput) obj;
if (other.getTitle() == null ^ this.getTitle() == null)
return false;
if (other.getTitle() != null && other.getTitle().equals(this.getTitle()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getType() == null ^ this.getType() == null)
return false;
if (other.getType() != null && other.getType().equals(this.getType()) == false)
return false;
if (other.getFilename() == null ^ this.getFilename() == null)
return false;
if (other.getFilename() != null && other.getFilename().equals(this.getFilename()) == false)
return false;
if (other.getFileId() == null ^ this.getFileId() == null)
return false;
if (other.getFileId() != null && other.getFileId().equals(this.getFileId()) == false)
return false;
if (other.getAllowOverride() == null ^ this.getAllowOverride() == null)
return false;
if (other.getAllowOverride() != null && other.getAllowOverride().equals(this.getAllowOverride()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getType() == null) ? 0 : getType().hashCode());
hashCode = prime * hashCode + ((getFilename() == null) ? 0 : getFilename().hashCode());
hashCode = prime * hashCode + ((getFileId() == null) ? 0 : getFileId().hashCode());
hashCode = prime * hashCode + ((getAllowOverride() == null) ? 0 : getAllowOverride().hashCode());
return hashCode;
}
@Override
public FileUploadCardInput clone() {
try {
return (FileUploadCardInput) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
@com.amazonaws.annotation.SdkInternalApi
@Override
public void marshall(ProtocolMarshaller protocolMarshaller) {
com.amazonaws.services.qapps.model.transform.FileUploadCardInputMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}