com.amazonaws.services.qapps.model.GetLibraryItemResult 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;
/**
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class GetLibraryItemResult extends com.amazonaws.AmazonWebServiceResult implements Serializable, Cloneable {
/**
*
* The unique identifier of the library item.
*
*/
private String libraryItemId;
/**
*
* The unique identifier of the Q App associated with the library item.
*
*/
private String appId;
/**
*
* The version of the Q App associated with the library item.
*
*/
private Integer appVersion;
/**
*
* The categories associated with the library item for discovery.
*
*/
private java.util.List categories;
/**
*
* The status of the library item, such as "Published".
*
*/
private String status;
/**
*
* The date and time the library item was created.
*
*/
private java.util.Date createdAt;
/**
*
* The user who created the library item.
*
*/
private String createdBy;
/**
*
* The date and time the library item was last updated.
*
*/
private java.util.Date updatedAt;
/**
*
* The user who last updated the library item.
*
*/
private String updatedBy;
/**
*
* The number of ratings the library item has received from users.
*
*/
private Integer ratingCount;
/**
*
* Whether the current user has rated the library item.
*
*/
private Boolean isRatedByUser;
/**
*
* The number of users who have associated the Q App with their account.
*
*/
private Integer userCount;
/**
*
* The unique identifier of the library item.
*
*
* @param libraryItemId
* The unique identifier of the library item.
*/
public void setLibraryItemId(String libraryItemId) {
this.libraryItemId = libraryItemId;
}
/**
*
* The unique identifier of the library item.
*
*
* @return The unique identifier of the library item.
*/
public String getLibraryItemId() {
return this.libraryItemId;
}
/**
*
* The unique identifier of the library item.
*
*
* @param libraryItemId
* The unique identifier of the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withLibraryItemId(String libraryItemId) {
setLibraryItemId(libraryItemId);
return this;
}
/**
*
* The unique identifier of the Q App associated with the library item.
*
*
* @param appId
* The unique identifier of the Q App associated with the library item.
*/
public void setAppId(String appId) {
this.appId = appId;
}
/**
*
* The unique identifier of the Q App associated with the library item.
*
*
* @return The unique identifier of the Q App associated with the library item.
*/
public String getAppId() {
return this.appId;
}
/**
*
* The unique identifier of the Q App associated with the library item.
*
*
* @param appId
* The unique identifier of the Q App associated with the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withAppId(String appId) {
setAppId(appId);
return this;
}
/**
*
* The version of the Q App associated with the library item.
*
*
* @param appVersion
* The version of the Q App associated with the library item.
*/
public void setAppVersion(Integer appVersion) {
this.appVersion = appVersion;
}
/**
*
* The version of the Q App associated with the library item.
*
*
* @return The version of the Q App associated with the library item.
*/
public Integer getAppVersion() {
return this.appVersion;
}
/**
*
* The version of the Q App associated with the library item.
*
*
* @param appVersion
* The version of the Q App associated with the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withAppVersion(Integer appVersion) {
setAppVersion(appVersion);
return this;
}
/**
*
* The categories associated with the library item for discovery.
*
*
* @return The categories associated with the library item for discovery.
*/
public java.util.List getCategories() {
return categories;
}
/**
*
* The categories associated with the library item for discovery.
*
*
* @param categories
* The categories associated with the library item for discovery.
*/
public void setCategories(java.util.Collection categories) {
if (categories == null) {
this.categories = null;
return;
}
this.categories = new java.util.ArrayList(categories);
}
/**
*
* The categories associated with the library item for discovery.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setCategories(java.util.Collection)} or {@link #withCategories(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param categories
* The categories associated with the library item for discovery.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withCategories(Category... categories) {
if (this.categories == null) {
setCategories(new java.util.ArrayList(categories.length));
}
for (Category ele : categories) {
this.categories.add(ele);
}
return this;
}
/**
*
* The categories associated with the library item for discovery.
*
*
* @param categories
* The categories associated with the library item for discovery.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withCategories(java.util.Collection categories) {
setCategories(categories);
return this;
}
/**
*
* The status of the library item, such as "Published".
*
*
* @param status
* The status of the library item, such as "Published".
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The status of the library item, such as "Published".
*
*
* @return The status of the library item, such as "Published".
*/
public String getStatus() {
return this.status;
}
/**
*
* The status of the library item, such as "Published".
*
*
* @param status
* The status of the library item, such as "Published".
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The date and time the library item was created.
*
*
* @param createdAt
* The date and time the library item was created.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time the library item was created.
*
*
* @return The date and time the library item was created.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time the library item was created.
*
*
* @param createdAt
* The date and time the library item was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The user who created the library item.
*
*
* @param createdBy
* The user who created the library item.
*/
public void setCreatedBy(String createdBy) {
this.createdBy = createdBy;
}
/**
*
* The user who created the library item.
*
*
* @return The user who created the library item.
*/
public String getCreatedBy() {
return this.createdBy;
}
/**
*
* The user who created the library item.
*
*
* @param createdBy
* The user who created the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withCreatedBy(String createdBy) {
setCreatedBy(createdBy);
return this;
}
/**
*
* The date and time the library item was last updated.
*
*
* @param updatedAt
* The date and time the library item was last updated.
*/
public void setUpdatedAt(java.util.Date updatedAt) {
this.updatedAt = updatedAt;
}
/**
*
* The date and time the library item was last updated.
*
*
* @return The date and time the library item was last updated.
*/
public java.util.Date getUpdatedAt() {
return this.updatedAt;
}
/**
*
* The date and time the library item was last updated.
*
*
* @param updatedAt
* The date and time the library item was last updated.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withUpdatedAt(java.util.Date updatedAt) {
setUpdatedAt(updatedAt);
return this;
}
/**
*
* The user who last updated the library item.
*
*
* @param updatedBy
* The user who last updated the library item.
*/
public void setUpdatedBy(String updatedBy) {
this.updatedBy = updatedBy;
}
/**
*
* The user who last updated the library item.
*
*
* @return The user who last updated the library item.
*/
public String getUpdatedBy() {
return this.updatedBy;
}
/**
*
* The user who last updated the library item.
*
*
* @param updatedBy
* The user who last updated the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withUpdatedBy(String updatedBy) {
setUpdatedBy(updatedBy);
return this;
}
/**
*
* The number of ratings the library item has received from users.
*
*
* @param ratingCount
* The number of ratings the library item has received from users.
*/
public void setRatingCount(Integer ratingCount) {
this.ratingCount = ratingCount;
}
/**
*
* The number of ratings the library item has received from users.
*
*
* @return The number of ratings the library item has received from users.
*/
public Integer getRatingCount() {
return this.ratingCount;
}
/**
*
* The number of ratings the library item has received from users.
*
*
* @param ratingCount
* The number of ratings the library item has received from users.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withRatingCount(Integer ratingCount) {
setRatingCount(ratingCount);
return this;
}
/**
*
* Whether the current user has rated the library item.
*
*
* @param isRatedByUser
* Whether the current user has rated the library item.
*/
public void setIsRatedByUser(Boolean isRatedByUser) {
this.isRatedByUser = isRatedByUser;
}
/**
*
* Whether the current user has rated the library item.
*
*
* @return Whether the current user has rated the library item.
*/
public Boolean getIsRatedByUser() {
return this.isRatedByUser;
}
/**
*
* Whether the current user has rated the library item.
*
*
* @param isRatedByUser
* Whether the current user has rated the library item.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withIsRatedByUser(Boolean isRatedByUser) {
setIsRatedByUser(isRatedByUser);
return this;
}
/**
*
* Whether the current user has rated the library item.
*
*
* @return Whether the current user has rated the library item.
*/
public Boolean isRatedByUser() {
return this.isRatedByUser;
}
/**
*
* The number of users who have associated the Q App with their account.
*
*
* @param userCount
* The number of users who have associated the Q App with their account.
*/
public void setUserCount(Integer userCount) {
this.userCount = userCount;
}
/**
*
* The number of users who have associated the Q App with their account.
*
*
* @return The number of users who have associated the Q App with their account.
*/
public Integer getUserCount() {
return this.userCount;
}
/**
*
* The number of users who have associated the Q App with their account.
*
*
* @param userCount
* The number of users who have associated the Q App with their account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public GetLibraryItemResult withUserCount(Integer userCount) {
setUserCount(userCount);
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 (getLibraryItemId() != null)
sb.append("LibraryItemId: ").append(getLibraryItemId()).append(",");
if (getAppId() != null)
sb.append("AppId: ").append(getAppId()).append(",");
if (getAppVersion() != null)
sb.append("AppVersion: ").append(getAppVersion()).append(",");
if (getCategories() != null)
sb.append("Categories: ").append(getCategories()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getCreatedBy() != null)
sb.append("CreatedBy: ").append(getCreatedBy()).append(",");
if (getUpdatedAt() != null)
sb.append("UpdatedAt: ").append(getUpdatedAt()).append(",");
if (getUpdatedBy() != null)
sb.append("UpdatedBy: ").append(getUpdatedBy()).append(",");
if (getRatingCount() != null)
sb.append("RatingCount: ").append(getRatingCount()).append(",");
if (getIsRatedByUser() != null)
sb.append("IsRatedByUser: ").append(getIsRatedByUser()).append(",");
if (getUserCount() != null)
sb.append("UserCount: ").append(getUserCount());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof GetLibraryItemResult == false)
return false;
GetLibraryItemResult other = (GetLibraryItemResult) obj;
if (other.getLibraryItemId() == null ^ this.getLibraryItemId() == null)
return false;
if (other.getLibraryItemId() != null && other.getLibraryItemId().equals(this.getLibraryItemId()) == false)
return false;
if (other.getAppId() == null ^ this.getAppId() == null)
return false;
if (other.getAppId() != null && other.getAppId().equals(this.getAppId()) == false)
return false;
if (other.getAppVersion() == null ^ this.getAppVersion() == null)
return false;
if (other.getAppVersion() != null && other.getAppVersion().equals(this.getAppVersion()) == false)
return false;
if (other.getCategories() == null ^ this.getCategories() == null)
return false;
if (other.getCategories() != null && other.getCategories().equals(this.getCategories()) == false)
return false;
if (other.getStatus() == null ^ this.getStatus() == null)
return false;
if (other.getStatus() != null && other.getStatus().equals(this.getStatus()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == false)
return false;
if (other.getCreatedBy() == null ^ this.getCreatedBy() == null)
return false;
if (other.getCreatedBy() != null && other.getCreatedBy().equals(this.getCreatedBy()) == false)
return false;
if (other.getUpdatedAt() == null ^ this.getUpdatedAt() == null)
return false;
if (other.getUpdatedAt() != null && other.getUpdatedAt().equals(this.getUpdatedAt()) == false)
return false;
if (other.getUpdatedBy() == null ^ this.getUpdatedBy() == null)
return false;
if (other.getUpdatedBy() != null && other.getUpdatedBy().equals(this.getUpdatedBy()) == false)
return false;
if (other.getRatingCount() == null ^ this.getRatingCount() == null)
return false;
if (other.getRatingCount() != null && other.getRatingCount().equals(this.getRatingCount()) == false)
return false;
if (other.getIsRatedByUser() == null ^ this.getIsRatedByUser() == null)
return false;
if (other.getIsRatedByUser() != null && other.getIsRatedByUser().equals(this.getIsRatedByUser()) == false)
return false;
if (other.getUserCount() == null ^ this.getUserCount() == null)
return false;
if (other.getUserCount() != null && other.getUserCount().equals(this.getUserCount()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getLibraryItemId() == null) ? 0 : getLibraryItemId().hashCode());
hashCode = prime * hashCode + ((getAppId() == null) ? 0 : getAppId().hashCode());
hashCode = prime * hashCode + ((getAppVersion() == null) ? 0 : getAppVersion().hashCode());
hashCode = prime * hashCode + ((getCategories() == null) ? 0 : getCategories().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getCreatedBy() == null) ? 0 : getCreatedBy().hashCode());
hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getUpdatedBy() == null) ? 0 : getUpdatedBy().hashCode());
hashCode = prime * hashCode + ((getRatingCount() == null) ? 0 : getRatingCount().hashCode());
hashCode = prime * hashCode + ((getIsRatedByUser() == null) ? 0 : getIsRatedByUser().hashCode());
hashCode = prime * hashCode + ((getUserCount() == null) ? 0 : getUserCount().hashCode());
return hashCode;
}
@Override
public GetLibraryItemResult clone() {
try {
return (GetLibraryItemResult) super.clone();
} catch (CloneNotSupportedException e) {
throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e);
}
}
}