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

com.amazonaws.services.ec2.model.ModifyFpgaImageAttributeRequest 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 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.ec2.model;

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

import com.amazonaws.AmazonWebServiceRequest;
import com.amazonaws.Request;
import com.amazonaws.services.ec2.model.transform.ModifyFpgaImageAttributeRequestMarshaller;

/**
 * 
 */
@Generated("com.amazonaws:aws-java-sdk-code-generator")
public class ModifyFpgaImageAttributeRequest extends AmazonWebServiceRequest implements Serializable, Cloneable,
        DryRunSupportedRequest {

    /**
     * 

* The ID of the AFI. *

*/ private String fpgaImageId; /** *

* The name of the attribute. *

*/ private String attribute; /** *

* The operation type. *

*/ private String operationType; /** *

* The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission * attribute. *

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

* The user groups. This parameter is valid only when modifying the loadPermission attribute. *

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

* The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when * modifying the productCodes attribute. *

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

* The load permission for the AFI. *

*/ private LoadPermissionModifications loadPermission; /** *

* A description for the AFI. *

*/ private String description; /** *

* A name for the AFI. *

*/ private String name; /** *

* The ID of the AFI. *

* * @param fpgaImageId * The ID of the AFI. */ public void setFpgaImageId(String fpgaImageId) { this.fpgaImageId = fpgaImageId; } /** *

* The ID of the AFI. *

* * @return The ID of the AFI. */ public String getFpgaImageId() { return this.fpgaImageId; } /** *

* The ID of the AFI. *

* * @param fpgaImageId * The ID of the AFI. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withFpgaImageId(String fpgaImageId) { setFpgaImageId(fpgaImageId); return this; } /** *

* The name of the attribute. *

* * @param attribute * The name of the attribute. * @see FpgaImageAttributeName */ public void setAttribute(String attribute) { this.attribute = attribute; } /** *

* The name of the attribute. *

* * @return The name of the attribute. * @see FpgaImageAttributeName */ public String getAttribute() { return this.attribute; } /** *

* The name of the attribute. *

* * @param attribute * The name of the attribute. * @return Returns a reference to this object so that method calls can be chained together. * @see FpgaImageAttributeName */ public ModifyFpgaImageAttributeRequest withAttribute(String attribute) { setAttribute(attribute); return this; } /** *

* The name of the attribute. *

* * @param attribute * The name of the attribute. * @return Returns a reference to this object so that method calls can be chained together. * @see FpgaImageAttributeName */ public ModifyFpgaImageAttributeRequest withAttribute(FpgaImageAttributeName attribute) { this.attribute = attribute.toString(); return this; } /** *

* The operation type. *

* * @param operationType * The operation type. * @see OperationType */ public void setOperationType(String operationType) { this.operationType = operationType; } /** *

* The operation type. *

* * @return The operation type. * @see OperationType */ public String getOperationType() { return this.operationType; } /** *

* The operation type. *

* * @param operationType * The operation type. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationType */ public ModifyFpgaImageAttributeRequest withOperationType(String operationType) { setOperationType(operationType); return this; } /** *

* The operation type. *

* * @param operationType * The operation type. * @return Returns a reference to this object so that method calls can be chained together. * @see OperationType */ public ModifyFpgaImageAttributeRequest withOperationType(OperationType operationType) { this.operationType = operationType.toString(); return this; } /** *

* The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission * attribute. *

* * @return The Amazon Web Services account IDs. This parameter is valid only when modifying the * loadPermission attribute. */ public java.util.List getUserIds() { if (userIds == null) { userIds = new com.amazonaws.internal.SdkInternalList(); } return userIds; } /** *

* The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission * attribute. *

* * @param userIds * The Amazon Web Services account IDs. This parameter is valid only when modifying the * loadPermission attribute. */ public void setUserIds(java.util.Collection userIds) { if (userIds == null) { this.userIds = null; return; } this.userIds = new com.amazonaws.internal.SdkInternalList(userIds); } /** *

* The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission * attribute. *

*

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

* * @param userIds * The Amazon Web Services account IDs. This parameter is valid only when modifying the * loadPermission attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withUserIds(String... userIds) { if (this.userIds == null) { setUserIds(new com.amazonaws.internal.SdkInternalList(userIds.length)); } for (String ele : userIds) { this.userIds.add(ele); } return this; } /** *

* The Amazon Web Services account IDs. This parameter is valid only when modifying the loadPermission * attribute. *

* * @param userIds * The Amazon Web Services account IDs. This parameter is valid only when modifying the * loadPermission attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withUserIds(java.util.Collection userIds) { setUserIds(userIds); return this; } /** *

* The user groups. This parameter is valid only when modifying the loadPermission attribute. *

* * @return The user groups. This parameter is valid only when modifying the loadPermission attribute. */ public java.util.List getUserGroups() { if (userGroups == null) { userGroups = new com.amazonaws.internal.SdkInternalList(); } return userGroups; } /** *

* The user groups. This parameter is valid only when modifying the loadPermission attribute. *

* * @param userGroups * The user groups. This parameter is valid only when modifying the loadPermission attribute. */ public void setUserGroups(java.util.Collection userGroups) { if (userGroups == null) { this.userGroups = null; return; } this.userGroups = new com.amazonaws.internal.SdkInternalList(userGroups); } /** *

* The user groups. This parameter is valid only when modifying the loadPermission attribute. *

*

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

* * @param userGroups * The user groups. This parameter is valid only when modifying the loadPermission attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withUserGroups(String... userGroups) { if (this.userGroups == null) { setUserGroups(new com.amazonaws.internal.SdkInternalList(userGroups.length)); } for (String ele : userGroups) { this.userGroups.add(ele); } return this; } /** *

* The user groups. This parameter is valid only when modifying the loadPermission attribute. *

* * @param userGroups * The user groups. This parameter is valid only when modifying the loadPermission attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withUserGroups(java.util.Collection userGroups) { setUserGroups(userGroups); return this; } /** *

* The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when * modifying the productCodes attribute. *

* * @return The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid * only when modifying the productCodes attribute. */ public java.util.List getProductCodes() { if (productCodes == null) { productCodes = new com.amazonaws.internal.SdkInternalList(); } return productCodes; } /** *

* The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when * modifying the productCodes attribute. *

* * @param productCodes * The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid * only when modifying the productCodes attribute. */ public void setProductCodes(java.util.Collection productCodes) { if (productCodes == null) { this.productCodes = null; return; } this.productCodes = new com.amazonaws.internal.SdkInternalList(productCodes); } /** *

* The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when * modifying the productCodes attribute. *

*

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

* * @param productCodes * The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid * only when modifying the productCodes attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withProductCodes(String... productCodes) { if (this.productCodes == null) { setProductCodes(new com.amazonaws.internal.SdkInternalList(productCodes.length)); } for (String ele : productCodes) { this.productCodes.add(ele); } return this; } /** *

* The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid only when * modifying the productCodes attribute. *

* * @param productCodes * The product codes. After you add a product code to an AFI, it can't be removed. This parameter is valid * only when modifying the productCodes attribute. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withProductCodes(java.util.Collection productCodes) { setProductCodes(productCodes); return this; } /** *

* The load permission for the AFI. *

* * @param loadPermission * The load permission for the AFI. */ public void setLoadPermission(LoadPermissionModifications loadPermission) { this.loadPermission = loadPermission; } /** *

* The load permission for the AFI. *

* * @return The load permission for the AFI. */ public LoadPermissionModifications getLoadPermission() { return this.loadPermission; } /** *

* The load permission for the AFI. *

* * @param loadPermission * The load permission for the AFI. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withLoadPermission(LoadPermissionModifications loadPermission) { setLoadPermission(loadPermission); return this; } /** *

* A description for the AFI. *

* * @param description * A description for the AFI. */ public void setDescription(String description) { this.description = description; } /** *

* A description for the AFI. *

* * @return A description for the AFI. */ public String getDescription() { return this.description; } /** *

* A description for the AFI. *

* * @param description * A description for the AFI. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withDescription(String description) { setDescription(description); return this; } /** *

* A name for the AFI. *

* * @param name * A name for the AFI. */ public void setName(String name) { this.name = name; } /** *

* A name for the AFI. *

* * @return A name for the AFI. */ public String getName() { return this.name; } /** *

* A name for the AFI. *

* * @param name * A name for the AFI. * @return Returns a reference to this object so that method calls can be chained together. */ public ModifyFpgaImageAttributeRequest withName(String name) { setName(name); return this; } /** * This method is intended for internal use only. Returns the marshaled request configured with additional * parameters to enable operation dry-run. */ @Override public Request getDryRunRequest() { Request request = new ModifyFpgaImageAttributeRequestMarshaller().marshall(this); request.addParameter("DryRun", Boolean.toString(true)); return request; } /** * 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 (getFpgaImageId() != null) sb.append("FpgaImageId: ").append(getFpgaImageId()).append(","); if (getAttribute() != null) sb.append("Attribute: ").append(getAttribute()).append(","); if (getOperationType() != null) sb.append("OperationType: ").append(getOperationType()).append(","); if (getUserIds() != null) sb.append("UserIds: ").append(getUserIds()).append(","); if (getUserGroups() != null) sb.append("UserGroups: ").append(getUserGroups()).append(","); if (getProductCodes() != null) sb.append("ProductCodes: ").append(getProductCodes()).append(","); if (getLoadPermission() != null) sb.append("LoadPermission: ").append(getLoadPermission()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getName() != null) sb.append("Name: ").append(getName()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ModifyFpgaImageAttributeRequest == false) return false; ModifyFpgaImageAttributeRequest other = (ModifyFpgaImageAttributeRequest) obj; if (other.getFpgaImageId() == null ^ this.getFpgaImageId() == null) return false; if (other.getFpgaImageId() != null && other.getFpgaImageId().equals(this.getFpgaImageId()) == false) return false; if (other.getAttribute() == null ^ this.getAttribute() == null) return false; if (other.getAttribute() != null && other.getAttribute().equals(this.getAttribute()) == false) return false; if (other.getOperationType() == null ^ this.getOperationType() == null) return false; if (other.getOperationType() != null && other.getOperationType().equals(this.getOperationType()) == false) return false; if (other.getUserIds() == null ^ this.getUserIds() == null) return false; if (other.getUserIds() != null && other.getUserIds().equals(this.getUserIds()) == false) return false; if (other.getUserGroups() == null ^ this.getUserGroups() == null) return false; if (other.getUserGroups() != null && other.getUserGroups().equals(this.getUserGroups()) == false) return false; if (other.getProductCodes() == null ^ this.getProductCodes() == null) return false; if (other.getProductCodes() != null && other.getProductCodes().equals(this.getProductCodes()) == false) return false; if (other.getLoadPermission() == null ^ this.getLoadPermission() == null) return false; if (other.getLoadPermission() != null && other.getLoadPermission().equals(this.getLoadPermission()) == 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.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getFpgaImageId() == null) ? 0 : getFpgaImageId().hashCode()); hashCode = prime * hashCode + ((getAttribute() == null) ? 0 : getAttribute().hashCode()); hashCode = prime * hashCode + ((getOperationType() == null) ? 0 : getOperationType().hashCode()); hashCode = prime * hashCode + ((getUserIds() == null) ? 0 : getUserIds().hashCode()); hashCode = prime * hashCode + ((getUserGroups() == null) ? 0 : getUserGroups().hashCode()); hashCode = prime * hashCode + ((getProductCodes() == null) ? 0 : getProductCodes().hashCode()); hashCode = prime * hashCode + ((getLoadPermission() == null) ? 0 : getLoadPermission().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); return hashCode; } @Override public ModifyFpgaImageAttributeRequest clone() { return (ModifyFpgaImageAttributeRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy