/* * Copyright 2018-2023 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.lightsail.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Describes monthly data transfer rates and port information for an instance. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class InstanceNetworking implements Serializable, Cloneable, StructuredPojo { /** ** The amount of data in GB allocated for monthly data transfers. *
*/ private MonthlyTransfer monthlyTransfer; /** ** An array of key-value pairs containing information about the ports on the instance. *
*/ private java.util.List* The amount of data in GB allocated for monthly data transfers. *
* * @param monthlyTransfer * The amount of data in GB allocated for monthly data transfers. */ public void setMonthlyTransfer(MonthlyTransfer monthlyTransfer) { this.monthlyTransfer = monthlyTransfer; } /** ** The amount of data in GB allocated for monthly data transfers. *
* * @return The amount of data in GB allocated for monthly data transfers. */ public MonthlyTransfer getMonthlyTransfer() { return this.monthlyTransfer; } /** ** The amount of data in GB allocated for monthly data transfers. *
* * @param monthlyTransfer * The amount of data in GB allocated for monthly data transfers. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceNetworking withMonthlyTransfer(MonthlyTransfer monthlyTransfer) { setMonthlyTransfer(monthlyTransfer); return this; } /** ** An array of key-value pairs containing information about the ports on the instance. *
* * @return An array of key-value pairs containing information about the ports on the instance. */ public java.util.List* An array of key-value pairs containing information about the ports on the instance. *
* * @param ports * An array of key-value pairs containing information about the ports on the instance. */ public void setPorts(java.util.Collection* An array of key-value pairs containing information about the ports on the instance. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setPorts(java.util.Collection)} or {@link #withPorts(java.util.Collection)} if you want to override the * existing values. *
* * @param ports * An array of key-value pairs containing information about the ports on the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceNetworking withPorts(InstancePortInfo... ports) { if (this.ports == null) { setPorts(new java.util.ArrayList* An array of key-value pairs containing information about the ports on the instance. *
* * @param ports * An array of key-value pairs containing information about the ports on the instance. * @return Returns a reference to this object so that method calls can be chained together. */ public InstanceNetworking withPorts(java.util.Collection