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

com.amazonaws.services.securityhub.model.AwsS3BucketWebsiteConfiguration Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.780
Show newest version
/*
 * 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;

/**
 * 

* Website parameters for the S3 bucket. *

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

* The name of the error document for the website. *

*/ private String errorDocument; /** *

* The name of the index document for the website. *

*/ private String indexDocumentSuffix; /** *

* The redirect behavior for requests to the website. *

*/ private AwsS3BucketWebsiteConfigurationRedirectTo redirectAllRequestsTo; /** *

* The rules for applying redirects for requests to the website. *

*/ private java.util.List routingRules; /** *

* The name of the error document for the website. *

* * @param errorDocument * The name of the error document for the website. */ public void setErrorDocument(String errorDocument) { this.errorDocument = errorDocument; } /** *

* The name of the error document for the website. *

* * @return The name of the error document for the website. */ public String getErrorDocument() { return this.errorDocument; } /** *

* The name of the error document for the website. *

* * @param errorDocument * The name of the error document for the website. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketWebsiteConfiguration withErrorDocument(String errorDocument) { setErrorDocument(errorDocument); return this; } /** *

* The name of the index document for the website. *

* * @param indexDocumentSuffix * The name of the index document for the website. */ public void setIndexDocumentSuffix(String indexDocumentSuffix) { this.indexDocumentSuffix = indexDocumentSuffix; } /** *

* The name of the index document for the website. *

* * @return The name of the index document for the website. */ public String getIndexDocumentSuffix() { return this.indexDocumentSuffix; } /** *

* The name of the index document for the website. *

* * @param indexDocumentSuffix * The name of the index document for the website. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketWebsiteConfiguration withIndexDocumentSuffix(String indexDocumentSuffix) { setIndexDocumentSuffix(indexDocumentSuffix); return this; } /** *

* The redirect behavior for requests to the website. *

* * @param redirectAllRequestsTo * The redirect behavior for requests to the website. */ public void setRedirectAllRequestsTo(AwsS3BucketWebsiteConfigurationRedirectTo redirectAllRequestsTo) { this.redirectAllRequestsTo = redirectAllRequestsTo; } /** *

* The redirect behavior for requests to the website. *

* * @return The redirect behavior for requests to the website. */ public AwsS3BucketWebsiteConfigurationRedirectTo getRedirectAllRequestsTo() { return this.redirectAllRequestsTo; } /** *

* The redirect behavior for requests to the website. *

* * @param redirectAllRequestsTo * The redirect behavior for requests to the website. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketWebsiteConfiguration withRedirectAllRequestsTo(AwsS3BucketWebsiteConfigurationRedirectTo redirectAllRequestsTo) { setRedirectAllRequestsTo(redirectAllRequestsTo); return this; } /** *

* The rules for applying redirects for requests to the website. *

* * @return The rules for applying redirects for requests to the website. */ public java.util.List getRoutingRules() { return routingRules; } /** *

* The rules for applying redirects for requests to the website. *

* * @param routingRules * The rules for applying redirects for requests to the website. */ public void setRoutingRules(java.util.Collection routingRules) { if (routingRules == null) { this.routingRules = null; return; } this.routingRules = new java.util.ArrayList(routingRules); } /** *

* The rules for applying redirects for requests to the website. *

*

* NOTE: This method appends the values to the existing list (if any). Use * {@link #setRoutingRules(java.util.Collection)} or {@link #withRoutingRules(java.util.Collection)} if you want to * override the existing values. *

* * @param routingRules * The rules for applying redirects for requests to the website. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketWebsiteConfiguration withRoutingRules(AwsS3BucketWebsiteConfigurationRoutingRule... routingRules) { if (this.routingRules == null) { setRoutingRules(new java.util.ArrayList(routingRules.length)); } for (AwsS3BucketWebsiteConfigurationRoutingRule ele : routingRules) { this.routingRules.add(ele); } return this; } /** *

* The rules for applying redirects for requests to the website. *

* * @param routingRules * The rules for applying redirects for requests to the website. * @return Returns a reference to this object so that method calls can be chained together. */ public AwsS3BucketWebsiteConfiguration withRoutingRules(java.util.Collection routingRules) { setRoutingRules(routingRules); 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 (getErrorDocument() != null) sb.append("ErrorDocument: ").append(getErrorDocument()).append(","); if (getIndexDocumentSuffix() != null) sb.append("IndexDocumentSuffix: ").append(getIndexDocumentSuffix()).append(","); if (getRedirectAllRequestsTo() != null) sb.append("RedirectAllRequestsTo: ").append(getRedirectAllRequestsTo()).append(","); if (getRoutingRules() != null) sb.append("RoutingRules: ").append(getRoutingRules()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof AwsS3BucketWebsiteConfiguration == false) return false; AwsS3BucketWebsiteConfiguration other = (AwsS3BucketWebsiteConfiguration) obj; if (other.getErrorDocument() == null ^ this.getErrorDocument() == null) return false; if (other.getErrorDocument() != null && other.getErrorDocument().equals(this.getErrorDocument()) == false) return false; if (other.getIndexDocumentSuffix() == null ^ this.getIndexDocumentSuffix() == null) return false; if (other.getIndexDocumentSuffix() != null && other.getIndexDocumentSuffix().equals(this.getIndexDocumentSuffix()) == false) return false; if (other.getRedirectAllRequestsTo() == null ^ this.getRedirectAllRequestsTo() == null) return false; if (other.getRedirectAllRequestsTo() != null && other.getRedirectAllRequestsTo().equals(this.getRedirectAllRequestsTo()) == false) return false; if (other.getRoutingRules() == null ^ this.getRoutingRules() == null) return false; if (other.getRoutingRules() != null && other.getRoutingRules().equals(this.getRoutingRules()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getErrorDocument() == null) ? 0 : getErrorDocument().hashCode()); hashCode = prime * hashCode + ((getIndexDocumentSuffix() == null) ? 0 : getIndexDocumentSuffix().hashCode()); hashCode = prime * hashCode + ((getRedirectAllRequestsTo() == null) ? 0 : getRedirectAllRequestsTo().hashCode()); hashCode = prime * hashCode + ((getRoutingRules() == null) ? 0 : getRoutingRules().hashCode()); return hashCode; } @Override public AwsS3BucketWebsiteConfiguration clone() { try { return (AwsS3BucketWebsiteConfiguration) 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.AwsS3BucketWebsiteConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy