com.amazonaws.services.cloudwatch.model.PutDashboardRequest Maven / Gradle / Ivy
Show all versions of aws-java-sdk-cloudwatch 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.cloudwatch.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 PutDashboardRequest extends com.amazonaws.AmazonWebServiceRequest implements Serializable, Cloneable {
/**
*
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard,
* replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid
* characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*
*/
private String dashboardName;
/**
*
* The detailed information about the dashboard in JSON format, including the widgets to include and their location
* on the dashboard. This parameter is required.
*
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*
*/
private String dashboardBody;
/**
*
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard,
* replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid
* characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*
*
* @param dashboardName
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that
* dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is
* 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*/
public void setDashboardName(String dashboardName) {
this.dashboardName = dashboardName;
}
/**
*
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard,
* replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid
* characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*
*
* @return The name of the dashboard. If a dashboard with this name already exists, this call modifies that
* dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is
* 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*/
public String getDashboardName() {
return this.dashboardName;
}
/**
*
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that dashboard,
* replacing its current contents. Otherwise, a new dashboard is created. The maximum length is 255, and valid
* characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
*
*
* @param dashboardName
* The name of the dashboard. If a dashboard with this name already exists, this call modifies that
* dashboard, replacing its current contents. Otherwise, a new dashboard is created. The maximum length is
* 255, and valid characters are A-Z, a-z, 0-9, "-", and "_". This parameter is required.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutDashboardRequest withDashboardName(String dashboardName) {
setDashboardName(dashboardName);
return this;
}
/**
*
* The detailed information about the dashboard in JSON format, including the widgets to include and their location
* on the dashboard. This parameter is required.
*
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*
*
* @param dashboardBody
* The detailed information about the dashboard in JSON format, including the widgets to include and their
* location on the dashboard. This parameter is required.
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*/
public void setDashboardBody(String dashboardBody) {
this.dashboardBody = dashboardBody;
}
/**
*
* The detailed information about the dashboard in JSON format, including the widgets to include and their location
* on the dashboard. This parameter is required.
*
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*
*
* @return The detailed information about the dashboard in JSON format, including the widgets to include and their
* location on the dashboard. This parameter is required.
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*/
public String getDashboardBody() {
return this.dashboardBody;
}
/**
*
* The detailed information about the dashboard in JSON format, including the widgets to include and their location
* on the dashboard. This parameter is required.
*
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
*
*
* @param dashboardBody
* The detailed information about the dashboard in JSON format, including the widgets to include and their
* location on the dashboard. This parameter is required.
*
* For more information about the syntax, see Dashboard Body Structure and Syntax.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public PutDashboardRequest withDashboardBody(String dashboardBody) {
setDashboardBody(dashboardBody);
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 (getDashboardName() != null)
sb.append("DashboardName: ").append(getDashboardName()).append(",");
if (getDashboardBody() != null)
sb.append("DashboardBody: ").append(getDashboardBody());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof PutDashboardRequest == false)
return false;
PutDashboardRequest other = (PutDashboardRequest) obj;
if (other.getDashboardName() == null ^ this.getDashboardName() == null)
return false;
if (other.getDashboardName() != null && other.getDashboardName().equals(this.getDashboardName()) == false)
return false;
if (other.getDashboardBody() == null ^ this.getDashboardBody() == null)
return false;
if (other.getDashboardBody() != null && other.getDashboardBody().equals(this.getDashboardBody()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getDashboardName() == null) ? 0 : getDashboardName().hashCode());
hashCode = prime * hashCode + ((getDashboardBody() == null) ? 0 : getDashboardBody().hashCode());
return hashCode;
}
@Override
public PutDashboardRequest clone() {
return (PutDashboardRequest) super.clone();
}
}