All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.s3control.model.StorageLensGroupAndOperator Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS S3 Control module holds the client classes that are used for communicating with AWS S3 Control Service

There is a newer version: 1.12.780
Show newest version
/*
 * 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.s3control.model;

import java.io.Serializable;
import javax.annotation.Generated;

/**
 * 

* A logical operator that allows multiple filter conditions to be joined for more complex comparisons of Storage Lens * group data. *

* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class StorageLensGroupAndOperator implements Serializable, Cloneable { /** *

* Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. *

*/ private java.util.List matchAnyPrefix; /** *

* Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. *

*/ private java.util.List matchAnySuffix; /** *

* Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed. *

*/ private java.util.List matchAnyTag; /** *

* Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and * maximum number of days). *

*/ private MatchObjectAge matchObjectAge; /** *

* Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum * and maximum number of Bytes). *

*/ private MatchObjectSize matchObjectSize; /** *

* Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. *

* * @return Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. */ public java.util.List getMatchAnyPrefix() { return matchAnyPrefix; } /** *

* Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. *

* * @param matchAnyPrefix * Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. */ public void setMatchAnyPrefix(java.util.Collection matchAnyPrefix) { if (matchAnyPrefix == null) { this.matchAnyPrefix = null; return; } this.matchAnyPrefix = new java.util.ArrayList(matchAnyPrefix); } /** *

* Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchAnyPrefix(java.util.Collection)} or {@link #withMatchAnyPrefix(java.util.Collection)} if you want * to override the existing values. *

* * @param matchAnyPrefix * Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnyPrefix(String... matchAnyPrefix) { if (this.matchAnyPrefix == null) { setMatchAnyPrefix(new java.util.ArrayList(matchAnyPrefix.length)); } for (String ele : matchAnyPrefix) { this.matchAnyPrefix.add(ele); } return this; } /** *

* Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. *

* * @param matchAnyPrefix * Contains a list of prefixes. At least one prefix must be specified. Up to 10 prefixes are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnyPrefix(java.util.Collection matchAnyPrefix) { setMatchAnyPrefix(matchAnyPrefix); return this; } /** *

* Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. *

* * @return Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. */ public java.util.List getMatchAnySuffix() { return matchAnySuffix; } /** *

* Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. *

* * @param matchAnySuffix * Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. */ public void setMatchAnySuffix(java.util.Collection matchAnySuffix) { if (matchAnySuffix == null) { this.matchAnySuffix = null; return; } this.matchAnySuffix = new java.util.ArrayList(matchAnySuffix); } /** *

* Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchAnySuffix(java.util.Collection)} or {@link #withMatchAnySuffix(java.util.Collection)} if you want * to override the existing values. *

* * @param matchAnySuffix * Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnySuffix(String... matchAnySuffix) { if (this.matchAnySuffix == null) { setMatchAnySuffix(new java.util.ArrayList(matchAnySuffix.length)); } for (String ele : matchAnySuffix) { this.matchAnySuffix.add(ele); } return this; } /** *

* Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. *

* * @param matchAnySuffix * Contains a list of suffixes. At least one suffix must be specified. Up to 10 suffixes are allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnySuffix(java.util.Collection matchAnySuffix) { setMatchAnySuffix(matchAnySuffix); return this; } /** *

* Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed. *

* * @return Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are * allowed. */ public java.util.List getMatchAnyTag() { return matchAnyTag; } /** *

* Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed. *

* * @param matchAnyTag * Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are * allowed. */ public void setMatchAnyTag(java.util.Collection matchAnyTag) { if (matchAnyTag == null) { this.matchAnyTag = null; return; } this.matchAnyTag = new java.util.ArrayList(matchAnyTag); } /** *

* Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setMatchAnyTag(java.util.Collection)} or {@link #withMatchAnyTag(java.util.Collection)} if you want to * override the existing values. *

* * @param matchAnyTag * Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are * allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnyTag(S3Tag... matchAnyTag) { if (this.matchAnyTag == null) { setMatchAnyTag(new java.util.ArrayList(matchAnyTag.length)); } for (S3Tag ele : matchAnyTag) { this.matchAnyTag.add(ele); } return this; } /** *

* Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are allowed. *

* * @param matchAnyTag * Contains the list of object tags. At least one object tag must be specified. Up to 10 object tags are * allowed. * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchAnyTag(java.util.Collection matchAnyTag) { setMatchAnyTag(matchAnyTag); return this; } /** *

* Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and * maximum number of days). *

* * @param matchObjectAge * Contains DaysGreaterThan and DaysLessThan to define the object age range * (minimum and maximum number of days). */ public void setMatchObjectAge(MatchObjectAge matchObjectAge) { this.matchObjectAge = matchObjectAge; } /** *

* Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and * maximum number of days). *

* * @return Contains DaysGreaterThan and DaysLessThan to define the object age range * (minimum and maximum number of days). */ public MatchObjectAge getMatchObjectAge() { return this.matchObjectAge; } /** *

* Contains DaysGreaterThan and DaysLessThan to define the object age range (minimum and * maximum number of days). *

* * @param matchObjectAge * Contains DaysGreaterThan and DaysLessThan to define the object age range * (minimum and maximum number of days). * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchObjectAge(MatchObjectAge matchObjectAge) { setMatchObjectAge(matchObjectAge); return this; } /** *

* Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum * and maximum number of Bytes). *

* * @param matchObjectSize * Contains BytesGreaterThan and BytesLessThan to define the object size range * (minimum and maximum number of Bytes). */ public void setMatchObjectSize(MatchObjectSize matchObjectSize) { this.matchObjectSize = matchObjectSize; } /** *

* Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum * and maximum number of Bytes). *

* * @return Contains BytesGreaterThan and BytesLessThan to define the object size range * (minimum and maximum number of Bytes). */ public MatchObjectSize getMatchObjectSize() { return this.matchObjectSize; } /** *

* Contains BytesGreaterThan and BytesLessThan to define the object size range (minimum * and maximum number of Bytes). *

* * @param matchObjectSize * Contains BytesGreaterThan and BytesLessThan to define the object size range * (minimum and maximum number of Bytes). * @return Returns a reference to this object so that method calls can be chained together. */ public StorageLensGroupAndOperator withMatchObjectSize(MatchObjectSize matchObjectSize) { setMatchObjectSize(matchObjectSize); 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 (getMatchAnyPrefix() != null) sb.append("MatchAnyPrefix: ").append(getMatchAnyPrefix()).append(","); if (getMatchAnySuffix() != null) sb.append("MatchAnySuffix: ").append(getMatchAnySuffix()).append(","); if (getMatchAnyTag() != null) sb.append("MatchAnyTag: ").append(getMatchAnyTag()).append(","); if (getMatchObjectAge() != null) sb.append("MatchObjectAge: ").append(getMatchObjectAge()).append(","); if (getMatchObjectSize() != null) sb.append("MatchObjectSize: ").append(getMatchObjectSize()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof StorageLensGroupAndOperator == false) return false; StorageLensGroupAndOperator other = (StorageLensGroupAndOperator) obj; if (other.getMatchAnyPrefix() == null ^ this.getMatchAnyPrefix() == null) return false; if (other.getMatchAnyPrefix() != null && other.getMatchAnyPrefix().equals(this.getMatchAnyPrefix()) == false) return false; if (other.getMatchAnySuffix() == null ^ this.getMatchAnySuffix() == null) return false; if (other.getMatchAnySuffix() != null && other.getMatchAnySuffix().equals(this.getMatchAnySuffix()) == false) return false; if (other.getMatchAnyTag() == null ^ this.getMatchAnyTag() == null) return false; if (other.getMatchAnyTag() != null && other.getMatchAnyTag().equals(this.getMatchAnyTag()) == false) return false; if (other.getMatchObjectAge() == null ^ this.getMatchObjectAge() == null) return false; if (other.getMatchObjectAge() != null && other.getMatchObjectAge().equals(this.getMatchObjectAge()) == false) return false; if (other.getMatchObjectSize() == null ^ this.getMatchObjectSize() == null) return false; if (other.getMatchObjectSize() != null && other.getMatchObjectSize().equals(this.getMatchObjectSize()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMatchAnyPrefix() == null) ? 0 : getMatchAnyPrefix().hashCode()); hashCode = prime * hashCode + ((getMatchAnySuffix() == null) ? 0 : getMatchAnySuffix().hashCode()); hashCode = prime * hashCode + ((getMatchAnyTag() == null) ? 0 : getMatchAnyTag().hashCode()); hashCode = prime * hashCode + ((getMatchObjectAge() == null) ? 0 : getMatchObjectAge().hashCode()); hashCode = prime * hashCode + ((getMatchObjectSize() == null) ? 0 : getMatchObjectSize().hashCode()); return hashCode; } @Override public StorageLensGroupAndOperator clone() { try { return (StorageLensGroupAndOperator) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy