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

com.amazonaws.services.ec2.model.IpamScope 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 2017-2022 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;

/**
 * 

* In IPAM, a scope is the highest-level container within IPAM. An IPAM contains two default scopes. Each scope * represents the IP space for a single network. The private scope is intended for all private IP address space. The * public scope is intended for all public IP address space. Scopes enable you to reuse IP addresses across multiple * unconnected networks without causing IP address overlap or conflict. *

*

* For more information, see How IPAM * works in the Amazon VPC IPAM User Guide. *

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

* The Amazon Web Services account ID of the owner of the scope. *

*/ private String ownerId; /** *

* The ID of the scope. *

*/ private String ipamScopeId; /** *

* The ARN of the scope. *

*/ private String ipamScopeArn; /** *

* The ARN of the IPAM. *

*/ private String ipamArn; /** *

* The Amazon Web Services Region of the IPAM scope. *

*/ private String ipamRegion; /** *

* The type of the scope. *

*/ private String ipamScopeType; /** *

* Defines if the scope is the default scope or not. *

*/ private Boolean isDefault; /** *

* The description of the scope. *

*/ private String description; /** *

* The number of pools in the scope. *

*/ private Integer poolCount; /** *

* The state of the IPAM scope. *

*/ private String state; /** *

* The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the key Owner and the * value TeamA, specify tag:Owner for the filter name and TeamA for the * filter value. *

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

* The Amazon Web Services account ID of the owner of the scope. *

* * @param ownerId * The Amazon Web Services account ID of the owner of the scope. */ public void setOwnerId(String ownerId) { this.ownerId = ownerId; } /** *

* The Amazon Web Services account ID of the owner of the scope. *

* * @return The Amazon Web Services account ID of the owner of the scope. */ public String getOwnerId() { return this.ownerId; } /** *

* The Amazon Web Services account ID of the owner of the scope. *

* * @param ownerId * The Amazon Web Services account ID of the owner of the scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withOwnerId(String ownerId) { setOwnerId(ownerId); return this; } /** *

* The ID of the scope. *

* * @param ipamScopeId * The ID of the scope. */ public void setIpamScopeId(String ipamScopeId) { this.ipamScopeId = ipamScopeId; } /** *

* The ID of the scope. *

* * @return The ID of the scope. */ public String getIpamScopeId() { return this.ipamScopeId; } /** *

* The ID of the scope. *

* * @param ipamScopeId * The ID of the scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withIpamScopeId(String ipamScopeId) { setIpamScopeId(ipamScopeId); return this; } /** *

* The ARN of the scope. *

* * @param ipamScopeArn * The ARN of the scope. */ public void setIpamScopeArn(String ipamScopeArn) { this.ipamScopeArn = ipamScopeArn; } /** *

* The ARN of the scope. *

* * @return The ARN of the scope. */ public String getIpamScopeArn() { return this.ipamScopeArn; } /** *

* The ARN of the scope. *

* * @param ipamScopeArn * The ARN of the scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withIpamScopeArn(String ipamScopeArn) { setIpamScopeArn(ipamScopeArn); return this; } /** *

* The ARN of the IPAM. *

* * @param ipamArn * The ARN of the IPAM. */ public void setIpamArn(String ipamArn) { this.ipamArn = ipamArn; } /** *

* The ARN of the IPAM. *

* * @return The ARN of the IPAM. */ public String getIpamArn() { return this.ipamArn; } /** *

* The ARN of the IPAM. *

* * @param ipamArn * The ARN of the IPAM. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withIpamArn(String ipamArn) { setIpamArn(ipamArn); return this; } /** *

* The Amazon Web Services Region of the IPAM scope. *

* * @param ipamRegion * The Amazon Web Services Region of the IPAM scope. */ public void setIpamRegion(String ipamRegion) { this.ipamRegion = ipamRegion; } /** *

* The Amazon Web Services Region of the IPAM scope. *

* * @return The Amazon Web Services Region of the IPAM scope. */ public String getIpamRegion() { return this.ipamRegion; } /** *

* The Amazon Web Services Region of the IPAM scope. *

* * @param ipamRegion * The Amazon Web Services Region of the IPAM scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withIpamRegion(String ipamRegion) { setIpamRegion(ipamRegion); return this; } /** *

* The type of the scope. *

* * @param ipamScopeType * The type of the scope. * @see IpamScopeType */ public void setIpamScopeType(String ipamScopeType) { this.ipamScopeType = ipamScopeType; } /** *

* The type of the scope. *

* * @return The type of the scope. * @see IpamScopeType */ public String getIpamScopeType() { return this.ipamScopeType; } /** *

* The type of the scope. *

* * @param ipamScopeType * The type of the scope. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamScopeType */ public IpamScope withIpamScopeType(String ipamScopeType) { setIpamScopeType(ipamScopeType); return this; } /** *

* The type of the scope. *

* * @param ipamScopeType * The type of the scope. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamScopeType */ public IpamScope withIpamScopeType(IpamScopeType ipamScopeType) { this.ipamScopeType = ipamScopeType.toString(); return this; } /** *

* Defines if the scope is the default scope or not. *

* * @param isDefault * Defines if the scope is the default scope or not. */ public void setIsDefault(Boolean isDefault) { this.isDefault = isDefault; } /** *

* Defines if the scope is the default scope or not. *

* * @return Defines if the scope is the default scope or not. */ public Boolean getIsDefault() { return this.isDefault; } /** *

* Defines if the scope is the default scope or not. *

* * @param isDefault * Defines if the scope is the default scope or not. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withIsDefault(Boolean isDefault) { setIsDefault(isDefault); return this; } /** *

* Defines if the scope is the default scope or not. *

* * @return Defines if the scope is the default scope or not. */ public Boolean isDefault() { return this.isDefault; } /** *

* The description of the scope. *

* * @param description * The description of the scope. */ public void setDescription(String description) { this.description = description; } /** *

* The description of the scope. *

* * @return The description of the scope. */ public String getDescription() { return this.description; } /** *

* The description of the scope. *

* * @param description * The description of the scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withDescription(String description) { setDescription(description); return this; } /** *

* The number of pools in the scope. *

* * @param poolCount * The number of pools in the scope. */ public void setPoolCount(Integer poolCount) { this.poolCount = poolCount; } /** *

* The number of pools in the scope. *

* * @return The number of pools in the scope. */ public Integer getPoolCount() { return this.poolCount; } /** *

* The number of pools in the scope. *

* * @param poolCount * The number of pools in the scope. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withPoolCount(Integer poolCount) { setPoolCount(poolCount); return this; } /** *

* The state of the IPAM scope. *

* * @param state * The state of the IPAM scope. * @see IpamScopeState */ public void setState(String state) { this.state = state; } /** *

* The state of the IPAM scope. *

* * @return The state of the IPAM scope. * @see IpamScopeState */ public String getState() { return this.state; } /** *

* The state of the IPAM scope. *

* * @param state * The state of the IPAM scope. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamScopeState */ public IpamScope withState(String state) { setState(state); return this; } /** *

* The state of the IPAM scope. *

* * @param state * The state of the IPAM scope. * @return Returns a reference to this object so that method calls can be chained together. * @see IpamScopeState */ public IpamScope withState(IpamScopeState state) { this.state = state.toString(); return this; } /** *

* The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the key Owner and the * value TeamA, specify tag:Owner for the filter name and TeamA for the * filter value. *

* * @return The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the * tag value as the filter value. For example, to find all resources that have a tag with the key * Owner and the value TeamA, specify tag:Owner for the filter name * and TeamA for the filter value. */ public java.util.List getTags() { if (tags == null) { tags = new com.amazonaws.internal.SdkInternalList(); } return tags; } /** *

* The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the key Owner and the * value TeamA, specify tag:Owner for the filter name and TeamA for the * filter value. *

* * @param tags * The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the * tag value as the filter value. For example, to find all resources that have a tag with the key * Owner and the value TeamA, specify tag:Owner for the filter name * and TeamA for the filter value. */ public void setTags(java.util.Collection tags) { if (tags == null) { this.tags = null; return; } this.tags = new com.amazonaws.internal.SdkInternalList(tags); } /** *

* The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the key Owner and the * value TeamA, specify tag:Owner for the filter name and TeamA for the * filter value. *

*

* 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 key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the * tag value as the filter value. For example, to find all resources that have a tag with the key * Owner and the value TeamA, specify tag:Owner for the filter name * and TeamA for the filter value. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope 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 key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the tag value * as the filter value. For example, to find all resources that have a tag with the key Owner and the * value TeamA, specify tag:Owner for the filter name and TeamA for the * filter value. *

* * @param tags * The key/value combination of a tag assigned to the resource. Use the tag key in the filter name and the * tag value as the filter value. For example, to find all resources that have a tag with the key * Owner and the value TeamA, specify tag:Owner for the filter name * and TeamA for the filter value. * @return Returns a reference to this object so that method calls can be chained together. */ public IpamScope withTags(java.util.Collection tags) { setTags(tags); 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 (getOwnerId() != null) sb.append("OwnerId: ").append(getOwnerId()).append(","); if (getIpamScopeId() != null) sb.append("IpamScopeId: ").append(getIpamScopeId()).append(","); if (getIpamScopeArn() != null) sb.append("IpamScopeArn: ").append(getIpamScopeArn()).append(","); if (getIpamArn() != null) sb.append("IpamArn: ").append(getIpamArn()).append(","); if (getIpamRegion() != null) sb.append("IpamRegion: ").append(getIpamRegion()).append(","); if (getIpamScopeType() != null) sb.append("IpamScopeType: ").append(getIpamScopeType()).append(","); if (getIsDefault() != null) sb.append("IsDefault: ").append(getIsDefault()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getPoolCount() != null) sb.append("PoolCount: ").append(getPoolCount()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof IpamScope == false) return false; IpamScope other = (IpamScope) obj; if (other.getOwnerId() == null ^ this.getOwnerId() == null) return false; if (other.getOwnerId() != null && other.getOwnerId().equals(this.getOwnerId()) == false) return false; if (other.getIpamScopeId() == null ^ this.getIpamScopeId() == null) return false; if (other.getIpamScopeId() != null && other.getIpamScopeId().equals(this.getIpamScopeId()) == false) return false; if (other.getIpamScopeArn() == null ^ this.getIpamScopeArn() == null) return false; if (other.getIpamScopeArn() != null && other.getIpamScopeArn().equals(this.getIpamScopeArn()) == false) return false; if (other.getIpamArn() == null ^ this.getIpamArn() == null) return false; if (other.getIpamArn() != null && other.getIpamArn().equals(this.getIpamArn()) == false) return false; if (other.getIpamRegion() == null ^ this.getIpamRegion() == null) return false; if (other.getIpamRegion() != null && other.getIpamRegion().equals(this.getIpamRegion()) == false) return false; if (other.getIpamScopeType() == null ^ this.getIpamScopeType() == null) return false; if (other.getIpamScopeType() != null && other.getIpamScopeType().equals(this.getIpamScopeType()) == 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.getDescription() == null ^ this.getDescription() == null) return false; if (other.getDescription() != null && other.getDescription().equals(this.getDescription()) == false) return false; if (other.getPoolCount() == null ^ this.getPoolCount() == null) return false; if (other.getPoolCount() != null && other.getPoolCount().equals(this.getPoolCount()) == 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.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getOwnerId() == null) ? 0 : getOwnerId().hashCode()); hashCode = prime * hashCode + ((getIpamScopeId() == null) ? 0 : getIpamScopeId().hashCode()); hashCode = prime * hashCode + ((getIpamScopeArn() == null) ? 0 : getIpamScopeArn().hashCode()); hashCode = prime * hashCode + ((getIpamArn() == null) ? 0 : getIpamArn().hashCode()); hashCode = prime * hashCode + ((getIpamRegion() == null) ? 0 : getIpamRegion().hashCode()); hashCode = prime * hashCode + ((getIpamScopeType() == null) ? 0 : getIpamScopeType().hashCode()); hashCode = prime * hashCode + ((getIsDefault() == null) ? 0 : getIsDefault().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getPoolCount() == null) ? 0 : getPoolCount().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public IpamScope clone() { try { return (IpamScope) 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