
com.amazonaws.services.oam.model.MetricConfiguration Maven / Gradle / Ivy
Show all versions of aws-java-sdk-oam 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.oam.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* This structure contains the Filter
parameter which you can use to specify which metric namespaces are to
* be shared from this source account to the monitoring account.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class MetricConfiguration implements Serializable, Cloneable, StructuredPojo {
/**
*
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around namespace
* names. The matching of namespace names is case sensitive. Each filter has a limit of five conditional operands.
* Conditional operands are AND
and OR
.
*
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a %
* at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
, such as
* custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic Load
* Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your custom
* namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring account.
*
*
*/
private String filter;
/**
*
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around namespace
* names. The matching of namespace names is case sensitive. Each filter has a limit of five conditional operands.
* Conditional operands are AND
and OR
.
*
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a %
* at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
, such as
* custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic Load
* Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your custom
* namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring account.
*
*
*
* @param filter
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around
* namespace names. The matching of namespace names is case sensitive. Each filter has a limit of five
* conditional operands. Conditional operands are AND
and OR
.
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a
* %
at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
,
* such as custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic
* Load Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your
* custom namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring
* account.
*
*/
public void setFilter(String filter) {
this.filter = filter;
}
/**
*
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around namespace
* names. The matching of namespace names is case sensitive. Each filter has a limit of five conditional operands.
* Conditional operands are AND
and OR
.
*
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a %
* at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
, such as
* custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic Load
* Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your custom
* namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring account.
*
*
*
* @return Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around
* namespace names. The matching of namespace names is case sensitive. Each filter has a limit of five
* conditional operands. Conditional operands are AND
and OR
.
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a
* %
at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
,
* such as custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic
* Load Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your
* custom namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring
* account.
*
*/
public String getFilter() {
return this.filter;
}
/**
*
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around namespace
* names. The matching of namespace names is case sensitive. Each filter has a limit of five conditional operands.
* Conditional operands are AND
and OR
.
*
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a %
* at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
, such as
* custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic Load
* Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your custom
* namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring account.
*
*
*
* @param filter
* Use this field to specify which metrics are to be shared with the monitoring account. Use the term
* Namespace
and one or more of the following operands. Use single quotation marks (') around
* namespace names. The matching of namespace names is case sensitive. Each filter has a limit of five
* conditional operands. Conditional operands are AND
and OR
.
*
* -
*
* =
and !=
*
*
* -
*
* AND
*
*
* -
*
* OR
*
*
* -
*
* LIKE
and NOT LIKE
. These can be used only as prefix searches. Include a
* %
at the end of the string that you want to search for and include.
*
*
* -
*
* IN
and NOT IN
, using parentheses ( )
*
*
*
*
* Examples:
*
*
* -
*
* Namespace NOT LIKE 'AWS/%'
includes only namespaces that don't start with AWS/
,
* such as custom namespaces.
*
*
* -
*
* Namespace IN ('AWS/EC2', 'AWS/ELB', 'AWS/S3')
includes only the metrics in the EC2, Elastic
* Load Balancing, and Amazon S3 namespaces.
*
*
* -
*
* Namespace = 'AWS/EC2' OR Namespace NOT LIKE 'AWS/%'
includes only the EC2 namespace and your
* custom namespaces.
*
*
*
*
*
* If you are updating a link that uses filters, you can specify *
as the only value for the
* filter
parameter to delete the filter and share all metric namespaces with the monitoring
* account.
*
* @return Returns a reference to this object so that method calls can be chained together.
*/
public MetricConfiguration withFilter(String filter) {
setFilter(filter);
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 (getFilter() != null)
sb.append("Filter: ").append(getFilter());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof MetricConfiguration == false)
return false;
MetricConfiguration other = (MetricConfiguration) obj;
if (other.getFilter() == null ^ this.getFilter() == null)
return false;
if (other.getFilter() != null && other.getFilter().equals(this.getFilter()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getFilter() == null) ? 0 : getFilter().hashCode());
return hashCode;
}
@Override
public MetricConfiguration clone() {
try {
return (MetricConfiguration) 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.oam.model.transform.MetricConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}