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

com.amazonaws.services.ec2.model.ManagedPrefixList Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2016-2021 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.ec2.model;

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

/**
 * 

* Describes a managed prefix list. *

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

* The ID of the prefix list. *

*/ private String prefixListId; /** *

* The IP address version. *

*/ private String addressFamily; /** *

* The current state of the prefix list. *

*/ private String state; /** *

* The state message. *

*/ private String stateMessage; /** *

* The Amazon Resource Name (ARN) for the prefix list. *

*/ private String prefixListArn; /** *

* The name of the prefix list. *

*/ private String prefixListName; /** *

* The maximum number of entries for the prefix list. *

*/ private Integer maxEntries; /** *

* The version of the prefix list. *

*/ private Long version; /** *

* The tags for the prefix list. *

*/ private com.amazonaws.internal.SdkInternalList tags; /** *

* The ID of the owner of the prefix list. *

*/ private String ownerId; /** *

* The ID of the prefix list. *

* * @param prefixListId * The ID of the prefix list. */ public void setPrefixListId(String prefixListId) { this.prefixListId = prefixListId; } /** *

* The ID of the prefix list. *

* * @return The ID of the prefix list. */ public String getPrefixListId() { return this.prefixListId; } /** *

* The ID of the prefix list. *

* * @param prefixListId * The ID of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withPrefixListId(String prefixListId) { setPrefixListId(prefixListId); return this; } /** *

* The IP address version. *

* * @param addressFamily * The IP address version. */ public void setAddressFamily(String addressFamily) { this.addressFamily = addressFamily; } /** *

* The IP address version. *

* * @return The IP address version. */ public String getAddressFamily() { return this.addressFamily; } /** *

* The IP address version. *

* * @param addressFamily * The IP address version. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withAddressFamily(String addressFamily) { setAddressFamily(addressFamily); return this; } /** *

* The current state of the prefix list. *

* * @param state * The current state of the prefix list. * @see PrefixListState */ public void setState(String state) { this.state = state; } /** *

* The current state of the prefix list. *

* * @return The current state of the prefix list. * @see PrefixListState */ public String getState() { return this.state; } /** *

* The current state of the prefix list. *

* * @param state * The current state of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. * @see PrefixListState */ public ManagedPrefixList withState(String state) { setState(state); return this; } /** *

* The current state of the prefix list. *

* * @param state * The current state of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. * @see PrefixListState */ public ManagedPrefixList withState(PrefixListState state) { this.state = state.toString(); return this; } /** *

* The state message. *

* * @param stateMessage * The state message. */ public void setStateMessage(String stateMessage) { this.stateMessage = stateMessage; } /** *

* The state message. *

* * @return The state message. */ public String getStateMessage() { return this.stateMessage; } /** *

* The state message. *

* * @param stateMessage * The state message. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withStateMessage(String stateMessage) { setStateMessage(stateMessage); return this; } /** *

* The Amazon Resource Name (ARN) for the prefix list. *

* * @param prefixListArn * The Amazon Resource Name (ARN) for the prefix list. */ public void setPrefixListArn(String prefixListArn) { this.prefixListArn = prefixListArn; } /** *

* The Amazon Resource Name (ARN) for the prefix list. *

* * @return The Amazon Resource Name (ARN) for the prefix list. */ public String getPrefixListArn() { return this.prefixListArn; } /** *

* The Amazon Resource Name (ARN) for the prefix list. *

* * @param prefixListArn * The Amazon Resource Name (ARN) for the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withPrefixListArn(String prefixListArn) { setPrefixListArn(prefixListArn); return this; } /** *

* The name of the prefix list. *

* * @param prefixListName * The name of the prefix list. */ public void setPrefixListName(String prefixListName) { this.prefixListName = prefixListName; } /** *

* The name of the prefix list. *

* * @return The name of the prefix list. */ public String getPrefixListName() { return this.prefixListName; } /** *

* The name of the prefix list. *

* * @param prefixListName * The name of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withPrefixListName(String prefixListName) { setPrefixListName(prefixListName); return this; } /** *

* The maximum number of entries for the prefix list. *

* * @param maxEntries * The maximum number of entries for the prefix list. */ public void setMaxEntries(Integer maxEntries) { this.maxEntries = maxEntries; } /** *

* The maximum number of entries for the prefix list. *

* * @return The maximum number of entries for the prefix list. */ public Integer getMaxEntries() { return this.maxEntries; } /** *

* The maximum number of entries for the prefix list. *

* * @param maxEntries * The maximum number of entries for the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withMaxEntries(Integer maxEntries) { setMaxEntries(maxEntries); return this; } /** *

* The version of the prefix list. *

* * @param version * The version of the prefix list. */ public void setVersion(Long version) { this.version = version; } /** *

* The version of the prefix list. *

* * @return The version of the prefix list. */ public Long getVersion() { return this.version; } /** *

* The version of the prefix list. *

* * @param version * The version of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withVersion(Long version) { setVersion(version); return this; } /** *

* The tags for the prefix list. *

* * @return The tags for the prefix list. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The tags for the prefix list. *

* * @param tags * The tags for the prefix list. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* The tags for the prefix list. *

*

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

* * @param tags * The tags for the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withTags(Tag... tags) { if (this.tags == null) { setTags(new com.amazonaws.internal.SdkInternalList(tags.length)); } for (Tag ele : tags) { this.tags.add(ele); } return this; } /** *

* The tags for the prefix list. *

* * @param tags * The tags for the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withTags(java.util.Collection tags) { setTags(tags); return this; } /** *

* The ID of the owner of the prefix list. *

* * @param ownerId * The ID of the owner of the prefix list. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The ID of the owner of the prefix list. *

* * @return The ID of the owner of the prefix list. */ public String getOwnerId() { return this.ownerId; } /** *

* The ID of the owner of the prefix list. *

* * @param ownerId * The ID of the owner of the prefix list. * @return Returns a reference to this object so that method calls can be chained together. */ public ManagedPrefixList withOwnerId(String ownerId) { setOwnerId(ownerId); 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 (getPrefixListId() != null) sb.append("PrefixListId: ").append(getPrefixListId()).append(","); if (getAddressFamily() != null) sb.append("AddressFamily: ").append(getAddressFamily()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getStateMessage() != null) sb.append("StateMessage: ").append(getStateMessage()).append(","); if (getPrefixListArn() != null) sb.append("PrefixListArn: ").append(getPrefixListArn()).append(","); if (getPrefixListName() != null) sb.append("PrefixListName: ").append(getPrefixListName()).append(","); if (getMaxEntries() != null) sb.append("MaxEntries: ").append(getMaxEntries()).append(","); if (getVersion() != null) sb.append("Version: ").append(getVersion()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()).append(","); if (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ManagedPrefixList == false) return false; ManagedPrefixList other = (ManagedPrefixList) obj; if (other.getPrefixListId() == null ^ this.getPrefixListId() == null) return false; if (other.getPrefixListId() != null && other.getPrefixListId().equals(this.getPrefixListId()) == false) return false; if (other.getAddressFamily() == null ^ this.getAddressFamily() == null) return false; if (other.getAddressFamily() != null && other.getAddressFamily().equals(this.getAddressFamily()) == false) return false; if (other.getState() == null ^ this.getState() == null) return false; if (other.getState() != null && other.getState().equals(this.getState()) == false) return false; if (other.getStateMessage() == null ^ this.getStateMessage() == null) return false; if (other.getStateMessage() != null && other.getStateMessage().equals(this.getStateMessage()) == false) return false; if (other.getPrefixListArn() == null ^ this.getPrefixListArn() == null) return false; if (other.getPrefixListArn() != null && other.getPrefixListArn().equals(this.getPrefixListArn()) == false) return false; if (other.getPrefixListName() == null ^ this.getPrefixListName() == null) return false; if (other.getPrefixListName() != null && other.getPrefixListName().equals(this.getPrefixListName()) == false) return false; if (other.getMaxEntries() == null ^ this.getMaxEntries() == null) return false; if (other.getMaxEntries() != null && other.getMaxEntries().equals(this.getMaxEntries()) == false) return false; if (other.getVersion() == null ^ this.getVersion() == null) return false; if (other.getVersion() != null && other.getVersion().equals(this.getVersion()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getPrefixListId() == null) ? 0 : getPrefixListId().hashCode()); hashCode = prime * hashCode + ((getAddressFamily() == null) ? 0 : getAddressFamily().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getStateMessage() == null) ? 0 : getStateMessage().hashCode()); hashCode = prime * hashCode + ((getPrefixListArn() == null) ? 0 : getPrefixListArn().hashCode()); hashCode = prime * hashCode + ((getPrefixListName() == null) ? 0 : getPrefixListName().hashCode()); hashCode = prime * hashCode + ((getMaxEntries() == null) ? 0 : getMaxEntries().hashCode()); hashCode = prime * hashCode + ((getVersion() == null) ? 0 : getVersion().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); return hashCode; } @Override public ManagedPrefixList clone() { try { return (ManagedPrefixList) super.clone(); } catch (CloneNotSupportedException e) { throw new IllegalStateException("Got a CloneNotSupportedException from Object.clone() " + "even though we're Cloneable!", e); } } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy