/* * 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.securityhub.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Details for a volume mount point that's used in a container definition. *

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

* The name of the volume to mount. Must be a volume name referenced in the name parameter of task * definition volume. *

*/ private String sourceVolume; /** *

* The path on the container to mount the host volume at. *

*/ private String containerPath; /** *

* The name of the volume to mount. Must be a volume name referenced in the name parameter of task * definition volume. *

* * @param sourceVolume * The name of the volume to mount. Must be a volume name referenced in the name parameter of * task definition volume. */ public void setSourceVolume(String sourceVolume) { this.sourceVolume = sourceVolume; } /** *

* The name of the volume to mount. Must be a volume name referenced in the name parameter of task * definition volume. *

* * @return The name of the volume to mount. Must be a volume name referenced in the name parameter of * task definition volume. */ public String getSourceVolume() { return this.sourceVolume; } /** *

* The name of the volume to mount. Must be a volume name referenced in the name parameter of task * definition volume. *

* * @param sourceVolume * The name of the volume to mount. Must be a volume name referenced in the name parameter of * task definition volume. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsMountPoint withSourceVolume(String sourceVolume) { setSourceVolume(sourceVolume); return this; } /** *

* The path on the container to mount the host volume at. *

* * @param containerPath * The path on the container to mount the host volume at. */ public void setContainerPath(String containerPath) { this.containerPath = containerPath; } /** *

* The path on the container to mount the host volume at. *

* * @return The path on the container to mount the host volume at. */ public String getContainerPath() { return this.containerPath; } /** *

* The path on the container to mount the host volume at. *

* * @param containerPath * The path on the container to mount the host volume at. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsMountPoint withContainerPath(String containerPath) { setContainerPath(containerPath); 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 (getSourceVolume() != null) sb.append("SourceVolume: ").append(getSourceVolume()).append(","); if (getContainerPath() != null) sb.append("ContainerPath: ").append(getContainerPath()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsMountPoint == false) return false; AwsMountPoint other = (AwsMountPoint) obj; if (other.getSourceVolume() == null ^ this.getSourceVolume() == null) return false; if (other.getSourceVolume() != null && other.getSourceVolume().equals(this.getSourceVolume()) == false) return false; if (other.getContainerPath() == null ^ this.getContainerPath() == null) return false; if (other.getContainerPath() != null && other.getContainerPath().equals(this.getContainerPath()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSourceVolume() == null) ? 0 : getSourceVolume().hashCode()); hashCode = prime * hashCode + ((getContainerPath() == null) ? 0 : getContainerPath().hashCode()); return hashCode; } @Override public AwsMountPoint clone() { try { return (AwsMountPoint) 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.securityhub.model.transform.AwsMountPointMarshaller.getInstance().marshall(this, protocolMarshaller); } }