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

com.amazonaws.services.guardduty.model.Container Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
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.guardduty.model;

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

/**
 * 

* Details of a container. *

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

* The container runtime (such as, Docker or containerd) used to run the container. *

*/ private String containerRuntime; /** *

* Container ID. *

*/ private String id; /** *

* Container name. *

*/ private String name; /** *

* Container image. *

*/ private String image; /** *

* Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative * and does not have a slash, this field is empty. *

*/ private String imagePrefix; /** *

* Container volume mounts. *

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

* Container security context. *

*/ private SecurityContext securityContext; /** *

* The container runtime (such as, Docker or containerd) used to run the container. *

* * @param containerRuntime * The container runtime (such as, Docker or containerd) used to run the container. */ public void setContainerRuntime(String containerRuntime) { this.containerRuntime = containerRuntime; } /** *

* The container runtime (such as, Docker or containerd) used to run the container. *

* * @return The container runtime (such as, Docker or containerd) used to run the container. */ public String getContainerRuntime() { return this.containerRuntime; } /** *

* The container runtime (such as, Docker or containerd) used to run the container. *

* * @param containerRuntime * The container runtime (such as, Docker or containerd) used to run the container. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withContainerRuntime(String containerRuntime) { setContainerRuntime(containerRuntime); return this; } /** *

* Container ID. *

* * @param id * Container ID. */ public void setId(String id) { this.id = id; } /** *

* Container ID. *

* * @return Container ID. */ public String getId() { return this.id; } /** *

* Container ID. *

* * @param id * Container ID. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withId(String id) { setId(id); return this; } /** *

* Container name. *

* * @param name * Container name. */ public void setName(String name) { this.name = name; } /** *

* Container name. *

* * @return Container name. */ public String getName() { return this.name; } /** *

* Container name. *

* * @param name * Container name. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withName(String name) { setName(name); return this; } /** *

* Container image. *

* * @param image * Container image. */ public void setImage(String image) { this.image = image; } /** *

* Container image. *

* * @return Container image. */ public String getImage() { return this.image; } /** *

* Container image. *

* * @param image * Container image. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withImage(String image) { setImage(image); return this; } /** *

* Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative * and does not have a slash, this field is empty. *

* * @param imagePrefix * Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is * relative and does not have a slash, this field is empty. */ public void setImagePrefix(String imagePrefix) { this.imagePrefix = imagePrefix; } /** *

* Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative * and does not have a slash, this field is empty. *

* * @return Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is * relative and does not have a slash, this field is empty. */ public String getImagePrefix() { return this.imagePrefix; } /** *

* Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is relative * and does not have a slash, this field is empty. *

* * @param imagePrefix * Part of the image name before the last slash. For example, imagePrefix for * public.ecr.aws/amazonlinux/amazonlinux:latest would be public.ecr.aws/amazonlinux. If the image name is * relative and does not have a slash, this field is empty. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withImagePrefix(String imagePrefix) { setImagePrefix(imagePrefix); return this; } /** *

* Container volume mounts. *

* * @return Container volume mounts. */ public java.util.List getVolumeMounts() { return volumeMounts; } /** *

* Container volume mounts. *

* * @param volumeMounts * Container volume mounts. */ public void setVolumeMounts(java.util.Collection volumeMounts) { if (volumeMounts == null) { this.volumeMounts = null; return; } this.volumeMounts = new java.util.ArrayList(volumeMounts); } /** *

* Container volume mounts. *

*

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

* * @param volumeMounts * Container volume mounts. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withVolumeMounts(VolumeMount... volumeMounts) { if (this.volumeMounts == null) { setVolumeMounts(new java.util.ArrayList(volumeMounts.length)); } for (VolumeMount ele : volumeMounts) { this.volumeMounts.add(ele); } return this; } /** *

* Container volume mounts. *

* * @param volumeMounts * Container volume mounts. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withVolumeMounts(java.util.Collection volumeMounts) { setVolumeMounts(volumeMounts); return this; } /** *

* Container security context. *

* * @param securityContext * Container security context. */ public void setSecurityContext(SecurityContext securityContext) { this.securityContext = securityContext; } /** *

* Container security context. *

* * @return Container security context. */ public SecurityContext getSecurityContext() { return this.securityContext; } /** *

* Container security context. *

* * @param securityContext * Container security context. * @return Returns a reference to this object so that method calls can be chained together. */ public Container withSecurityContext(SecurityContext securityContext) { setSecurityContext(securityContext); 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 (getContainerRuntime() != null) sb.append("ContainerRuntime: ").append(getContainerRuntime()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getImage() != null) sb.append("Image: ").append(getImage()).append(","); if (getImagePrefix() != null) sb.append("ImagePrefix: ").append(getImagePrefix()).append(","); if (getVolumeMounts() != null) sb.append("VolumeMounts: ").append(getVolumeMounts()).append(","); if (getSecurityContext() != null) sb.append("SecurityContext: ").append(getSecurityContext()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof Container == false) return false; Container other = (Container) obj; if (other.getContainerRuntime() == null ^ this.getContainerRuntime() == null) return false; if (other.getContainerRuntime() != null && other.getContainerRuntime().equals(this.getContainerRuntime()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getImage() == null ^ this.getImage() == null) return false; if (other.getImage() != null && other.getImage().equals(this.getImage()) == false) return false; if (other.getImagePrefix() == null ^ this.getImagePrefix() == null) return false; if (other.getImagePrefix() != null && other.getImagePrefix().equals(this.getImagePrefix()) == false) return false; if (other.getVolumeMounts() == null ^ this.getVolumeMounts() == null) return false; if (other.getVolumeMounts() != null && other.getVolumeMounts().equals(this.getVolumeMounts()) == false) return false; if (other.getSecurityContext() == null ^ this.getSecurityContext() == null) return false; if (other.getSecurityContext() != null && other.getSecurityContext().equals(this.getSecurityContext()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getContainerRuntime() == null) ? 0 : getContainerRuntime().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getImage() == null) ? 0 : getImage().hashCode()); hashCode = prime * hashCode + ((getImagePrefix() == null) ? 0 : getImagePrefix().hashCode()); hashCode = prime * hashCode + ((getVolumeMounts() == null) ? 0 : getVolumeMounts().hashCode()); hashCode = prime * hashCode + ((getSecurityContext() == null) ? 0 : getSecurityContext().hashCode()); return hashCode; } @Override public Container clone() { try { return (Container) 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.guardduty.model.transform.ContainerMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy