com.amazonaws.services.quicksight.model.CreateThemeRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-quicksight Show documentation
/*
* 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.quicksight.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 CreateThemeRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The ID of the Amazon Web Services account where you want to store the new theme.
*
*/
private String awsAccountId;
/**
*
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each Amazon
* Web Services account.
*
*/
private String themeId;
/**
*
* A display name for the theme.
*
*/
private String name;
/**
*
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes
* defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or choose
* Themes from within an analysis.
*
*/
private String baseThemeId;
/**
*
* A description of the first version of the theme that you're creating. Every time UpdateTheme
is
* called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*
*/
private String versionDescription;
/**
*
* The theme configuration, which contains the theme display properties.
*
*/
private ThemeConfiguration configuration;
/**
*
* A valid grouping of resource permissions to apply to the new theme.
*
*/
private java.util.List permissions;
/**
*
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*
*/
private java.util.List tags;
/**
*
* The ID of the Amazon Web Services account where you want to store the new theme.
*
*
* @param awsAccountId
* The ID of the Amazon Web Services account where you want to store the new theme.
*/
public void setAwsAccountId(String awsAccountId) {
this.awsAccountId = awsAccountId;
}
/**
*
* The ID of the Amazon Web Services account where you want to store the new theme.
*
*
* @return The ID of the Amazon Web Services account where you want to store the new theme.
*/
public String getAwsAccountId() {
return this.awsAccountId;
}
/**
*
* The ID of the Amazon Web Services account where you want to store the new theme.
*
*
* @param awsAccountId
* The ID of the Amazon Web Services account where you want to store the new theme.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withAwsAccountId(String awsAccountId) {
setAwsAccountId(awsAccountId);
return this;
}
/**
*
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each Amazon
* Web Services account.
*
*
* @param themeId
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each
* Amazon Web Services account.
*/
public void setThemeId(String themeId) {
this.themeId = themeId;
}
/**
*
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each Amazon
* Web Services account.
*
*
* @return An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in
* each Amazon Web Services account.
*/
public String getThemeId() {
return this.themeId;
}
/**
*
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each Amazon
* Web Services account.
*
*
* @param themeId
* An ID for the theme that you want to create. The theme ID is unique per Amazon Web Services Region in each
* Amazon Web Services account.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withThemeId(String themeId) {
setThemeId(themeId);
return this;
}
/**
*
* A display name for the theme.
*
*
* @param name
* A display name for the theme.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* A display name for the theme.
*
*
* @return A display name for the theme.
*/
public String getName() {
return this.name;
}
/**
*
* A display name for the theme.
*
*
* @param name
* A display name for the theme.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withName(String name) {
setName(name);
return this;
}
/**
*
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes
* defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or choose
* Themes from within an analysis.
*
*
* @param baseThemeId
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting
* themes defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or
* choose Themes from within an analysis.
*/
public void setBaseThemeId(String baseThemeId) {
this.baseThemeId = baseThemeId;
}
/**
*
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes
* defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or choose
* Themes from within an analysis.
*
*
* @return The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting
* themes defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or
* choose Themes from within an analysis.
*/
public String getBaseThemeId() {
return this.baseThemeId;
}
/**
*
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting themes
* defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or choose
* Themes from within an analysis.
*
*
* @param baseThemeId
* The ID of the theme that a custom theme will inherit from. All themes inherit from one of the starting
* themes defined by Amazon QuickSight. For a list of the starting themes, use ListThemes
or
* choose Themes from within an analysis.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withBaseThemeId(String baseThemeId) {
setBaseThemeId(baseThemeId);
return this;
}
/**
*
* A description of the first version of the theme that you're creating. Every time UpdateTheme
is
* called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*
*
* @param versionDescription
* A description of the first version of the theme that you're creating. Every time UpdateTheme
* is called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*/
public void setVersionDescription(String versionDescription) {
this.versionDescription = versionDescription;
}
/**
*
* A description of the first version of the theme that you're creating. Every time UpdateTheme
is
* called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*
*
* @return A description of the first version of the theme that you're creating. Every time UpdateTheme
* is called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*/
public String getVersionDescription() {
return this.versionDescription;
}
/**
*
* A description of the first version of the theme that you're creating. Every time UpdateTheme
is
* called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
*
*
* @param versionDescription
* A description of the first version of the theme that you're creating. Every time UpdateTheme
* is called, a new version is created. Each version of the theme has a description of the version in the
* VersionDescription
field.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withVersionDescription(String versionDescription) {
setVersionDescription(versionDescription);
return this;
}
/**
*
* The theme configuration, which contains the theme display properties.
*
*
* @param configuration
* The theme configuration, which contains the theme display properties.
*/
public void setConfiguration(ThemeConfiguration configuration) {
this.configuration = configuration;
}
/**
*
* The theme configuration, which contains the theme display properties.
*
*
* @return The theme configuration, which contains the theme display properties.
*/
public ThemeConfiguration getConfiguration() {
return this.configuration;
}
/**
*
* The theme configuration, which contains the theme display properties.
*
*
* @param configuration
* The theme configuration, which contains the theme display properties.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withConfiguration(ThemeConfiguration configuration) {
setConfiguration(configuration);
return this;
}
/**
*
* A valid grouping of resource permissions to apply to the new theme.
*
*
* @return A valid grouping of resource permissions to apply to the new theme.
*/
public java.util.List getPermissions() {
return permissions;
}
/**
*
* A valid grouping of resource permissions to apply to the new theme.
*
*
* @param permissions
* A valid grouping of resource permissions to apply to the new theme.
*/
public void setPermissions(java.util.Collection permissions) {
if (permissions == null) {
this.permissions = null;
return;
}
this.permissions = new java.util.ArrayList(permissions);
}
/**
*
* A valid grouping of resource permissions to apply to the new theme.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setPermissions(java.util.Collection)} or {@link #withPermissions(java.util.Collection)} if you want to
* override the existing values.
*
*
* @param permissions
* A valid grouping of resource permissions to apply to the new theme.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withPermissions(ResourcePermission... permissions) {
if (this.permissions == null) {
setPermissions(new java.util.ArrayList(permissions.length));
}
for (ResourcePermission ele : permissions) {
this.permissions.add(ele);
}
return this;
}
/**
*
* A valid grouping of resource permissions to apply to the new theme.
*
*
* @param permissions
* A valid grouping of resource permissions to apply to the new theme.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withPermissions(java.util.Collection permissions) {
setPermissions(permissions);
return this;
}
/**
*
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*
*
* @return A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*/
public java.util.List getTags() {
return tags;
}
/**
*
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*
*
* @param tags
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*/
public void setTags(java.util.Collection tags) {
if (tags == null) {
this.tags = null;
return;
}
this.tags = new java.util.ArrayList(tags);
}
/**
*
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setTags(java.util.Collection)} or {@link #withTags(java.util.Collection)} if you want to override the
* existing values.
*
*
* @param tags
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withTags(Tag... tags) {
if (this.tags == null) {
setTags(new java.util.ArrayList(tags.length));
}
for (Tag ele : tags) {
this.tags.add(ele);
}
return this;
}
/**
*
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
*
*
* @param tags
* A map of the key-value pairs for the resource tag or tags that you want to add to the resource.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public CreateThemeRequest withTags(java.util.Collection tags) {
setTags(tags);
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 (getAwsAccountId() != null)
sb.append("AwsAccountId: ").append(getAwsAccountId()).append(",");
if (getThemeId() != null)
sb.append("ThemeId: ").append(getThemeId()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getBaseThemeId() != null)
sb.append("BaseThemeId: ").append(getBaseThemeId()).append(",");
if (getVersionDescription() != null)
sb.append("VersionDescription: ").append(getVersionDescription()).append(",");
if (getConfiguration() != null)
sb.append("Configuration: ").append(getConfiguration()).append(",");
if (getPermissions() != null)
sb.append("Permissions: ").append(getPermissions()).append(",");
if (getTags() != null)
sb.append("Tags: ").append(getTags());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof CreateThemeRequest == false)
return false;
CreateThemeRequest other = (CreateThemeRequest) obj;
if (other.getAwsAccountId() == null ^ this.getAwsAccountId() == null)
return false;
if (other.getAwsAccountId() != null && other.getAwsAccountId().equals(this.getAwsAccountId()) == false)
return false;
if (other.getThemeId() == null ^ this.getThemeId() == null)
return false;
if (other.getThemeId() != null && other.getThemeId().equals(this.getThemeId()) == false)
return false;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getBaseThemeId() == null ^ this.getBaseThemeId() == null)
return false;
if (other.getBaseThemeId() != null && other.getBaseThemeId().equals(this.getBaseThemeId()) == false)
return false;
if (other.getVersionDescription() == null ^ this.getVersionDescription() == null)
return false;
if (other.getVersionDescription() != null && other.getVersionDescription().equals(this.getVersionDescription()) == false)
return false;
if (other.getConfiguration() == null ^ this.getConfiguration() == null)
return false;
if (other.getConfiguration() != null && other.getConfiguration().equals(this.getConfiguration()) == false)
return false;
if (other.getPermissions() == null ^ this.getPermissions() == null)
return false;
if (other.getPermissions() != null && other.getPermissions().equals(this.getPermissions()) == false)
return false;
if (other.getTags() == null ^ this.getTags() == null)
return false;
if (other.getTags() != null && other.getTags().equals(this.getTags()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getAwsAccountId() == null) ? 0 : getAwsAccountId().hashCode());
hashCode = prime * hashCode + ((getThemeId() == null) ? 0 : getThemeId().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getBaseThemeId() == null) ? 0 : getBaseThemeId().hashCode());
hashCode = prime * hashCode + ((getVersionDescription() == null) ? 0 : getVersionDescription().hashCode());
hashCode = prime * hashCode + ((getConfiguration() == null) ? 0 : getConfiguration().hashCode());
hashCode = prime * hashCode + ((getPermissions() == null) ? 0 : getPermissions().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public CreateThemeRequest clone() {
return (CreateThemeRequest) super.clone();
}
}