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

com.amazonaws.services.networkmanager.model.ServiceInsertionSegments Maven / Gradle / Ivy

Go to download

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

The 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.networkmanager.model;

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

/**
 * 

* Describes the segments associated with the service insertion action. *

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

* The list of segments associated with the send-via action. *

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

* The list of segments associated with the send-to action. *

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

* The list of segments associated with the send-via action. *

* * @return The list of segments associated with the send-via action. */ public java.util.List getSendVia() { return sendVia; } /** *

* The list of segments associated with the send-via action. *

* * @param sendVia * The list of segments associated with the send-via action. */ public void setSendVia(java.util.Collection sendVia) { if (sendVia == null) { this.sendVia = null; return; } this.sendVia = new java.util.ArrayList(sendVia); } /** *

* The list of segments associated with the send-via action. *

*

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

* * @param sendVia * The list of segments associated with the send-via action. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceInsertionSegments withSendVia(String... sendVia) { if (this.sendVia == null) { setSendVia(new java.util.ArrayList(sendVia.length)); } for (String ele : sendVia) { this.sendVia.add(ele); } return this; } /** *

* The list of segments associated with the send-via action. *

* * @param sendVia * The list of segments associated with the send-via action. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceInsertionSegments withSendVia(java.util.Collection sendVia) { setSendVia(sendVia); return this; } /** *

* The list of segments associated with the send-to action. *

* * @return The list of segments associated with the send-to action. */ public java.util.List getSendTo() { return sendTo; } /** *

* The list of segments associated with the send-to action. *

* * @param sendTo * The list of segments associated with the send-to action. */ public void setSendTo(java.util.Collection sendTo) { if (sendTo == null) { this.sendTo = null; return; } this.sendTo = new java.util.ArrayList(sendTo); } /** *

* The list of segments associated with the send-to action. *

*

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

* * @param sendTo * The list of segments associated with the send-to action. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceInsertionSegments withSendTo(String... sendTo) { if (this.sendTo == null) { setSendTo(new java.util.ArrayList(sendTo.length)); } for (String ele : sendTo) { this.sendTo.add(ele); } return this; } /** *

* The list of segments associated with the send-to action. *

* * @param sendTo * The list of segments associated with the send-to action. * @return Returns a reference to this object so that method calls can be chained together. */ public ServiceInsertionSegments withSendTo(java.util.Collection sendTo) { setSendTo(sendTo); 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 (getSendVia() != null) sb.append("SendVia: ").append(getSendVia()).append(","); if (getSendTo() != null) sb.append("SendTo: ").append(getSendTo()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ServiceInsertionSegments == false) return false; ServiceInsertionSegments other = (ServiceInsertionSegments) obj; if (other.getSendVia() == null ^ this.getSendVia() == null) return false; if (other.getSendVia() != null && other.getSendVia().equals(this.getSendVia()) == false) return false; if (other.getSendTo() == null ^ this.getSendTo() == null) return false; if (other.getSendTo() != null && other.getSendTo().equals(this.getSendTo()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSendVia() == null) ? 0 : getSendVia().hashCode()); hashCode = prime * hashCode + ((getSendTo() == null) ? 0 : getSendTo().hashCode()); return hashCode; } @Override public ServiceInsertionSegments clone() { try { return (ServiceInsertionSegments) 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.networkmanager.model.transform.ServiceInsertionSegmentsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy