
com.amazonaws.services.lightsail.model.GetContainerLogRequest Maven / Gradle / Ivy
/*
* 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.lightsail.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 GetContainerLogRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the container service for which to get a container log.
*
*/
private String serviceName;
/**
*
* The name of the container that is either running or previously ran on the container service for which to return a
* log.
*
*/
private String containerName;
/**
*
* The start of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000
as
* the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*/
private java.util.Date startTime;
/**
*
* The end of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600
as
* the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*/
private java.util.Date endTime;
/**
*
* The pattern to use to filter the returned log events to a specific term.
*
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a filter
* pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a filter
* pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term, specify a
* filter pattern of "?ERROR ?Exception"
.
*
*
*
*/
private String filterPattern;
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetContainerLog
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*/
private String pageToken;
/**
*
* The name of the container service for which to get a container log.
*
*
* @param serviceName
* The name of the container service for which to get a container log.
*/
public void setServiceName(String serviceName) {
this.serviceName = serviceName;
}
/**
*
* The name of the container service for which to get a container log.
*
*
* @return The name of the container service for which to get a container log.
*/
public String getServiceName() {
return this.serviceName;
}
/**
*
* The name of the container service for which to get a container log.
*
*
* @param serviceName
* The name of the container service for which to get a container log.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withServiceName(String serviceName) {
setServiceName(serviceName);
return this;
}
/**
*
* The name of the container that is either running or previously ran on the container service for which to return a
* log.
*
*
* @param containerName
* The name of the container that is either running or previously ran on the container service for which to
* return a log.
*/
public void setContainerName(String containerName) {
this.containerName = containerName;
}
/**
*
* The name of the container that is either running or previously ran on the container service for which to return a
* log.
*
*
* @return The name of the container that is either running or previously ran on the container service for which to
* return a log.
*/
public String getContainerName() {
return this.containerName;
}
/**
*
* The name of the container that is either running or previously ran on the container service for which to return a
* log.
*
*
* @param containerName
* The name of the container that is either running or previously ran on the container service for which to
* return a log.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withContainerName(String containerName) {
setContainerName(containerName);
return this;
}
/**
*
* The start of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000
as
* the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @param startTime
* The start of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify
* 1538424000
as the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*/
public void setStartTime(java.util.Date startTime) {
this.startTime = startTime;
}
/**
*
* The start of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000
as
* the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @return The start of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify
* 1538424000
as the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*/
public java.util.Date getStartTime() {
return this.startTime;
}
/**
*
* The start of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify 1538424000
as
* the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @param startTime
* The start of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use a start time of October 1, 2018, at 8 PM UTC, specify
* 1538424000
as the start time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withStartTime(java.util.Date startTime) {
setStartTime(startTime);
return this;
}
/**
*
* The end of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600
as
* the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @param endTime
* The end of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify
* 1538427600
as the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*/
public void setEndTime(java.util.Date endTime) {
this.endTime = endTime;
}
/**
*
* The end of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600
as
* the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @return The end of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify
* 1538427600
as the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*/
public java.util.Date getEndTime() {
return this.endTime;
}
/**
*
* The end of the time interval for which to get log data.
*
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify 1538427600
as
* the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
*
*
* @param endTime
* The end of the time interval for which to get log data.
*
* Constraints:
*
*
* -
*
* Specified in Coordinated Universal Time (UTC).
*
*
* -
*
* Specified in the Unix time format.
*
*
* For example, if you wish to use an end time of October 1, 2018, at 9 PM UTC, specify
* 1538427600
as the end time.
*
*
*
*
* You can convert a human-friendly time to Unix time format using a converter like Epoch converter.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withEndTime(java.util.Date endTime) {
setEndTime(endTime);
return this;
}
/**
*
* The pattern to use to filter the returned log events to a specific term.
*
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a filter
* pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a filter
* pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term, specify a
* filter pattern of "?ERROR ?Exception"
.
*
*
*
*
* @param filterPattern
* The pattern to use to filter the returned log events to a specific term.
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a
* filter pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of
* "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a
* filter pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term,
* specify a filter pattern of "?ERROR ?Exception"
.
*
*
*/
public void setFilterPattern(String filterPattern) {
this.filterPattern = filterPattern;
}
/**
*
* The pattern to use to filter the returned log events to a specific term.
*
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a filter
* pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a filter
* pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term, specify a
* filter pattern of "?ERROR ?Exception"
.
*
*
*
*
* @return The pattern to use to filter the returned log events to a specific term.
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify
* a filter pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of
* "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a
* filter pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term,
* specify a filter pattern of "?ERROR ?Exception"
.
*
*
*/
public String getFilterPattern() {
return this.filterPattern;
}
/**
*
* The pattern to use to filter the returned log events to a specific term.
*
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a filter
* pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a filter
* pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term, specify a
* filter pattern of "?ERROR ?Exception"
.
*
*
*
*
* @param filterPattern
* The pattern to use to filter the returned log events to a specific term.
*
* The following are a few examples of filter patterns that you can specify:
*
*
* -
*
* To return all log events, specify a filter pattern of ""
.
*
*
* -
*
* To exclude log events that contain the ERROR
term, and return all other log events, specify a
* filter pattern of "-ERROR"
.
*
*
* -
*
* To return log events that contain the ERROR
term, specify a filter pattern of
* "ERROR"
.
*
*
* -
*
* To return log events that contain both the ERROR
and Exception
terms, specify a
* filter pattern of "ERROR Exception"
.
*
*
* -
*
* To return log events that contain the ERROR
or the Exception
term,
* specify a filter pattern of "?ERROR ?Exception"
.
*
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withFilterPattern(String filterPattern) {
setFilterPattern(filterPattern);
return this;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetContainerLog
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @param pageToken
* The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetContainerLog
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
*/
public void setPageToken(String pageToken) {
this.pageToken = pageToken;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetContainerLog
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @return The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetContainerLog
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
*/
public String getPageToken() {
return this.pageToken;
}
/**
*
* The token to advance to the next page of results from your request.
*
*
* To get a page token, perform an initial GetContainerLog
request. If your results are paginated, the
* response will return a next page token that you can specify as the page token in a subsequent request.
*
*
* @param pageToken
* The token to advance to the next page of results from your request.
*
* To get a page token, perform an initial GetContainerLog
request. If your results are
* paginated, the response will return a next page token that you can specify as the page token in a
* subsequent request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetContainerLogRequest withPageToken(String pageToken) {
setPageToken(pageToken);
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 (getServiceName() != null)
sb.append("ServiceName: ").append(getServiceName()).append(",");
if (getContainerName() != null)
sb.append("ContainerName: ").append(getContainerName()).append(",");
if (getStartTime() != null)
sb.append("StartTime: ").append(getStartTime()).append(",");
if (getEndTime() != null)
sb.append("EndTime: ").append(getEndTime()).append(",");
if (getFilterPattern() != null)
sb.append("FilterPattern: ").append(getFilterPattern()).append(",");
if (getPageToken() != null)
sb.append("PageToken: ").append(getPageToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetContainerLogRequest == false)
return false;
GetContainerLogRequest other = (GetContainerLogRequest) obj;
if (other.getServiceName() == null ^ this.getServiceName() == null)
return false;
if (other.getServiceName() != null && other.getServiceName().equals(this.getServiceName()) == false)
return false;
if (other.getContainerName() == null ^ this.getContainerName() == null)
return false;
if (other.getContainerName() != null && other.getContainerName().equals(this.getContainerName()) == 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.getFilterPattern() == null ^ this.getFilterPattern() == null)
return false;
if (other.getFilterPattern() != null && other.getFilterPattern().equals(this.getFilterPattern()) == false)
return false;
if (other.getPageToken() == null ^ this.getPageToken() == null)
return false;
if (other.getPageToken() != null && other.getPageToken().equals(this.getPageToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getServiceName() == null) ? 0 : getServiceName().hashCode());
hashCode = prime * hashCode + ((getContainerName() == null) ? 0 : getContainerName().hashCode());
hashCode = prime * hashCode + ((getStartTime() == null) ? 0 : getStartTime().hashCode());
hashCode = prime * hashCode + ((getEndTime() == null) ? 0 : getEndTime().hashCode());
hashCode = prime * hashCode + ((getFilterPattern() == null) ? 0 : getFilterPattern().hashCode());
hashCode = prime * hashCode + ((getPageToken() == null) ? 0 : getPageToken().hashCode());
return hashCode;
}
@Override
public GetContainerLogRequest clone() {
return (GetContainerLogRequest) super.clone();
}
}