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

com.amazonaws.services.globalaccelerator.model.ByoipCidr Maven / Gradle / Ivy

/*
 * 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.globalaccelerator.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Information about an IP address range that is provisioned for use with your Amazon Web Services resources through * bring your own IP address (BYOIP). *

*

* The following describes each BYOIP State that your IP address range can be in. *

*
    *
  • *

    * PENDING_PROVISIONING — You’ve submitted a request to provision an IP address range but it is not yet * provisioned with Global Accelerator. *

    *
  • *
  • *

    * READY — The address range is provisioned with Global Accelerator and can be advertised. *

    *
  • *
  • *

    * PENDING_ADVERTISING — You’ve submitted a request for Global Accelerator to advertise an address range but it * is not yet being advertised. *

    *
  • *
  • *

    * ADVERTISING — The address range is being advertised by Global Accelerator. *

    *
  • *
  • *

    * PENDING_WITHDRAWING — You’ve submitted a request to withdraw an address range from being advertised but it is * still being advertised by Global Accelerator. *

    *
  • *
  • *

    * PENDING_DEPROVISIONING — You’ve submitted a request to deprovision an address range from Global Accelerator * but it is still provisioned. *

    *
  • *
  • *

    * DEPROVISIONED — The address range is deprovisioned from Global Accelerator. *

    *
  • *
  • *

    * FAILED_PROVISION — The request to provision the address range from Global Accelerator was not successful. * Please make sure that you provide all of the correct information, and try again. If the request fails a second time, * contact Amazon Web Services support. *

    *
  • *
  • *

    * FAILED_ADVERTISING — The request for Global Accelerator to advertise the address range was not successful. * Please make sure that you provide all of the correct information, and try again. If the request fails a second time, * contact Amazon Web Services support. *

    *
  • *
  • *

    * FAILED_WITHDRAW — The request to withdraw the address range from advertising by Global Accelerator was not * successful. Please make sure that you provide all of the correct information, and try again. If the request fails a * second time, contact Amazon Web Services support. *

    *
  • *
  • *

    * FAILED_DEPROVISION — The request to deprovision the address range from Global Accelerator was not successful. * Please make sure that you provide all of the correct information, and try again. If the request fails a second time, * contact Amazon Web Services support. *

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

* The address range, in CIDR notation. *

*

* For more information, see Bring your own IP addresses * (BYOIP) in the Global Accelerator Developer Guide. *

*/ private String cidr; /** *

* The state of the address pool. *

*/ private String state; /** *

* A history of status changes for an IP address range that you bring to Global Accelerator through bring your own * IP address (BYOIP). *

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

* The address range, in CIDR notation. *

*

* For more information, see Bring your own IP addresses * (BYOIP) in the Global Accelerator Developer Guide. *

* * @param cidr * The address range, in CIDR notation.

*

* For more information, see Bring your own IP * addresses (BYOIP) in the Global Accelerator Developer Guide. */ public void setCidr(String cidr) { this.cidr = cidr; } /** *

* The address range, in CIDR notation. *

*

* For more information, see Bring your own IP addresses * (BYOIP) in the Global Accelerator Developer Guide. *

* * @return The address range, in CIDR notation.

*

* For more information, see Bring your own IP * addresses (BYOIP) in the Global Accelerator Developer Guide. */ public String getCidr() { return this.cidr; } /** *

* The address range, in CIDR notation. *

*

* For more information, see Bring your own IP addresses * (BYOIP) in the Global Accelerator Developer Guide. *

* * @param cidr * The address range, in CIDR notation.

*

* For more information, see Bring your own IP * addresses (BYOIP) in the Global Accelerator Developer Guide. * @return Returns a reference to this object so that method calls can be chained together. */ public ByoipCidr withCidr(String cidr) { setCidr(cidr); return this; } /** *

* The state of the address pool. *

* * @param state * The state of the address pool. * @see ByoipCidrState */ public void setState(String state) { this.state = state; } /** *

* The state of the address pool. *

* * @return The state of the address pool. * @see ByoipCidrState */ public String getState() { return this.state; } /** *

* The state of the address pool. *

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

* The state of the address pool. *

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

* A history of status changes for an IP address range that you bring to Global Accelerator through bring your own * IP address (BYOIP). *

* * @return A history of status changes for an IP address range that you bring to Global Accelerator through bring * your own IP address (BYOIP). */ public java.util.List getEvents() { return events; } /** *

* A history of status changes for an IP address range that you bring to Global Accelerator through bring your own * IP address (BYOIP). *

* * @param events * A history of status changes for an IP address range that you bring to Global Accelerator through bring * your own IP address (BYOIP). */ public void setEvents(java.util.Collection events) { if (events == null) { this.events = null; return; } this.events = new java.util.ArrayList(events); } /** *

* A history of status changes for an IP address range that you bring to Global Accelerator through bring your own * IP address (BYOIP). *

*

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

* * @param events * A history of status changes for an IP address range that you bring to Global Accelerator through bring * your own IP address (BYOIP). * @return Returns a reference to this object so that method calls can be chained together. */ public ByoipCidr withEvents(ByoipCidrEvent... events) { if (this.events == null) { setEvents(new java.util.ArrayList(events.length)); } for (ByoipCidrEvent ele : events) { this.events.add(ele); } return this; } /** *

* A history of status changes for an IP address range that you bring to Global Accelerator through bring your own * IP address (BYOIP). *

* * @param events * A history of status changes for an IP address range that you bring to Global Accelerator through bring * your own IP address (BYOIP). * @return Returns a reference to this object so that method calls can be chained together. */ public ByoipCidr withEvents(java.util.Collection events) { setEvents(events); 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 (getCidr() != null) sb.append("Cidr: ").append(getCidr()).append(","); if (getState() != null) sb.append("State: ").append(getState()).append(","); if (getEvents() != null) sb.append("Events: ").append(getEvents()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ByoipCidr == false) return false; ByoipCidr other = (ByoipCidr) obj; if (other.getCidr() == null ^ this.getCidr() == null) return false; if (other.getCidr() != null && other.getCidr().equals(this.getCidr()) == 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.getEvents() == null ^ this.getEvents() == null) return false; if (other.getEvents() != null && other.getEvents().equals(this.getEvents()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getCidr() == null) ? 0 : getCidr().hashCode()); hashCode = prime * hashCode + ((getState() == null) ? 0 : getState().hashCode()); hashCode = prime * hashCode + ((getEvents() == null) ? 0 : getEvents().hashCode()); return hashCode; } @Override public ByoipCidr clone() { try { return (ByoipCidr) 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.globalaccelerator.model.transform.ByoipCidrMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy