/* * 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.guardduty.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *
* Details about the Kubernetes workload involved in a Kubernetes finding. *
* * @see AWS API Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class KubernetesWorkloadDetails implements Serializable, Cloneable, StructuredPojo { /** ** Kubernetes workload name. *
*/ private String name; /** ** Kubernetes workload type (e.g. Pod, Deployment, etc.). *
*/ private String type; /** ** Kubernetes workload ID. *
*/ private String uid; /** ** Kubernetes namespace that the workload is part of. *
*/ private String namespace; /** ** Whether the hostNetwork flag is enabled for the pods included in the workload. *
*/ private Boolean hostNetwork; /** ** Containers running as part of the Kubernetes workload. *
*/ private java.util.List* Volumes used by the Kubernetes workload. *
*/ private java.util.List* Kubernetes workload name. *
* * @param name * Kubernetes workload name. */ public void setName(String name) { this.name = name; } /** ** Kubernetes workload name. *
* * @return Kubernetes workload name. */ public String getName() { return this.name; } /** ** Kubernetes workload name. *
* * @param name * Kubernetes workload name. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withName(String name) { setName(name); return this; } /** ** Kubernetes workload type (e.g. Pod, Deployment, etc.). *
* * @param type * Kubernetes workload type (e.g. Pod, Deployment, etc.). */ public void setType(String type) { this.type = type; } /** ** Kubernetes workload type (e.g. Pod, Deployment, etc.). *
* * @return Kubernetes workload type (e.g. Pod, Deployment, etc.). */ public String getType() { return this.type; } /** ** Kubernetes workload type (e.g. Pod, Deployment, etc.). *
* * @param type * Kubernetes workload type (e.g. Pod, Deployment, etc.). * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withType(String type) { setType(type); return this; } /** ** Kubernetes workload ID. *
* * @param uid * Kubernetes workload ID. */ public void setUid(String uid) { this.uid = uid; } /** ** Kubernetes workload ID. *
* * @return Kubernetes workload ID. */ public String getUid() { return this.uid; } /** ** Kubernetes workload ID. *
* * @param uid * Kubernetes workload ID. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withUid(String uid) { setUid(uid); return this; } /** ** Kubernetes namespace that the workload is part of. *
* * @param namespace * Kubernetes namespace that the workload is part of. */ public void setNamespace(String namespace) { this.namespace = namespace; } /** ** Kubernetes namespace that the workload is part of. *
* * @return Kubernetes namespace that the workload is part of. */ public String getNamespace() { return this.namespace; } /** ** Kubernetes namespace that the workload is part of. *
* * @param namespace * Kubernetes namespace that the workload is part of. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withNamespace(String namespace) { setNamespace(namespace); return this; } /** ** Whether the hostNetwork flag is enabled for the pods included in the workload. *
* * @param hostNetwork * Whether the hostNetwork flag is enabled for the pods included in the workload. */ public void setHostNetwork(Boolean hostNetwork) { this.hostNetwork = hostNetwork; } /** ** Whether the hostNetwork flag is enabled for the pods included in the workload. *
* * @return Whether the hostNetwork flag is enabled for the pods included in the workload. */ public Boolean getHostNetwork() { return this.hostNetwork; } /** ** Whether the hostNetwork flag is enabled for the pods included in the workload. *
* * @param hostNetwork * Whether the hostNetwork flag is enabled for the pods included in the workload. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withHostNetwork(Boolean hostNetwork) { setHostNetwork(hostNetwork); return this; } /** ** Whether the hostNetwork flag is enabled for the pods included in the workload. *
* * @return Whether the hostNetwork flag is enabled for the pods included in the workload. */ public Boolean isHostNetwork() { return this.hostNetwork; } /** ** Containers running as part of the Kubernetes workload. *
* * @return Containers running as part of the Kubernetes workload. */ public java.util.List* Containers running as part of the Kubernetes workload. *
* * @param containers * Containers running as part of the Kubernetes workload. */ public void setContainers(java.util.Collection* Containers running as part of the Kubernetes workload. *
** NOTE: This method appends the values to the existing list (if any). Use * {@link #setContainers(java.util.Collection)} or {@link #withContainers(java.util.Collection)} if you want to * override the existing values. *
* * @param containers * Containers running as part of the Kubernetes workload. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withContainers(Container... containers) { if (this.containers == null) { setContainers(new java.util.ArrayList* Containers running as part of the Kubernetes workload. *
* * @param containers * Containers running as part of the Kubernetes workload. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withContainers(java.util.Collection* Volumes used by the Kubernetes workload. *
* * @return Volumes used by the Kubernetes workload. */ public java.util.List* Volumes used by the Kubernetes workload. *
* * @param volumes * Volumes used by the Kubernetes workload. */ public void setVolumes(java.util.Collection* Volumes used by the Kubernetes workload. *
** 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 * Volumes used by the Kubernetes workload. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withVolumes(Volume... volumes) { if (this.volumes == null) { setVolumes(new java.util.ArrayList* Volumes used by the Kubernetes workload. *
* * @param volumes * Volumes used by the Kubernetes workload. * @return Returns a reference to this object so that method calls can be chained together. */ public KubernetesWorkloadDetails withVolumes(java.util.Collection