com.amazonaws.services.simplesystemsmanagement.model.ListInventoryEntriesResult Maven / Gradle / Ivy
/*
* 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.simplesystemsmanagement.model;
import java.io.Serializable;
import javax.annotation.Generated;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ListInventoryEntriesResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The type of inventory item returned by the request.
*
*/
private String typeName;
/**
*
* The managed node ID targeted by the request to query inventory information.
*
*/
private String instanceId;
/**
*
* The inventory schema version used by the managed nodes.
*
*/
private String schemaVersion;
/**
*
* The time that inventory information was collected for the managed nodes.
*
*/
private String captureTime;
/**
*
* A list of inventory items on the managed nodes.
*
*/
private com.amazonaws.internal.SdkInternalList> entries;
/**
*
* The token to use when requesting the next set of items. If there are no additional items to return, the string is
* empty.
*
*/
private String nextToken;
/**
*
* The type of inventory item returned by the request.
*
*
* @param typeName
* The type of inventory item returned by the request.
*/
public void setTypeName(String typeName) {
this.typeName = typeName;
}
/**
*
* The type of inventory item returned by the request.
*
*
* @return The type of inventory item returned by the request.
*/
public String getTypeName() {
return this.typeName;
}
/**
*
* The type of inventory item returned by the request.
*
*
* @param typeName
* The type of inventory item returned by the request.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withTypeName(String typeName) {
setTypeName(typeName);
return this;
}
/**
*
* The managed node ID targeted by the request to query inventory information.
*
*
* @param instanceId
* The managed node ID targeted by the request to query inventory information.
*/
public void setInstanceId(String instanceId) {
this.instanceId = instanceId;
}
/**
*
* The managed node ID targeted by the request to query inventory information.
*
*
* @return The managed node ID targeted by the request to query inventory information.
*/
public String getInstanceId() {
return this.instanceId;
}
/**
*
* The managed node ID targeted by the request to query inventory information.
*
*
* @param instanceId
* The managed node ID targeted by the request to query inventory information.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withInstanceId(String instanceId) {
setInstanceId(instanceId);
return this;
}
/**
*
* The inventory schema version used by the managed nodes.
*
*
* @param schemaVersion
* The inventory schema version used by the managed nodes.
*/
public void setSchemaVersion(String schemaVersion) {
this.schemaVersion = schemaVersion;
}
/**
*
* The inventory schema version used by the managed nodes.
*
*
* @return The inventory schema version used by the managed nodes.
*/
public String getSchemaVersion() {
return this.schemaVersion;
}
/**
*
* The inventory schema version used by the managed nodes.
*
*
* @param schemaVersion
* The inventory schema version used by the managed nodes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withSchemaVersion(String schemaVersion) {
setSchemaVersion(schemaVersion);
return this;
}
/**
*
* The time that inventory information was collected for the managed nodes.
*
*
* @param captureTime
* The time that inventory information was collected for the managed nodes.
*/
public void setCaptureTime(String captureTime) {
this.captureTime = captureTime;
}
/**
*
* The time that inventory information was collected for the managed nodes.
*
*
* @return The time that inventory information was collected for the managed nodes.
*/
public String getCaptureTime() {
return this.captureTime;
}
/**
*
* The time that inventory information was collected for the managed nodes.
*
*
* @param captureTime
* The time that inventory information was collected for the managed nodes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withCaptureTime(String captureTime) {
setCaptureTime(captureTime);
return this;
}
/**
*
* A list of inventory items on the managed nodes.
*
*
* @return A list of inventory items on the managed nodes.
*/
public java.util.List> getEntries() {
if (entries == null) {
entries = new com.amazonaws.internal.SdkInternalList>();
}
return entries;
}
/**
*
* A list of inventory items on the managed nodes.
*
*
* @param entries
* A list of inventory items on the managed nodes.
*/
public void setEntries(java.util.Collection> entries) {
if (entries == null) {
this.entries = null;
return;
}
this.entries = new com.amazonaws.internal.SdkInternalList>(entries);
}
/**
*
* A list of inventory items on the managed nodes.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setEntries(java.util.Collection)} or {@link #withEntries(java.util.Collection)} if you want to override
* the existing values.
*
*
* @param entries
* A list of inventory items on the managed nodes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withEntries(java.util.Map... entries) {
if (this.entries == null) {
setEntries(new com.amazonaws.internal.SdkInternalList>(entries.length));
}
for (java.util.Map ele : entries) {
this.entries.add(ele);
}
return this;
}
/**
*
* A list of inventory items on the managed nodes.
*
*
* @param entries
* A list of inventory items on the managed nodes.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withEntries(java.util.Collection> entries) {
setEntries(entries);
return this;
}
/**
*
* The token to use when requesting the next set of items. If there are no additional items to return, the string is
* empty.
*
*
* @param nextToken
* The token to use when requesting the next set of items. If there are no additional items to return, the
* string is empty.
*/
public void setNextToken(String nextToken) {
this.nextToken = nextToken;
}
/**
*
* The token to use when requesting the next set of items. If there are no additional items to return, the string is
* empty.
*
*
* @return The token to use when requesting the next set of items. If there are no additional items to return, the
* string is empty.
*/
public String getNextToken() {
return this.nextToken;
}
/**
*
* The token to use when requesting the next set of items. If there are no additional items to return, the string is
* empty.
*
*
* @param nextToken
* The token to use when requesting the next set of items. If there are no additional items to return, the
* string is empty.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ListInventoryEntriesResult withNextToken(String nextToken) {
setNextToken(nextToken);
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 (getTypeName() != null)
sb.append("TypeName: ").append(getTypeName()).append(",");
if (getInstanceId() != null)
sb.append("InstanceId: ").append(getInstanceId()).append(",");
if (getSchemaVersion() != null)
sb.append("SchemaVersion: ").append(getSchemaVersion()).append(",");
if (getCaptureTime() != null)
sb.append("CaptureTime: ").append(getCaptureTime()).append(",");
if (getEntries() != null)
sb.append("Entries: ").append(getEntries()).append(",");
if (getNextToken() != null)
sb.append("NextToken: ").append(getNextToken());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ListInventoryEntriesResult == false)
return false;
ListInventoryEntriesResult other = (ListInventoryEntriesResult) obj;
if (other.getTypeName() == null ^ this.getTypeName() == null)
return false;
if (other.getTypeName() != null && other.getTypeName().equals(this.getTypeName()) == false)
return false;
if (other.getInstanceId() == null ^ this.getInstanceId() == null)
return false;
if (other.getInstanceId() != null && other.getInstanceId().equals(this.getInstanceId()) == false)
return false;
if (other.getSchemaVersion() == null ^ this.getSchemaVersion() == null)
return false;
if (other.getSchemaVersion() != null && other.getSchemaVersion().equals(this.getSchemaVersion()) == false)
return false;
if (other.getCaptureTime() == null ^ this.getCaptureTime() == null)
return false;
if (other.getCaptureTime() != null && other.getCaptureTime().equals(this.getCaptureTime()) == false)
return false;
if (other.getEntries() == null ^ this.getEntries() == null)
return false;
if (other.getEntries() != null && other.getEntries().equals(this.getEntries()) == false)
return false;
if (other.getNextToken() == null ^ this.getNextToken() == null)
return false;
if (other.getNextToken() != null && other.getNextToken().equals(this.getNextToken()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getTypeName() == null) ? 0 : getTypeName().hashCode());
hashCode = prime * hashCode + ((getInstanceId() == null) ? 0 : getInstanceId().hashCode());
hashCode = prime * hashCode + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode());
hashCode = prime * hashCode + ((getCaptureTime() == null) ? 0 : getCaptureTime().hashCode());
hashCode = prime * hashCode + ((getEntries() == null) ? 0 : getEntries().hashCode());
hashCode = prime * hashCode + ((getNextToken() == null) ? 0 : getNextToken().hashCode());
return hashCode;
}
@Override
public ListInventoryEntriesResult clone() {
try {
return (ListInventoryEntriesResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}