com.amazonaws.services.vpclattice.model.RuleSummary Maven / Gradle / Ivy
Show all versions of aws-java-sdk-vpclattice 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.vpclattice.model;
import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;
/**
*
* Summary information about the listener rule.
*
*
* @see AWS API
* Documentation
*/
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class RuleSummary implements Serializable, Cloneable, StructuredPojo {
/**
*
* The Amazon Resource Name (ARN) of the rule.
*
*/
private String arn;
/**
*
* The date and time that the listener rule was created, specified in ISO-8601 format.
*
*/
private java.util.Date createdAt;
/**
*
* The ID of the rule.
*
*/
private String id;
/**
*
* Indicates whether this is the default listener rule.
*
*/
private Boolean isDefault;
/**
*
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
*
*/
private java.util.Date lastUpdatedAt;
/**
*
* The name of the rule.
*
*/
private String name;
/**
*
* The priority of the rule.
*
*/
private Integer priority;
/**
*
* The Amazon Resource Name (ARN) of the rule.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the rule.
*/
public void setArn(String arn) {
this.arn = arn;
}
/**
*
* The Amazon Resource Name (ARN) of the rule.
*
*
* @return The Amazon Resource Name (ARN) of the rule.
*/
public String getArn() {
return this.arn;
}
/**
*
* The Amazon Resource Name (ARN) of the rule.
*
*
* @param arn
* The Amazon Resource Name (ARN) of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withArn(String arn) {
setArn(arn);
return this;
}
/**
*
* The date and time that the listener rule was created, specified in ISO-8601 format.
*
*
* @param createdAt
* The date and time that the listener rule was created, specified in ISO-8601 format.
*/
public void setCreatedAt(java.util.Date createdAt) {
this.createdAt = createdAt;
}
/**
*
* The date and time that the listener rule was created, specified in ISO-8601 format.
*
*
* @return The date and time that the listener rule was created, specified in ISO-8601 format.
*/
public java.util.Date getCreatedAt() {
return this.createdAt;
}
/**
*
* The date and time that the listener rule was created, specified in ISO-8601 format.
*
*
* @param createdAt
* The date and time that the listener rule was created, specified in ISO-8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withCreatedAt(java.util.Date createdAt) {
setCreatedAt(createdAt);
return this;
}
/**
*
* The ID of the rule.
*
*
* @param id
* The ID of the rule.
*/
public void setId(String id) {
this.id = id;
}
/**
*
* The ID of the rule.
*
*
* @return The ID of the rule.
*/
public String getId() {
return this.id;
}
/**
*
* The ID of the rule.
*
*
* @param id
* The ID of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withId(String id) {
setId(id);
return this;
}
/**
*
* Indicates whether this is the default listener rule.
*
*
* @param isDefault
* Indicates whether this is the default listener rule.
*/
public void setIsDefault(Boolean isDefault) {
this.isDefault = isDefault;
}
/**
*
* Indicates whether this is the default listener rule.
*
*
* @return Indicates whether this is the default listener rule.
*/
public Boolean getIsDefault() {
return this.isDefault;
}
/**
*
* Indicates whether this is the default listener rule.
*
*
* @param isDefault
* Indicates whether this is the default listener rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withIsDefault(Boolean isDefault) {
setIsDefault(isDefault);
return this;
}
/**
*
* Indicates whether this is the default listener rule.
*
*
* @return Indicates whether this is the default listener rule.
*/
public Boolean isDefault() {
return this.isDefault;
}
/**
*
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
*
*
* @param lastUpdatedAt
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
*/
public void setLastUpdatedAt(java.util.Date lastUpdatedAt) {
this.lastUpdatedAt = lastUpdatedAt;
}
/**
*
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
*
*
* @return The date and time that the listener rule was last updated, specified in ISO-8601 format.
*/
public java.util.Date getLastUpdatedAt() {
return this.lastUpdatedAt;
}
/**
*
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
*
*
* @param lastUpdatedAt
* The date and time that the listener rule was last updated, specified in ISO-8601 format.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withLastUpdatedAt(java.util.Date lastUpdatedAt) {
setLastUpdatedAt(lastUpdatedAt);
return this;
}
/**
*
* The name of the rule.
*
*
* @param name
* The name of the rule.
*/
public void setName(String name) {
this.name = name;
}
/**
*
* The name of the rule.
*
*
* @return The name of the rule.
*/
public String getName() {
return this.name;
}
/**
*
* The name of the rule.
*
*
* @param name
* The name of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withName(String name) {
setName(name);
return this;
}
/**
*
* The priority of the rule.
*
*
* @param priority
* The priority of the rule.
*/
public void setPriority(Integer priority) {
this.priority = priority;
}
/**
*
* The priority of the rule.
*
*
* @return The priority of the rule.
*/
public Integer getPriority() {
return this.priority;
}
/**
*
* The priority of the rule.
*
*
* @param priority
* The priority of the rule.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public RuleSummary withPriority(Integer priority) {
setPriority(priority);
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 (getArn() != null)
sb.append("Arn: ").append(getArn()).append(",");
if (getCreatedAt() != null)
sb.append("CreatedAt: ").append(getCreatedAt()).append(",");
if (getId() != null)
sb.append("Id: ").append(getId()).append(",");
if (getIsDefault() != null)
sb.append("IsDefault: ").append(getIsDefault()).append(",");
if (getLastUpdatedAt() != null)
sb.append("LastUpdatedAt: ").append(getLastUpdatedAt()).append(",");
if (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPriority() != null)
sb.append("Priority: ").append(getPriority());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof RuleSummary == false)
return false;
RuleSummary other = (RuleSummary) obj;
if (other.getArn() == null ^ this.getArn() == null)
return false;
if (other.getArn() != null && other.getArn().equals(this.getArn()) == false)
return false;
if (other.getCreatedAt() == null ^ this.getCreatedAt() == null)
return false;
if (other.getCreatedAt() != null && other.getCreatedAt().equals(this.getCreatedAt()) == 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.getIsDefault() == null ^ this.getIsDefault() == null)
return false;
if (other.getIsDefault() != null && other.getIsDefault().equals(this.getIsDefault()) == false)
return false;
if (other.getLastUpdatedAt() == null ^ this.getLastUpdatedAt() == null)
return false;
if (other.getLastUpdatedAt() != null && other.getLastUpdatedAt().equals(this.getLastUpdatedAt()) == 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.getPriority() == null ^ this.getPriority() == null)
return false;
if (other.getPriority() != null && other.getPriority().equals(this.getPriority()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode());
hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode());
hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode());
hashCode = prime * hashCode + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode());
hashCode = prime * hashCode + ((getLastUpdatedAt() == null) ? 0 : getLastUpdatedAt().hashCode());
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPriority() == null) ? 0 : getPriority().hashCode());
return hashCode;
}
@Override
public RuleSummary clone() {
try {
return (RuleSummary) 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.vpclattice.model.transform.RuleSummaryMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}