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

com.amazonaws.services.greengrassv2.model.LambdaContainerParams Maven / Gradle / Ivy

Go to download

The AWS Java SDK for AWS IoT Greengrass V2 module holds the client classes that are used for communicating with AWS IoT Greengrass V2 Service

There is a newer version: 1.12.778
Show 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.greengrassv2.model;

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

/**
 * 

* Contains information about a container in which Lambda functions run on Greengrass core devices. *

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

* The memory size of the container, expressed in kilobytes. *

*

* Default: 16384 (16 MB) *

*/ private Integer memorySizeInKB; /** *

* Whether or not the container can read information from the device's /sys folder. *

*

* Default: false *

*/ private Boolean mountROSysfs; /** *

* The list of volumes that the container can access. *

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

* The list of system devices that the container can access. *

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

* The memory size of the container, expressed in kilobytes. *

*

* Default: 16384 (16 MB) *

* * @param memorySizeInKB * The memory size of the container, expressed in kilobytes.

*

* Default: 16384 (16 MB) */ public void setMemorySizeInKB(Integer memorySizeInKB) { this.memorySizeInKB = memorySizeInKB; } /** *

* The memory size of the container, expressed in kilobytes. *

*

* Default: 16384 (16 MB) *

* * @return The memory size of the container, expressed in kilobytes.

*

* Default: 16384 (16 MB) */ public Integer getMemorySizeInKB() { return this.memorySizeInKB; } /** *

* The memory size of the container, expressed in kilobytes. *

*

* Default: 16384 (16 MB) *

* * @param memorySizeInKB * The memory size of the container, expressed in kilobytes.

*

* Default: 16384 (16 MB) * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withMemorySizeInKB(Integer memorySizeInKB) { setMemorySizeInKB(memorySizeInKB); return this; } /** *

* Whether or not the container can read information from the device's /sys folder. *

*

* Default: false *

* * @param mountROSysfs * Whether or not the container can read information from the device's /sys folder.

*

* Default: false */ public void setMountROSysfs(Boolean mountROSysfs) { this.mountROSysfs = mountROSysfs; } /** *

* Whether or not the container can read information from the device's /sys folder. *

*

* Default: false *

* * @return Whether or not the container can read information from the device's /sys folder.

*

* Default: false */ public Boolean getMountROSysfs() { return this.mountROSysfs; } /** *

* Whether or not the container can read information from the device's /sys folder. *

*

* Default: false *

* * @param mountROSysfs * Whether or not the container can read information from the device's /sys folder.

*

* Default: false * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withMountROSysfs(Boolean mountROSysfs) { setMountROSysfs(mountROSysfs); return this; } /** *

* Whether or not the container can read information from the device's /sys folder. *

*

* Default: false *

* * @return Whether or not the container can read information from the device's /sys folder.

*

* Default: false */ public Boolean isMountROSysfs() { return this.mountROSysfs; } /** *

* The list of volumes that the container can access. *

* * @return The list of volumes that the container can access. */ public java.util.List getVolumes() { return volumes; } /** *

* The list of volumes that the container can access. *

* * @param volumes * The list of volumes that the container can access. */ public void setVolumes(java.util.Collection volumes) { if (volumes == null) { this.volumes = null; return; } this.volumes = new java.util.ArrayList(volumes); } /** *

* The list of volumes that the container can access. *

*

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

* * @param volumes * The list of volumes that the container can access. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withVolumes(LambdaVolumeMount... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList(volumes.length)); } for (LambdaVolumeMount ele : volumes) { this.volumes.add(ele); } return this; } /** *

* The list of volumes that the container can access. *

* * @param volumes * The list of volumes that the container can access. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withVolumes(java.util.Collection volumes) { setVolumes(volumes); return this; } /** *

* The list of system devices that the container can access. *

* * @return The list of system devices that the container can access. */ public java.util.List getDevices() { return devices; } /** *

* The list of system devices that the container can access. *

* * @param devices * The list of system devices that the container can access. */ public void setDevices(java.util.Collection devices) { if (devices == null) { this.devices = null; return; } this.devices = new java.util.ArrayList(devices); } /** *

* The list of system devices that the container can access. *

*

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

* * @param devices * The list of system devices that the container can access. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withDevices(LambdaDeviceMount... devices) { if (this.devices == null) { setDevices(new java.util.ArrayList(devices.length)); } for (LambdaDeviceMount ele : devices) { this.devices.add(ele); } return this; } /** *

* The list of system devices that the container can access. *

* * @param devices * The list of system devices that the container can access. * @return Returns a reference to this object so that method calls can be chained together. */ public LambdaContainerParams withDevices(java.util.Collection devices) { setDevices(devices); 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 (getMemorySizeInKB() != null) sb.append("MemorySizeInKB: ").append(getMemorySizeInKB()).append(","); if (getMountROSysfs() != null) sb.append("MountROSysfs: ").append(getMountROSysfs()).append(","); if (getVolumes() != null) sb.append("Volumes: ").append(getVolumes()).append(","); if (getDevices() != null) sb.append("Devices: ").append(getDevices()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof LambdaContainerParams == false) return false; LambdaContainerParams other = (LambdaContainerParams) obj; if (other.getMemorySizeInKB() == null ^ this.getMemorySizeInKB() == null) return false; if (other.getMemorySizeInKB() != null && other.getMemorySizeInKB().equals(this.getMemorySizeInKB()) == false) return false; if (other.getMountROSysfs() == null ^ this.getMountROSysfs() == null) return false; if (other.getMountROSysfs() != null && other.getMountROSysfs().equals(this.getMountROSysfs()) == false) return false; if (other.getVolumes() == null ^ this.getVolumes() == null) return false; if (other.getVolumes() != null && other.getVolumes().equals(this.getVolumes()) == false) return false; if (other.getDevices() == null ^ this.getDevices() == null) return false; if (other.getDevices() != null && other.getDevices().equals(this.getDevices()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getMemorySizeInKB() == null) ? 0 : getMemorySizeInKB().hashCode()); hashCode = prime * hashCode + ((getMountROSysfs() == null) ? 0 : getMountROSysfs().hashCode()); hashCode = prime * hashCode + ((getVolumes() == null) ? 0 : getVolumes().hashCode()); hashCode = prime * hashCode + ((getDevices() == null) ? 0 : getDevices().hashCode()); return hashCode; } @Override public LambdaContainerParams clone() { try { return (LambdaContainerParams) 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.greengrassv2.model.transform.LambdaContainerParamsMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy