/* * 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; /** *
* The details of process-related information about a finding. *
* * @see AWS API * Documentation */ @Generated("com.amazonaws:aws-java-sdk-code-generator") public class ProcessDetails implements Serializable, Cloneable, StructuredPojo { /** ** The name of the process. *
*/ private String name; /** ** The path to the process executable. *
*/ private String path; /** ** The process ID. *
*/ private Integer pid; /** *
* The parent process ID. This field accepts positive integers between O
and 2147483647
.
*
* Indicates when the process was launched. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Indicates when the process was terminated. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* The name of the process. *
* * @param name * The name of the process. */ public void setName(String name) { this.name = name; } /** ** The name of the process. *
* * @return The name of the process. */ public String getName() { return this.name; } /** ** The name of the process. *
* * @param name * The name of the process. * @return Returns a reference to this object so that method calls can be chained together. */ public ProcessDetails withName(String name) { setName(name); return this; } /** ** The path to the process executable. *
* * @param path * The path to the process executable. */ public void setPath(String path) { this.path = path; } /** ** The path to the process executable. *
* * @return The path to the process executable. */ public String getPath() { return this.path; } /** ** The path to the process executable. *
* * @param path * The path to the process executable. * @return Returns a reference to this object so that method calls can be chained together. */ public ProcessDetails withPath(String path) { setPath(path); return this; } /** ** The process ID. *
* * @param pid * The process ID. */ public void setPid(Integer pid) { this.pid = pid; } /** ** The process ID. *
* * @return The process ID. */ public Integer getPid() { return this.pid; } /** ** The process ID. *
* * @param pid * The process ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ProcessDetails withPid(Integer pid) { setPid(pid); return this; } /** *
* The parent process ID. This field accepts positive integers between O
and 2147483647
.
*
O
and
* 2147483647
.
*/
public void setParentPid(Integer parentPid) {
this.parentPid = parentPid;
}
/**
*
* The parent process ID. This field accepts positive integers between O
and 2147483647
.
*
O
and
* 2147483647
.
*/
public Integer getParentPid() {
return this.parentPid;
}
/**
*
* The parent process ID. This field accepts positive integers between O
and 2147483647
.
*
O
and
* 2147483647
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessDetails withParentPid(Integer parentPid) {
setParentPid(parentPid);
return this;
}
/**
* * Indicates when the process was launched. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setLaunchedAt(String launchedAt) {
this.launchedAt = launchedAt;
}
/**
*
* Indicates when the process was launched. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getLaunchedAt() {
return this.launchedAt;
}
/**
*
* Indicates when the process was launched. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessDetails withLaunchedAt(String launchedAt) {
setLaunchedAt(launchedAt);
return this;
}
/**
*
* Indicates when the process was terminated. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public void setTerminatedAt(String terminatedAt) {
this.terminatedAt = terminatedAt;
}
/**
*
* Indicates when the process was terminated. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
*/
public String getTerminatedAt() {
return this.terminatedAt;
}
/**
*
* Indicates when the process was terminated. *
*
* Uses the date-time
format specified in RFC
* 3339 section 5.6, Internet Date/Time Format. The value cannot contain spaces, and date and time should be
* separated by T
. For example, 2020-03-22T13:22:13.933Z
.
*
* Uses the date-time
format specified in RFC 3339 section 5.6, Internet Date/Time
* Format. The value cannot contain spaces, and date and time should be separated by T
. For
* example, 2020-03-22T13:22:13.933Z
.
* @return Returns a reference to this object so that method calls can be chained together.
*/
public ProcessDetails withTerminatedAt(String terminatedAt) {
setTerminatedAt(terminatedAt);
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 (getName() != null)
sb.append("Name: ").append(getName()).append(",");
if (getPath() != null)
sb.append("Path: ").append(getPath()).append(",");
if (getPid() != null)
sb.append("Pid: ").append(getPid()).append(",");
if (getParentPid() != null)
sb.append("ParentPid: ").append(getParentPid()).append(",");
if (getLaunchedAt() != null)
sb.append("LaunchedAt: ").append(getLaunchedAt()).append(",");
if (getTerminatedAt() != null)
sb.append("TerminatedAt: ").append(getTerminatedAt());
sb.append("}");
return sb.toString();
}
@Override
public boolean equals(Object obj) {
if (this == obj)
return true;
if (obj == null)
return false;
if (obj instanceof ProcessDetails == false)
return false;
ProcessDetails other = (ProcessDetails) obj;
if (other.getName() == null ^ this.getName() == null)
return false;
if (other.getName() != null && other.getName().equals(this.getName()) == false)
return false;
if (other.getPath() == null ^ this.getPath() == null)
return false;
if (other.getPath() != null && other.getPath().equals(this.getPath()) == false)
return false;
if (other.getPid() == null ^ this.getPid() == null)
return false;
if (other.getPid() != null && other.getPid().equals(this.getPid()) == false)
return false;
if (other.getParentPid() == null ^ this.getParentPid() == null)
return false;
if (other.getParentPid() != null && other.getParentPid().equals(this.getParentPid()) == false)
return false;
if (other.getLaunchedAt() == null ^ this.getLaunchedAt() == null)
return false;
if (other.getLaunchedAt() != null && other.getLaunchedAt().equals(this.getLaunchedAt()) == false)
return false;
if (other.getTerminatedAt() == null ^ this.getTerminatedAt() == null)
return false;
if (other.getTerminatedAt() != null && other.getTerminatedAt().equals(this.getTerminatedAt()) == false)
return false;
return true;
}
@Override
public int hashCode() {
final int prime = 31;
int hashCode = 1;
hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode());
hashCode = prime * hashCode + ((getPath() == null) ? 0 : getPath().hashCode());
hashCode = prime * hashCode + ((getPid() == null) ? 0 : getPid().hashCode());
hashCode = prime * hashCode + ((getParentPid() == null) ? 0 : getParentPid().hashCode());
hashCode = prime * hashCode + ((getLaunchedAt() == null) ? 0 : getLaunchedAt().hashCode());
hashCode = prime * hashCode + ((getTerminatedAt() == null) ? 0 : getTerminatedAt().hashCode());
return hashCode;
}
@Override
public ProcessDetails clone() {
try {
return (ProcessDetails) 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.ProcessDetailsMarshaller.getInstance().marshall(this, protocolMarshaller);
}
}