All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.simplesystemsmanagement.model.InventoryItem 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;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information collected from managed nodes based on your inventory policy document *

* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InventoryItem implements Serializable, Cloneable, StructuredPojo { /** *

* The name of the inventory type. Default inventory item type names start with AWS. Custom inventory * type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. *

*/ private String typeName; /** *

* The schema version for the inventory item. *

*/ private String schemaVersion; /** *

* The time the inventory information was collected. *

*/ private String captureTime; /** *

* MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory * information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed * since last update. *

*/ private String contentHash; /** *

* The inventory data of the inventory type. *

*/ private com.amazonaws.internal.SdkInternalList> content; /** *

* A map of associated properties for a specified inventory type. For example, with this attribute, you can specify * the ExecutionId, ExecutionType, ComplianceType properties of the * AWS:ComplianceItem type. *

*/ private java.util.Map context; /** *

* The name of the inventory type. Default inventory item type names start with AWS. Custom inventory * type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. *

* * @param typeName * The name of the inventory type. Default inventory item type names start with AWS. Custom * inventory type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. */ public void setTypeName(String typeName) { this.typeName = typeName; } /** *

* The name of the inventory type. Default inventory item type names start with AWS. Custom inventory * type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. *

* * @return The name of the inventory type. Default inventory item type names start with AWS. Custom * inventory type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. */ public String getTypeName() { return this.typeName; } /** *

* The name of the inventory type. Default inventory item type names start with AWS. Custom inventory * type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. *

* * @param typeName * The name of the inventory type. Default inventory item type names start with AWS. Custom * inventory type names will start with Custom. Default inventory item types include the following: * AWS:AWSComponent, AWS:Application, AWS:InstanceInformation, * AWS:Network, and AWS:WindowsUpdate. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withTypeName(String typeName) { setTypeName(typeName); return this; } /** *

* The schema version for the inventory item. *

* * @param schemaVersion * The schema version for the inventory item. */ public void setSchemaVersion(String schemaVersion) { this.schemaVersion = schemaVersion; } /** *

* The schema version for the inventory item. *

* * @return The schema version for the inventory item. */ public String getSchemaVersion() { return this.schemaVersion; } /** *

* The schema version for the inventory item. *

* * @param schemaVersion * The schema version for the inventory item. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withSchemaVersion(String schemaVersion) { setSchemaVersion(schemaVersion); return this; } /** *

* The time the inventory information was collected. *

* * @param captureTime * The time the inventory information was collected. */ public void setCaptureTime(String captureTime) { this.captureTime = captureTime; } /** *

* The time the inventory information was collected. *

* * @return The time the inventory information was collected. */ public String getCaptureTime() { return this.captureTime; } /** *

* The time the inventory information was collected. *

* * @param captureTime * The time the inventory information was collected. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withCaptureTime(String captureTime) { setCaptureTime(captureTime); return this; } /** *

* MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory * information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed * since last update. *

* * @param contentHash * MD5 hash of the inventory item type contents. The content hash is used to determine whether to update * inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 * hash hasn't changed since last update. */ public void setContentHash(String contentHash) { this.contentHash = contentHash; } /** *

* MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory * information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed * since last update. *

* * @return MD5 hash of the inventory item type contents. The content hash is used to determine whether to update * inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 * hash hasn't changed since last update. */ public String getContentHash() { return this.contentHash; } /** *

* MD5 hash of the inventory item type contents. The content hash is used to determine whether to update inventory * information. The PutInventory API doesn't update the inventory item type contents if the MD5 hash hasn't changed * since last update. *

* * @param contentHash * MD5 hash of the inventory item type contents. The content hash is used to determine whether to update * inventory information. The PutInventory API doesn't update the inventory item type contents if the MD5 * hash hasn't changed since last update. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withContentHash(String contentHash) { setContentHash(contentHash); return this; } /** *

* The inventory data of the inventory type. *

* * @return The inventory data of the inventory type. */ public java.util.List> getContent() { if (content == null) { content = new com.amazonaws.internal.SdkInternalList>(); } return content; } /** *

* The inventory data of the inventory type. *

* * @param content * The inventory data of the inventory type. */ public void setContent(java.util.Collection> content) { if (content == null) { this.content = null; return; } this.content = new com.amazonaws.internal.SdkInternalList>(content); } /** *

* The inventory data of the inventory type. *

*

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

* * @param content * The inventory data of the inventory type. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withContent(java.util.Map... content) { if (this.content == null) { setContent(new com.amazonaws.internal.SdkInternalList>(content.length)); } for (java.util.Map ele : content) { this.content.add(ele); } return this; } /** *

* The inventory data of the inventory type. *

* * @param content * The inventory data of the inventory type. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withContent(java.util.Collection> content) { setContent(content); return this; } /** *

* A map of associated properties for a specified inventory type. For example, with this attribute, you can specify * the ExecutionId, ExecutionType, ComplianceType properties of the * AWS:ComplianceItem type. *

* * @return A map of associated properties for a specified inventory type. For example, with this attribute, you can * specify the ExecutionId, ExecutionType, ComplianceType properties * of the AWS:ComplianceItem type. */ public java.util.Map getContext() { return context; } /** *

* A map of associated properties for a specified inventory type. For example, with this attribute, you can specify * the ExecutionId, ExecutionType, ComplianceType properties of the * AWS:ComplianceItem type. *

* * @param context * A map of associated properties for a specified inventory type. For example, with this attribute, you can * specify the ExecutionId, ExecutionType, ComplianceType properties * of the AWS:ComplianceItem type. */ public void setContext(java.util.Map context) { this.context = context; } /** *

* A map of associated properties for a specified inventory type. For example, with this attribute, you can specify * the ExecutionId, ExecutionType, ComplianceType properties of the * AWS:ComplianceItem type. *

* * @param context * A map of associated properties for a specified inventory type. For example, with this attribute, you can * specify the ExecutionId, ExecutionType, ComplianceType properties * of the AWS:ComplianceItem type. * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem withContext(java.util.Map context) { setContext(context); return this; } /** * Add a single Context entry * * @see InventoryItem#withContext * @returns a reference to this object so that method calls can be chained together. */ public InventoryItem addContextEntry(String key, String value) { if (null == this.context) { this.context = new java.util.HashMap(); } if (this.context.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.context.put(key, value); return this; } /** * Removes all the entries added into Context. * * @return Returns a reference to this object so that method calls can be chained together. */ public InventoryItem clearContextEntries() { this.context = null; 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 (getSchemaVersion() != null) sb.append("SchemaVersion: ").append(getSchemaVersion()).append(","); if (getCaptureTime() != null) sb.append("CaptureTime: ").append(getCaptureTime()).append(","); if (getContentHash() != null) sb.append("ContentHash: ").append(getContentHash()).append(","); if (getContent() != null) sb.append("Content: ").append(getContent()).append(","); if (getContext() != null) sb.append("Context: ").append(getContext()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof InventoryItem == false) return false; InventoryItem other = (InventoryItem) obj; if (other.getTypeName() == null ^ this.getTypeName() == null) return false; if (other.getTypeName() != null && other.getTypeName().equals(this.getTypeName()) == 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.getContentHash() == null ^ this.getContentHash() == null) return false; if (other.getContentHash() != null && other.getContentHash().equals(this.getContentHash()) == false) return false; if (other.getContent() == null ^ this.getContent() == null) return false; if (other.getContent() != null && other.getContent().equals(this.getContent()) == false) return false; if (other.getContext() == null ^ this.getContext() == null) return false; if (other.getContext() != null && other.getContext().equals(this.getContext()) == 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 + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode()); hashCode = prime * hashCode + ((getCaptureTime() == null) ? 0 : getCaptureTime().hashCode()); hashCode = prime * hashCode + ((getContentHash() == null) ? 0 : getContentHash().hashCode()); hashCode = prime * hashCode + ((getContent() == null) ? 0 : getContent().hashCode()); hashCode = prime * hashCode + ((getContext() == null) ? 0 : getContext().hashCode()); return hashCode; } @Override public InventoryItem clone() { try { return (InventoryItem) 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.simplesystemsmanagement.model.transform.InventoryItemMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy