All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.amazonaws.services.fms.model.ComplianceViolator Maven / Gradle / Ivy

Go to download

The AWS Java SDK for Firewall Management module holds the client classes that are used for communicating with Firewall Management Service

There is a newer version: 1.12.780
Show newest version
/*
 * Copyright 2019-2024 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.fms.model;

import java.io.Serializable;
import javax.annotation.Generated;
import com.amazonaws.protocol.StructuredPojo;
import com.amazonaws.protocol.ProtocolMarshaller;

/**
 * 

* Details of the resource that is not protected by the policy. *

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

* The resource ID. *

*/ private String resourceId; /** *

* The reason that the resource is not protected by the policy. *

*/ private String violationReason; /** *

* The resource type. This is in the format shown in the Amazon * Web Services Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, * AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy. *

*/ private String resourceType; /** *

* Metadata about the resource that doesn't comply with the policy scope. *

*/ private java.util.Map metadata; /** *

* The resource ID. *

* * @param resourceId * The resource ID. */ public void setResourceId(String resourceId) { this.resourceId = resourceId; } /** *

* The resource ID. *

* * @return The resource ID. */ public String getResourceId() { return this.resourceId; } /** *

* The resource ID. *

* * @param resourceId * The resource ID. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceViolator withResourceId(String resourceId) { setResourceId(resourceId); return this; } /** *

* The reason that the resource is not protected by the policy. *

* * @param violationReason * The reason that the resource is not protected by the policy. * @see ViolationReason */ public void setViolationReason(String violationReason) { this.violationReason = violationReason; } /** *

* The reason that the resource is not protected by the policy. *

* * @return The reason that the resource is not protected by the policy. * @see ViolationReason */ public String getViolationReason() { return this.violationReason; } /** *

* The reason that the resource is not protected by the policy. *

* * @param violationReason * The reason that the resource is not protected by the policy. * @return Returns a reference to this object so that method calls can be chained together. * @see ViolationReason */ public ComplianceViolator withViolationReason(String violationReason) { setViolationReason(violationReason); return this; } /** *

* The reason that the resource is not protected by the policy. *

* * @param violationReason * The reason that the resource is not protected by the policy. * @return Returns a reference to this object so that method calls can be chained together. * @see ViolationReason */ public ComplianceViolator withViolationReason(ViolationReason violationReason) { this.violationReason = violationReason.toString(); return this; } /** *

* The resource type. This is in the format shown in the Amazon * Web Services Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, * AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy. *

* * @param resourceType * The resource type. This is in the format shown in the Amazon Web Services Resource Types Reference. For example: * AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::CloudFront::Distribution, or * AWS::NetworkFirewall::FirewallPolicy. */ public void setResourceType(String resourceType) { this.resourceType = resourceType; } /** *

* The resource type. This is in the format shown in the Amazon * Web Services Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, * AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy. *

* * @return The resource type. This is in the format shown in the Amazon Web Services Resource Types Reference. For example: * AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::CloudFront::Distribution, or * AWS::NetworkFirewall::FirewallPolicy. */ public String getResourceType() { return this.resourceType; } /** *

* The resource type. This is in the format shown in the Amazon * Web Services Resource Types Reference. For example: AWS::ElasticLoadBalancingV2::LoadBalancer, * AWS::CloudFront::Distribution, or AWS::NetworkFirewall::FirewallPolicy. *

* * @param resourceType * The resource type. This is in the format shown in the Amazon Web Services Resource Types Reference. For example: * AWS::ElasticLoadBalancingV2::LoadBalancer, AWS::CloudFront::Distribution, or * AWS::NetworkFirewall::FirewallPolicy. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceViolator withResourceType(String resourceType) { setResourceType(resourceType); return this; } /** *

* Metadata about the resource that doesn't comply with the policy scope. *

* * @return Metadata about the resource that doesn't comply with the policy scope. */ public java.util.Map getMetadata() { return metadata; } /** *

* Metadata about the resource that doesn't comply with the policy scope. *

* * @param metadata * Metadata about the resource that doesn't comply with the policy scope. */ public void setMetadata(java.util.Map metadata) { this.metadata = metadata; } /** *

* Metadata about the resource that doesn't comply with the policy scope. *

* * @param metadata * Metadata about the resource that doesn't comply with the policy scope. * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceViolator withMetadata(java.util.Map metadata) { setMetadata(metadata); return this; } /** * Add a single Metadata entry * * @see ComplianceViolator#withMetadata * @returns a reference to this object so that method calls can be chained together. */ public ComplianceViolator addMetadataEntry(String key, String value) { if (null == this.metadata) { this.metadata = new java.util.HashMap(); } if (this.metadata.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.metadata.put(key, value); return this; } /** * Removes all the entries added into Metadata. * * @return Returns a reference to this object so that method calls can be chained together. */ public ComplianceViolator clearMetadataEntries() { this.metadata = null; 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 (getResourceId() != null) sb.append("ResourceId: ").append(getResourceId()).append(","); if (getViolationReason() != null) sb.append("ViolationReason: ").append(getViolationReason()).append(","); if (getResourceType() != null) sb.append("ResourceType: ").append(getResourceType()).append(","); if (getMetadata() != null) sb.append("Metadata: ").append(getMetadata()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof ComplianceViolator == false) return false; ComplianceViolator other = (ComplianceViolator) obj; if (other.getResourceId() == null ^ this.getResourceId() == null) return false; if (other.getResourceId() != null && other.getResourceId().equals(this.getResourceId()) == false) return false; if (other.getViolationReason() == null ^ this.getViolationReason() == null) return false; if (other.getViolationReason() != null && other.getViolationReason().equals(this.getViolationReason()) == false) return false; if (other.getResourceType() == null ^ this.getResourceType() == null) return false; if (other.getResourceType() != null && other.getResourceType().equals(this.getResourceType()) == false) return false; if (other.getMetadata() == null ^ this.getMetadata() == null) return false; if (other.getMetadata() != null && other.getMetadata().equals(this.getMetadata()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getResourceId() == null) ? 0 : getResourceId().hashCode()); hashCode = prime * hashCode + ((getViolationReason() == null) ? 0 : getViolationReason().hashCode()); hashCode = prime * hashCode + ((getResourceType() == null) ? 0 : getResourceType().hashCode()); hashCode = prime * hashCode + ((getMetadata() == null) ? 0 : getMetadata().hashCode()); return hashCode; } @Override public ComplianceViolator clone() { try { return (ComplianceViolator) 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.fms.model.transform.ComplianceViolatorMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy