@Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode()); hashCode = prime * hashCode + ((getService() == null) ? 0 : getService().hashCode()); hashCode = prime * hashCode + ((getServiceAttributes() == null) ? 0 : getServiceAttributes().hashCode()); hashCode = prime * hashCode + ((getAssetType() == null) ? 0 : getAssetType().hashCode()); hashCode = prime * hashCode + ((getAssetAttributes() == null) ? 0 : getAssetAttributes().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRecommendation() == null) ? 0 : getRecommendation().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getNumericSeverity() == null) ? 0 : getNumericSeverity().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getIndicatorOfCompromise() == null) ? 0 : getIndicatorOfCompromise().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getUserAttributes() == null) ? 0 : getUserAttributes().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; }
public Finding unmarshall(JsonUnmarshallerContext context) throws Exception { Finding finding = new Finding(); if (context.testExpression("arn", targetDepth)) { context.nextToken(); finding.setArn(context.getUnmarshaller(String.class).unmarshall(context)); finding.setSchemaVersion(context.getUnmarshaller(Integer.class).unmarshall(context)); finding.setService(context.getUnmarshaller(String.class).unmarshall(context)); finding.setServiceAttributes(InspectorServiceAttributesJsonUnmarshaller.getInstance().unmarshall(context)); finding.setAssetType(context.getUnmarshaller(String.class).unmarshall(context)); finding.setAssetAttributes(AssetAttributesJsonUnmarshaller.getInstance().unmarshall(context)); finding.setId(context.getUnmarshaller(String.class).unmarshall(context)); finding.setTitle(context.getUnmarshaller(String.class).unmarshall(context)); finding.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); finding.setRecommendation(context.getUnmarshaller(String.class).unmarshall(context)); finding.setSeverity(context.getUnmarshaller(String.class).unmarshall(context)); finding.setNumericSeverity(context.getUnmarshaller(Double.class).unmarshall(context)); finding.setConfidence(context.getUnmarshaller(Integer.class).unmarshall(context));
public Finding unmarshall(JsonUnmarshallerContext context) throws Exception { Finding finding = new Finding(); if (context.testExpression("arn", targetDepth)) { context.nextToken(); finding.setArn(context.getUnmarshaller(String.class).unmarshall(context)); finding.setSchemaVersion(context.getUnmarshaller(Integer.class).unmarshall(context)); finding.setService(context.getUnmarshaller(String.class).unmarshall(context)); finding.setServiceAttributes(InspectorServiceAttributesJsonUnmarshaller.getInstance().unmarshall(context)); finding.setAssetType(context.getUnmarshaller(String.class).unmarshall(context)); finding.setAssetAttributes(AssetAttributesJsonUnmarshaller.getInstance().unmarshall(context)); finding.setId(context.getUnmarshaller(String.class).unmarshall(context)); finding.setTitle(context.getUnmarshaller(String.class).unmarshall(context)); finding.setDescription(context.getUnmarshaller(String.class).unmarshall(context)); finding.setRecommendation(context.getUnmarshaller(String.class).unmarshall(context)); finding.setSeverity(context.getUnmarshaller(String.class).unmarshall(context)); finding.setNumericSeverity(context.getUnmarshaller(Double.class).unmarshall(context)); finding.setConfidence(context.getUnmarshaller(Integer.class).unmarshall(context));
return false; Finding other = (Finding) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getSchemaVersion() == null ^ this.getSchemaVersion() == null) return false; if (other.getSchemaVersion() != null && other.getSchemaVersion().equals(this.getSchemaVersion()) == false) return false; if (other.getService() == null ^ this.getService() == null) return false; if (other.getService() != null && other.getService().equals(this.getService()) == false) return false; if (other.getServiceAttributes() == null ^ this.getServiceAttributes() == null) return false; if (other.getServiceAttributes() != null && other.getServiceAttributes().equals(this.getServiceAttributes()) == false) return false; if (other.getAssetType() == null ^ this.getAssetType() == null) return false; if (other.getAssetType() != null && other.getAssetType().equals(this.getAssetType()) == false) return false; if (other.getAssetAttributes() == null ^ this.getAssetAttributes() == null) return false; if (other.getAssetAttributes() != null && other.getAssetAttributes().equals(this.getAssetAttributes()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getSchemaVersion() != null) sb.append("SchemaVersion: ").append(getSchemaVersion()).append(","); if (getService() != null) sb.append("Service: ").append(getService()).append(","); if (getServiceAttributes() != null) sb.append("ServiceAttributes: ").append(getServiceAttributes()).append(","); if (getAssetType() != null) sb.append("AssetType: ").append(getAssetType()).append(","); if (getAssetAttributes() != null) sb.append("AssetAttributes: ").append(getAssetAttributes()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRecommendation() != null) sb.append("Recommendation: ").append(getRecommendation()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getNumericSeverity() != null) sb.append("NumericSeverity: ").append(getNumericSeverity()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getIndicatorOfCompromise() != null)
/** * Marshall the given parameter object. */ public void marshall(Finding finding, ProtocolMarshaller protocolMarshaller) { if (finding == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(finding.getArn(), ARN_BINDING); protocolMarshaller.marshall(finding.getSchemaVersion(), SCHEMAVERSION_BINDING); protocolMarshaller.marshall(finding.getService(), SERVICE_BINDING); protocolMarshaller.marshall(finding.getServiceAttributes(), SERVICEATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getAssetType(), ASSETTYPE_BINDING); protocolMarshaller.marshall(finding.getAssetAttributes(), ASSETATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getId(), ID_BINDING); protocolMarshaller.marshall(finding.getTitle(), TITLE_BINDING); protocolMarshaller.marshall(finding.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(finding.getRecommendation(), RECOMMENDATION_BINDING); protocolMarshaller.marshall(finding.getSeverity(), SEVERITY_BINDING); protocolMarshaller.marshall(finding.getNumericSeverity(), NUMERICSEVERITY_BINDING); protocolMarshaller.marshall(finding.getConfidence(), CONFIDENCE_BINDING); protocolMarshaller.marshall(finding.getIndicatorOfCompromise(), INDICATOROFCOMPROMISE_BINDING); protocolMarshaller.marshall(finding.getAttributes(), ATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getUserAttributes(), USERATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(finding.getUpdatedAt(), UPDATEDAT_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 + ((getArn() == null) ? 0 : getArn().hashCode()); hashCode = prime * hashCode + ((getSchemaVersion() == null) ? 0 : getSchemaVersion().hashCode()); hashCode = prime * hashCode + ((getService() == null) ? 0 : getService().hashCode()); hashCode = prime * hashCode + ((getServiceAttributes() == null) ? 0 : getServiceAttributes().hashCode()); hashCode = prime * hashCode + ((getAssetType() == null) ? 0 : getAssetType().hashCode()); hashCode = prime * hashCode + ((getAssetAttributes() == null) ? 0 : getAssetAttributes().hashCode()); hashCode = prime * hashCode + ((getId() == null) ? 0 : getId().hashCode()); hashCode = prime * hashCode + ((getTitle() == null) ? 0 : getTitle().hashCode()); hashCode = prime * hashCode + ((getDescription() == null) ? 0 : getDescription().hashCode()); hashCode = prime * hashCode + ((getRecommendation() == null) ? 0 : getRecommendation().hashCode()); hashCode = prime * hashCode + ((getSeverity() == null) ? 0 : getSeverity().hashCode()); hashCode = prime * hashCode + ((getNumericSeverity() == null) ? 0 : getNumericSeverity().hashCode()); hashCode = prime * hashCode + ((getConfidence() == null) ? 0 : getConfidence().hashCode()); hashCode = prime * hashCode + ((getIndicatorOfCompromise() == null) ? 0 : getIndicatorOfCompromise().hashCode()); hashCode = prime * hashCode + ((getAttributes() == null) ? 0 : getAttributes().hashCode()); hashCode = prime * hashCode + ((getUserAttributes() == null) ? 0 : getUserAttributes().hashCode()); hashCode = prime * hashCode + ((getCreatedAt() == null) ? 0 : getCreatedAt().hashCode()); hashCode = prime * hashCode + ((getUpdatedAt() == null) ? 0 : getUpdatedAt().hashCode()); return hashCode; }
return false; Finding other = (Finding) obj; if (other.getArn() == null ^ this.getArn() == null) return false; if (other.getArn() != null && other.getArn().equals(this.getArn()) == false) return false; if (other.getSchemaVersion() == null ^ this.getSchemaVersion() == null) return false; if (other.getSchemaVersion() != null && other.getSchemaVersion().equals(this.getSchemaVersion()) == false) return false; if (other.getService() == null ^ this.getService() == null) return false; if (other.getService() != null && other.getService().equals(this.getService()) == false) return false; if (other.getServiceAttributes() == null ^ this.getServiceAttributes() == null) return false; if (other.getServiceAttributes() != null && other.getServiceAttributes().equals(this.getServiceAttributes()) == false) return false; if (other.getAssetType() == null ^ this.getAssetType() == null) return false; if (other.getAssetType() != null && other.getAssetType().equals(this.getAssetType()) == false) return false; if (other.getAssetAttributes() == null ^ this.getAssetAttributes() == null) return false; if (other.getAssetAttributes() != null && other.getAssetAttributes().equals(this.getAssetAttributes()) == false) return false; if (other.getId() == null ^ this.getId() == null) return false; if (other.getId() != null && other.getId().equals(this.getId()) == false)
StringBuilder sb = new StringBuilder(); sb.append("{"); if (getArn() != null) sb.append("Arn: ").append(getArn()).append(","); if (getSchemaVersion() != null) sb.append("SchemaVersion: ").append(getSchemaVersion()).append(","); if (getService() != null) sb.append("Service: ").append(getService()).append(","); if (getServiceAttributes() != null) sb.append("ServiceAttributes: ").append(getServiceAttributes()).append(","); if (getAssetType() != null) sb.append("AssetType: ").append(getAssetType()).append(","); if (getAssetAttributes() != null) sb.append("AssetAttributes: ").append(getAssetAttributes()).append(","); if (getId() != null) sb.append("Id: ").append(getId()).append(","); if (getTitle() != null) sb.append("Title: ").append(getTitle()).append(","); if (getDescription() != null) sb.append("Description: ").append(getDescription()).append(","); if (getRecommendation() != null) sb.append("Recommendation: ").append(getRecommendation()).append(","); if (getSeverity() != null) sb.append("Severity: ").append(getSeverity()).append(","); if (getNumericSeverity() != null) sb.append("NumericSeverity: ").append(getNumericSeverity()).append(","); if (getConfidence() != null) sb.append("Confidence: ").append(getConfidence()).append(","); if (getIndicatorOfCompromise() != null)
/** * Marshall the given parameter object. */ public void marshall(Finding finding, ProtocolMarshaller protocolMarshaller) { if (finding == null) { throw new SdkClientException("Invalid argument passed to marshall(...)"); } try { protocolMarshaller.marshall(finding.getArn(), ARN_BINDING); protocolMarshaller.marshall(finding.getSchemaVersion(), SCHEMAVERSION_BINDING); protocolMarshaller.marshall(finding.getService(), SERVICE_BINDING); protocolMarshaller.marshall(finding.getServiceAttributes(), SERVICEATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getAssetType(), ASSETTYPE_BINDING); protocolMarshaller.marshall(finding.getAssetAttributes(), ASSETATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getId(), ID_BINDING); protocolMarshaller.marshall(finding.getTitle(), TITLE_BINDING); protocolMarshaller.marshall(finding.getDescription(), DESCRIPTION_BINDING); protocolMarshaller.marshall(finding.getRecommendation(), RECOMMENDATION_BINDING); protocolMarshaller.marshall(finding.getSeverity(), SEVERITY_BINDING); protocolMarshaller.marshall(finding.getNumericSeverity(), NUMERICSEVERITY_BINDING); protocolMarshaller.marshall(finding.getConfidence(), CONFIDENCE_BINDING); protocolMarshaller.marshall(finding.getIndicatorOfCompromise(), INDICATOROFCOMPROMISE_BINDING); protocolMarshaller.marshall(finding.getAttributes(), ATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getUserAttributes(), USERATTRIBUTES_BINDING); protocolMarshaller.marshall(finding.getCreatedAt(), CREATEDAT_BINDING); protocolMarshaller.marshall(finding.getUpdatedAt(), UPDATEDAT_BINDING); } catch (Exception e) { throw new SdkClientException("Unable to marshall request to JSON: " + e.getMessage(), e); } }