@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHostname() == null) ? 0 : getHostname().hashCode()); hashCode = prime * hashCode + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); hashCode = prime * hashCode + ((getAutoScalingGroup() == null) ? 0 : getAutoScalingGroup().hashCode()); hashCode = prime * hashCode + ((getAgentHealth() == null) ? 0 : getAgentHealth().hashCode()); hashCode = prime * hashCode + ((getAgentVersion() == null) ? 0 : getAgentVersion().hashCode()); hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getKernelVersion() == null) ? 0 : getKernelVersion().hashCode()); hashCode = prime * hashCode + ((getIpv4Address() == null) ? 0 : getIpv4Address().hashCode()); return hashCode; }
/** * <p> * The health status of the Amazon Inspector Agent. * </p> * * @param agentHealth * The health status of the Amazon Inspector Agent. * @return Returns a reference to this object so that method calls can be chained together. * @see AgentHealth */ public AgentPreview withAgentHealth(String agentHealth) { setAgentHealth(agentHealth); return this; }
public AgentPreview unmarshall(JsonUnmarshallerContext context) throws Exception { AgentPreview agentPreview = new AgentPreview(); if (context.testExpression("hostname", targetDepth)) { context.nextToken(); agentPreview.setHostname(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentId(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAutoScalingGroup(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentHealth(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentVersion(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setOperatingSystem(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setKernelVersion(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setIpv4Address(context.getUnmarshaller(String.class).unmarshall(context));
public AgentPreview unmarshall(JsonUnmarshallerContext context) throws Exception { AgentPreview agentPreview = new AgentPreview(); if (context.testExpression("hostname", targetDepth)) { context.nextToken(); agentPreview.setHostname(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentId(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAutoScalingGroup(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentHealth(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setAgentVersion(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setOperatingSystem(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setKernelVersion(context.getUnmarshaller(String.class).unmarshall(context)); agentPreview.setIpv4Address(context.getUnmarshaller(String.class).unmarshall(context));
return false; AgentPreview other = (AgentPreview) obj; if (other.getHostname() == null ^ this.getHostname() == null) return false; if (other.getHostname() != null && other.getHostname().equals(this.getHostname()) == false) return false; if (other.getAgentId() == null ^ this.getAgentId() == null) return false; if (other.getAgentId() != null && other.getAgentId().equals(this.getAgentId()) == false) return false; if (other.getAutoScalingGroup() == null ^ this.getAutoScalingGroup() == null) return false; if (other.getAutoScalingGroup() != null && other.getAutoScalingGroup().equals(this.getAutoScalingGroup()) == false) return false; if (other.getAgentHealth() == null ^ this.getAgentHealth() == null) return false; if (other.getAgentHealth() != null && other.getAgentHealth().equals(this.getAgentHealth()) == false) return false; if (other.getAgentVersion() == null ^ this.getAgentVersion() == null) return false; if (other.getAgentVersion() != null && other.getAgentVersion().equals(this.getAgentVersion()) == false) return false; if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null) return false; if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false) return false; if (other.getKernelVersion() == null ^ this.getKernelVersion() == null) return false; if (other.getKernelVersion() != null && other.getKernelVersion().equals(this.getKernelVersion()) == false)
/** * <p> * The health status of the Amazon Inspector Agent. * </p> * * @param agentHealth * The health status of the Amazon Inspector Agent. * @return Returns a reference to this object so that method calls can be chained together. * @see AgentHealth */ public AgentPreview withAgentHealth(String agentHealth) { setAgentHealth(agentHealth); return this; }
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHostname() != null) sb.append("Hostname: ").append(getHostname()).append(","); if (getAgentId() != null) sb.append("AgentId: ").append(getAgentId()).append(","); if (getAutoScalingGroup() != null) sb.append("AutoScalingGroup: ").append(getAutoScalingGroup()).append(","); if (getAgentHealth() != null) sb.append("AgentHealth: ").append(getAgentHealth()).append(","); if (getAgentVersion() != null) sb.append("AgentVersion: ").append(getAgentVersion()).append(","); if (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getKernelVersion() != null) sb.append("KernelVersion: ").append(getKernelVersion()).append(","); if (getIpv4Address() != null) sb.append("Ipv4Address: ").append(getIpv4Address()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(AgentPreview agentPreview, ProtocolMarshaller protocolMarshaller) { if (agentPreview == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(agentPreview.getHostname(), HOSTNAME_BINDING); protocolMarshaller.marshall(agentPreview.getAgentId(), AGENTID_BINDING); protocolMarshaller.marshall(agentPreview.getAutoScalingGroup(), AUTOSCALINGGROUP_BINDING); protocolMarshaller.marshall(agentPreview.getAgentHealth(), AGENTHEALTH_BINDING); protocolMarshaller.marshall(agentPreview.getAgentVersion(), AGENTVERSION_BINDING); protocolMarshaller.marshall(agentPreview.getOperatingSystem(), OPERATINGSYSTEM_BINDING); protocolMarshaller.marshall(agentPreview.getKernelVersion(), KERNELVERSION_BINDING); protocolMarshaller.marshall(agentPreview.getIpv4Address(), IPV4ADDRESS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }
@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getHostname() == null) ? 0 : getHostname().hashCode()); hashCode = prime * hashCode + ((getAgentId() == null) ? 0 : getAgentId().hashCode()); hashCode = prime * hashCode + ((getAutoScalingGroup() == null) ? 0 : getAutoScalingGroup().hashCode()); hashCode = prime * hashCode + ((getAgentHealth() == null) ? 0 : getAgentHealth().hashCode()); hashCode = prime * hashCode + ((getAgentVersion() == null) ? 0 : getAgentVersion().hashCode()); hashCode = prime * hashCode + ((getOperatingSystem() == null) ? 0 : getOperatingSystem().hashCode()); hashCode = prime * hashCode + ((getKernelVersion() == null) ? 0 : getKernelVersion().hashCode()); hashCode = prime * hashCode + ((getIpv4Address() == null) ? 0 : getIpv4Address().hashCode()); return hashCode; }
return false; AgentPreview other = (AgentPreview) obj; if (other.getHostname() == null ^ this.getHostname() == null) return false; if (other.getHostname() != null && other.getHostname().equals(this.getHostname()) == false) return false; if (other.getAgentId() == null ^ this.getAgentId() == null) return false; if (other.getAgentId() != null && other.getAgentId().equals(this.getAgentId()) == false) return false; if (other.getAutoScalingGroup() == null ^ this.getAutoScalingGroup() == null) return false; if (other.getAutoScalingGroup() != null && other.getAutoScalingGroup().equals(this.getAutoScalingGroup()) == false) return false; if (other.getAgentHealth() == null ^ this.getAgentHealth() == null) return false; if (other.getAgentHealth() != null && other.getAgentHealth().equals(this.getAgentHealth()) == false) return false; if (other.getAgentVersion() == null ^ this.getAgentVersion() == null) return false; if (other.getAgentVersion() != null && other.getAgentVersion().equals(this.getAgentVersion()) == false) return false; if (other.getOperatingSystem() == null ^ this.getOperatingSystem() == null) return false; if (other.getOperatingSystem() != null && other.getOperatingSystem().equals(this.getOperatingSystem()) == false) return false; if (other.getKernelVersion() == null ^ this.getKernelVersion() == null) return false; if (other.getKernelVersion() != null && other.getKernelVersion().equals(this.getKernelVersion()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getHostname() != null) sb.append("Hostname: ").append(getHostname()).append(","); if (getAgentId() != null) sb.append("AgentId: ").append(getAgentId()).append(","); if (getAutoScalingGroup() != null) sb.append("AutoScalingGroup: ").append(getAutoScalingGroup()).append(","); if (getAgentHealth() != null) sb.append("AgentHealth: ").append(getAgentHealth()).append(","); if (getAgentVersion() != null) sb.append("AgentVersion: ").append(getAgentVersion()).append(","); if (getOperatingSystem() != null) sb.append("OperatingSystem: ").append(getOperatingSystem()).append(","); if (getKernelVersion() != null) sb.append("KernelVersion: ").append(getKernelVersion()).append(","); if (getIpv4Address() != null) sb.append("Ipv4Address: ").append(getIpv4Address()); sb.append("}"); return sb.toString();
/** * Marshall the given parameter object. */ public void marshall(AgentPreview agentPreview, ProtocolMarshaller protocolMarshaller) { if (agentPreview == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(agentPreview.getHostname(), HOSTNAME_BINDING); protocolMarshaller.marshall(agentPreview.getAgentId(), AGENTID_BINDING); protocolMarshaller.marshall(agentPreview.getAutoScalingGroup(), AUTOSCALINGGROUP_BINDING); protocolMarshaller.marshall(agentPreview.getAgentHealth(), AGENTHEALTH_BINDING); protocolMarshaller.marshall(agentPreview.getAgentVersion(), AGENTVERSION_BINDING); protocolMarshaller.marshall(agentPreview.getOperatingSystem(), OPERATINGSYSTEM_BINDING); protocolMarshaller.marshall(agentPreview.getKernelVersion(), KERNELVERSION_BINDING); protocolMarshaller.marshall(agentPreview.getIpv4Address(), IPV4ADDRESS_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }