com.amazonaws.services.managedgrafana.model.WorkspaceSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-managedgrafana 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.managedgrafana.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* A structure that contains some information about one workspace in the account.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class WorkspaceSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* A structure containing information about the authentication methods used in the workspace.
*
*/
private AuthenticationSummary authentication;
/**
*
* The date that the workspace was created.
*
*/
private java.util.Date created;
/**
*
* The customer-entered description of the workspace.
*
*/
private String description;
/**
*
* The URL endpoint to use to access the Grafana console in the workspace.
*
*/
private String endpoint;
/**
*
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*
*/
private String grafanaToken;
/**
*
* The Grafana version that the workspace is running.
*
*/
private String grafanaVersion;
/**
*
* The unique ID of the workspace.
*
*/
private String id;
/**
*
* Specifies whether this workspace has a full Grafana Enterprise license.
*
*
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
*
*/
private String licenseType;
/**
*
* The most recent date that the workspace was modified.
*
*/
private java.util.Date modified;
/**
*
* The name of the workspace.
*
*/
private String name;
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*/
private java.util.List notificationDestinations;
/**
*
* The current status of the workspace.
*
*/
private String status;
/**
*
* The list of tags associated with the workspace.
*
*/
private java.util.Map tags;
/**
*
* A structure containing information about the authentication methods used in the workspace.
*
*
* @param authentication
* A structure containing information about the authentication methods used in the workspace.
*/
public void setAuthentication(AuthenticationSummary authentication) {
this.authentication = authentication;
}
/**
*
* A structure containing information about the authentication methods used in the workspace.
*
*
* @return A structure containing information about the authentication methods used in the workspace.
*/
public AuthenticationSummary getAuthentication() {
return this.authentication;
}
/**
*
* A structure containing information about the authentication methods used in the workspace.
*
*
* @param authentication
* A structure containing information about the authentication methods used in the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withAuthentication(AuthenticationSummary authentication) {
setAuthentication(authentication);
return this;
}
/**
*
* The date that the workspace was created.
*
*
* @param created
* The date that the workspace was created.
*/
public void setCreated(java.util.Date created) {
this.created = created;
}
/**
*
* The date that the workspace was created.
*
*
* @return The date that the workspace was created.
*/
public java.util.Date getCreated() {
return this.created;
}
/**
*
* The date that the workspace was created.
*
*
* @param created
* The date that the workspace was created.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withCreated(java.util.Date created) {
setCreated(created);
return this;
}
/**
*
* The customer-entered description of the workspace.
*
*
* @param description
* The customer-entered description of the workspace.
*/
public void setDescription(String description) {
this.description = description;
}
/**
*
* The customer-entered description of the workspace.
*
*
* @return The customer-entered description of the workspace.
*/
public String getDescription() {
return this.description;
}
/**
*
* The customer-entered description of the workspace.
*
*
* @param description
* The customer-entered description of the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withDescription(String description) {
setDescription(description);
return this;
}
/**
*
* The URL endpoint to use to access the Grafana console in the workspace.
*
*
* @param endpoint
* The URL endpoint to use to access the Grafana console in the workspace.
*/
public void setEndpoint(String endpoint) {
this.endpoint = endpoint;
}
/**
*
* The URL endpoint to use to access the Grafana console in the workspace.
*
*
* @return The URL endpoint to use to access the Grafana console in the workspace.
*/
public String getEndpoint() {
return this.endpoint;
}
/**
*
* The URL endpoint to use to access the Grafana console in the workspace.
*
*
* @param endpoint
* The URL endpoint to use to access the Grafana console in the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withEndpoint(String endpoint) {
setEndpoint(endpoint);
return this;
}
/**
*
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*
*
* @param grafanaToken
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*/
public void setGrafanaToken(String grafanaToken) {
this.grafanaToken = grafanaToken;
}
/**
*
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*
*
* @return The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*/
public String getGrafanaToken() {
return this.grafanaToken;
}
/**
*
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
*
*
* @param grafanaToken
* The token that ties this workspace to a Grafana Labs account. For more information, see Link your account with Grafana Labs.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withGrafanaToken(String grafanaToken) {
setGrafanaToken(grafanaToken);
return this;
}
/**
*
* The Grafana version that the workspace is running.
*
*
* @param grafanaVersion
* The Grafana version that the workspace is running.
*/
public void setGrafanaVersion(String grafanaVersion) {
this.grafanaVersion = grafanaVersion;
}
/**
*
* The Grafana version that the workspace is running.
*
*
* @return The Grafana version that the workspace is running.
*/
public String getGrafanaVersion() {
return this.grafanaVersion;
}
/**
*
* The Grafana version that the workspace is running.
*
*
* @param grafanaVersion
* The Grafana version that the workspace is running.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withGrafanaVersion(String grafanaVersion) {
setGrafanaVersion(grafanaVersion);
return this;
}
/**
*
* The unique ID of the workspace.
*
*
* @param id
* The unique ID of the workspace.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The unique ID of the workspace.
*
*
* @return The unique ID of the workspace.
*/
public String getId() {
return this.id;
}
/**
*
* The unique ID of the workspace.
*
*
* @param id
* The unique ID of the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withId(String id) {
setId(id);
return this;
}
/**
*
* Specifies whether this workspace has a full Grafana Enterprise license.
*
*
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
*
*
* @param licenseType
* Specifies whether this workspace has a full Grafana Enterprise license.
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
* @see LicenseType
*/
public void setLicenseType(String licenseType) {
this.licenseType = licenseType;
}
/**
*
* Specifies whether this workspace has a full Grafana Enterprise license.
*
*
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
*
*
* @return Specifies whether this workspace has a full Grafana Enterprise license.
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
* @see LicenseType
*/
public String getLicenseType() {
return this.licenseType;
}
/**
*
* Specifies whether this workspace has a full Grafana Enterprise license.
*
*
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
*
*
* @param licenseType
* Specifies whether this workspace has a full Grafana Enterprise license.
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see LicenseType
*/
public WorkspaceSummary withLicenseType(String licenseType) {
setLicenseType(licenseType);
return this;
}
/**
*
* Specifies whether this workspace has a full Grafana Enterprise license.
*
*
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
*
*
* @param licenseType
* Specifies whether this workspace has a full Grafana Enterprise license.
*
* Amazon Managed Grafana workspaces no longer support Grafana Enterprise free trials.
*
* @return Returns a reference to this object so that method calls can be chained together.
* @see LicenseType
*/
public WorkspaceSummary withLicenseType(LicenseType licenseType) {
this.licenseType = licenseType.toString();
return this;
}
/**
*
* The most recent date that the workspace was modified.
*
*
* @param modified
* The most recent date that the workspace was modified.
*/
public void setModified(java.util.Date modified) {
this.modified = modified;
}
/**
*
* The most recent date that the workspace was modified.
*
*
* @return The most recent date that the workspace was modified.
*/
public java.util.Date getModified() {
return this.modified;
}
/**
*
* The most recent date that the workspace was modified.
*
*
* @param modified
* The most recent date that the workspace was modified.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withModified(java.util.Date modified) {
setModified(modified);
return this;
}
/**
*
* The name of the workspace.
*
*
* @param name
* The name of the workspace.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the workspace.
*
*
* @return The name of the workspace.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the workspace.
*
*
* @param name
* The name of the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*
* @return The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM
* roles and permissions for, which allows Amazon Managed Grafana to use these channels.
* @see NotificationDestinationType
*/
public java.util.List getNotificationDestinations() {
return notificationDestinations;
}
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*
* @param notificationDestinations
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM
* roles and permissions for, which allows Amazon Managed Grafana to use these channels.
* @see NotificationDestinationType
*/
public void setNotificationDestinations(java.util.Collection notificationDestinations) {
if (notificationDestinations == null) {
this.notificationDestinations = null;
return;
}
this.notificationDestinations = new java.util.ArrayList(notificationDestinations);
}
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*
* NOTE: This method appends the values to the existing list (if any). Use
* {@link #setNotificationDestinations(java.util.Collection)} or
* {@link #withNotificationDestinations(java.util.Collection)} if you want to override the existing values.
*
*
* @param notificationDestinations
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM
* roles and permissions for, which allows Amazon Managed Grafana to use these channels.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationDestinationType
*/
public WorkspaceSummary withNotificationDestinations(String... notificationDestinations) {
if (this.notificationDestinations == null) {
setNotificationDestinations(new java.util.ArrayList(notificationDestinations.length));
}
for (String ele : notificationDestinations) {
this.notificationDestinations.add(ele);
}
return this;
}
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*
* @param notificationDestinations
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM
* roles and permissions for, which allows Amazon Managed Grafana to use these channels.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationDestinationType
*/
public WorkspaceSummary withNotificationDestinations(java.util.Collection notificationDestinations) {
setNotificationDestinations(notificationDestinations);
return this;
}
/**
*
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM roles and
* permissions for, which allows Amazon Managed Grafana to use these channels.
*
*
* @param notificationDestinations
* The Amazon Web Services notification channels that Amazon Managed Grafana can automatically create IAM
* roles and permissions for, which allows Amazon Managed Grafana to use these channels.
* @return Returns a reference to this object so that method calls can be chained together.
* @see NotificationDestinationType
*/
public WorkspaceSummary withNotificationDestinations(NotificationDestinationType... notificationDestinations) {
java.util.ArrayList notificationDestinationsCopy = new java.util.ArrayList(notificationDestinations.length);
for (NotificationDestinationType value : notificationDestinations) {
notificationDestinationsCopy.add(value.toString());
}
if (getNotificationDestinations() == null) {
setNotificationDestinations(notificationDestinationsCopy);
} else {
getNotificationDestinations().addAll(notificationDestinationsCopy);
}
return this;
}
/**
*
* The current status of the workspace.
*
*
* @param status
* The current status of the workspace.
* @see WorkspaceStatus
*/
public void setStatus(String status) {
this.status = status;
}
/**
*
* The current status of the workspace.
*
*
* @return The current status of the workspace.
* @see WorkspaceStatus
*/
public String getStatus() {
return this.status;
}
/**
*
* The current status of the workspace.
*
*
* @param status
* The current status of the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceStatus
*/
public WorkspaceSummary withStatus(String status) {
setStatus(status);
return this;
}
/**
*
* The current status of the workspace.
*
*
* @param status
* The current status of the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
* @see WorkspaceStatus
*/
public WorkspaceSummary withStatus(WorkspaceStatus status) {
this.status = status.toString();
return this;
}
/**
*
* The list of tags associated with the workspace.
*
*
* @return The list of tags associated with the workspace.
*/
public java.util.Map getTags() {
return tags;
}
/**
*
* The list of tags associated with the workspace.
*
*
* @param tags
* The list of tags associated with the workspace.
*/
public void setTags(java.util.Map tags) {
this.tags = tags;
}
/**
*
* The list of tags associated with the workspace.
*
*
* @param tags
* The list of tags associated with the workspace.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary withTags(java.util.Map tags) {
setTags(tags);
return this;
}
/**
* Add a single Tags entry
*
* @see WorkspaceSummary#withTags
* @returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary addTagsEntry(String key, String value) {
if (null == this.tags) {
this.tags = new java.util.HashMap();
}
if (this.tags.containsKey(key))
throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided.");
this.tags.put(key, value);
return this;
}
/**
* Removes all the entries added into Tags.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public WorkspaceSummary clearTagsEntries() {
this.tags = 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 (getAuthentication() != null)
sb.append("Authentication: ").append(getAuthentication()).append(",");
if (getCreated() != null)
sb.append("Created: ").append(getCreated()).append(",");
if (getDescription() != null)
sb.append("Description: ").append("***Sensitive Data Redacted***").append(",");
if (getEndpoint() != null)
sb.append("Endpoint: ").append(getEndpoint()).append(",");
if (getGrafanaToken() != null)
sb.append("GrafanaToken: ").append(getGrafanaToken()).append(",");
if (getGrafanaVersion() != null)
sb.append("GrafanaVersion: ").append(getGrafanaVersion()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getLicenseType() != null)
sb.append("LicenseType: ").append(getLicenseType()).append(",");
if (getModified() != null)
sb.append("Modified: ").append(getModified()).append(",");
if (getName() != null)
sb.append("Name: ").append("***Sensitive Data Redacted***").append(",");
if (getNotificationDestinations() != null)
sb.append("NotificationDestinations: ").append(getNotificationDestinations()).append(",");
if (getStatus() != null)
sb.append("Status: ").append(getStatus()).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 WorkspaceSummary == false)
return false;
WorkspaceSummary other = (WorkspaceSummary) obj;
if (other.getAuthentication() == null ^ this.getAuthentication() == null)
return false;
if (other.getAuthentication() != null && other.getAuthentication().equals(this.getAuthentication()) == false)
return false;
if (other.getCreated() == null ^ this.getCreated() == null)
return false;
if (other.getCreated() != null && other.getCreated().equals(this.getCreated()) == false)
return false;
if (other.getDescription() == null ^ this.getDescription() == null)
return false;
if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false)
return false;
if (other.getEndpoint() == null ^ this.getEndpoint() == null)
return false;
if (other.getEndpoint() != null && other.getEndpoint().equals(this.getEndpoint()) == false)
return false;
if (other.getGrafanaToken() == null ^ this.getGrafanaToken() == null)
return false;
if (other.getGrafanaToken() != null && other.getGrafanaToken().equals(this.getGrafanaToken()) == false)
return false;
if (other.getGrafanaVersion() == null ^ this.getGrafanaVersion() == null)
return false;
if (other.getGrafanaVersion() != null && other.getGrafanaVersion().equals(this.getGrafanaVersion()) == false)
return false;
if (other.getId() == null ^ this.getId() == null)
return false;
if (other.getId() != null && other.getId().equals(this.getId()) == false)
return false;
if (other.getLicenseType() == null ^ this.getLicenseType() == null)
return false;
if (other.getLicenseType() != null && other.getLicenseType().equals(this.getLicenseType()) == false)
return false;
if (other.getModified() == null ^ this.getModified() == null)
return false;
if (other.getModified() != null && other.getModified().equals(this.getModified()) == 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.getNotificationDestinations() == null ^ this.getNotificationDestinations() == null)
return false;
if (other.getNotificationDestinations() != null && other.getNotificationDestinations().equals(this.getNotificationDestinations()) == 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.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 + ((getAuthentication() == null) ? 0 : getAuthentication().hashCode());
hashCode = prime * hashCode + ((getCreated() == null) ? 0 : getCreated().hashCode());
hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode());
hashCode = prime * hashCode + ((getEndpoint() == null) ? 0 : getEndpoint().hashCode());
hashCode = prime * hashCode + ((getGrafanaToken() == null) ? 0 : getGrafanaToken().hashCode());
hashCode = prime * hashCode + ((getGrafanaVersion() == null) ? 0 : getGrafanaVersion().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getLicenseType() == null) ? 0 : getLicenseType().hashCode());
hashCode = prime * hashCode + ((getModified() == null) ? 0 : getModified().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getNotificationDestinations() == null) ? 0 : getNotificationDestinations().hashCode());
hashCode = prime * hashCode + ((getStatus() == null) ? 0 : getStatus().hashCode());
hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode());
return hashCode;
}
@Override
public WorkspaceSummary clone() {
try {
return (WorkspaceSummary) 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.managedgrafana.model.transform.WorkspaceSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}