com.amazonaws.services.robomaker.model.UploadConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-robomaker 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.robomaker.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Provides upload configuration information. Files are uploaded from the simulation job to a location you specify.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class UploadConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
*
* For example, if your simulation output location is s3://my-bucket
and your upload configuration name
* is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*
*/
private String name;
/**
*
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the addition of
* **
as a super asterisk. For example, specifying /var/log/**.log
causes all .log
* files in the /var/log
directory tree to be collected. For more examples, see Glob Library.
*
*/
private String path;
/**
*
* Specifies when to upload the files:
*
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files are not
* uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload attempts
* will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified path is
* checked every 5 seconds. A final check is made when all of your code (including tools) have stopped.
*
*
*
*/
private String uploadBehavior;
/**
*
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
*
* For example, if your simulation output location is s3://my-bucket
and your upload configuration name
* is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*
*
* @param name
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
* For example, if your simulation output location is s3://my-bucket
and your upload
* configuration name is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
*
* For example, if your simulation output location is s3://my-bucket
and your upload configuration name
* is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*
*
* @return A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation
* output location to determine the final path.
*
* For example, if your simulation output location is s3://my-bucket
and your upload
* configuration name is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*/
public String getName() {
return this.name;
}
/**
*
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
*
* For example, if your simulation output location is s3://my-bucket
and your upload configuration name
* is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
*
*
* @param name
* A prefix that specifies where files will be uploaded in Amazon S3. It is appended to the simulation output
* location to determine the final path.
*
* For example, if your simulation output location is s3://my-bucket
and your upload
* configuration name is robot-test
, your files will be uploaded to
* s3://my-bucket/<simid>/<runid>/robot-test
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UploadConfiguration withName(String name) {
setName(name);
return this;
}
/**
*
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the addition of
* **
as a super asterisk. For example, specifying /var/log/**.log
causes all .log
* files in the /var/log
directory tree to be collected. For more examples, see Glob Library.
*
*
* @param path
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the
* addition of **
as a super asterisk. For example, specifying
* /var/log/**.log
causes all .log files in the /var/log
directory tree to be
* collected. For more examples, see Glob Library.
*/
public void setPath(String path) {
this.path = path;
}
/**
*
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the addition of
* **
as a super asterisk. For example, specifying /var/log/**.log
causes all .log
* files in the /var/log
directory tree to be collected. For more examples, see Glob Library.
*
*
* @return Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the
* addition of **
as a super asterisk. For example, specifying
* /var/log/**.log
causes all .log files in the /var/log
directory tree to be
* collected. For more examples, see Glob Library.
*/
public String getPath() {
return this.path;
}
/**
*
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the addition of
* **
as a super asterisk. For example, specifying /var/log/**.log
causes all .log
* files in the /var/log
directory tree to be collected. For more examples, see Glob Library.
*
*
* @param path
* Specifies the path of the file(s) to upload. Standard Unix glob matching rules are accepted, with the
* addition of **
as a super asterisk. For example, specifying
* /var/log/**.log
causes all .log files in the /var/log
directory tree to be
* collected. For more examples, see Glob Library.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public UploadConfiguration withPath(String path) {
setPath(path);
return this;
}
/**
*
* Specifies when to upload the files:
*
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files are not
* uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload attempts
* will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified path is
* checked every 5 seconds. A final check is made when all of your code (including tools) have stopped.
*
*
*
*
* @param uploadBehavior
* Specifies when to upload the files:
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files
* are not uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload
* attempts will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified
* path is checked every 5 seconds. A final check is made when all of your code (including tools) have
* stopped.
*
*
* @see UploadBehavior
*/
public void setUploadBehavior(String uploadBehavior) {
this.uploadBehavior = uploadBehavior;
}
/**
*
* Specifies when to upload the files:
*
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files are not
* uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload attempts
* will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified path is
* checked every 5 seconds. A final check is made when all of your code (including tools) have stopped.
*
*
*
*
* @return Specifies when to upload the files:
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files
* are not uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload
* attempts will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified
* path is checked every 5 seconds. A final check is made when all of your code (including tools) have
* stopped.
*
*
* @see UploadBehavior
*/
public String getUploadBehavior() {
return this.uploadBehavior;
}
/**
*
* Specifies when to upload the files:
*
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files are not
* uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload attempts
* will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified path is
* checked every 5 seconds. A final check is made when all of your code (including tools) have stopped.
*
*
*
*
* @param uploadBehavior
* Specifies when to upload the files:
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files
* are not uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload
* attempts will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified
* path is checked every 5 seconds. A final check is made when all of your code (including tools) have
* stopped.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UploadBehavior
*/
public UploadConfiguration withUploadBehavior(String uploadBehavior) {
setUploadBehavior(uploadBehavior);
return this;
}
/**
*
* Specifies when to upload the files:
*
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files are not
* uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload attempts
* will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified path is
* checked every 5 seconds. A final check is made when all of your code (including tools) have stopped.
*
*
*
*
* @param uploadBehavior
* Specifies when to upload the files:
*
* - UPLOAD_ON_TERMINATE
* -
*
* Matching files are uploaded once the simulation enters the TERMINATING
state. Matching files
* are not uploaded until all of your code (including tools) have stopped.
*
*
* If there is a problem uploading a file, the upload is retried. If problems persist, no further upload
* attempts will be made.
*
*
* - UPLOAD_ROLLING_AUTO_REMOVE
* -
*
* Matching files are uploaded as they are created. They are deleted after they are uploaded. The specified
* path is checked every 5 seconds. A final check is made when all of your code (including tools) have
* stopped.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see UploadBehavior
*/
public UploadConfiguration withUploadBehavior(UploadBehavior uploadBehavior) {
this.uploadBehavior = uploadBehavior.toString();
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPath() != null)
sb.append("Path: ").append(getPath()).append(",");
if (getUploadBehavior() != null)
sb.append("UploadBehavior: ").append(getUploadBehavior());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof UploadConfiguration == false)
return false;
UploadConfiguration other = (UploadConfiguration) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getPath() == null ^ this.getPath() == null)
return false;
if (other.getPath() != null && other.getPath().equals(this.getPath()) == false)
return false;
if (other.getUploadBehavior() == null ^ this.getUploadBehavior() == null)
return false;
if (other.getUploadBehavior() != null && other.getUploadBehavior().equals(this.getUploadBehavior()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode());
hashCode = prime * hashCode + ((getUploadBehavior() == null) ? 0 : getUploadBehavior().hashCode());
return hashCode;
}
@Override
public UploadConfiguration clone() {
try {
return (UploadConfiguration) 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.robomaker.model.transform.UploadConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}