/* * 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.kendra.model; import java.io.Serializable; import javax.annotation.Generated; import com.amazonaws.protocol.StructuredPojo; import com.amazonaws.protocol.ProtocolMarshaller; /** *

* Provides the configuration information for the sitemap URLs to crawl. *

*

* When selecting websites to index, you must adhere to the Amazon Acceptable * Use Policy and all other Amazon terms. Remember that you must only use Amazon Kendra Web Crawler to index your * own web pages, or web pages that you have authorization to index. *

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

* The list of sitemap URLs of the websites you want to crawl. *

*

* The list can include a maximum of three sitemap URLs. *

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

* The list of sitemap URLs of the websites you want to crawl. *

*

* The list can include a maximum of three sitemap URLs. *

* * @return The list of sitemap URLs of the websites you want to crawl.

*

* The list can include a maximum of three sitemap URLs. */ public java.util.List getSiteMaps() { return siteMaps; } /** *

* The list of sitemap URLs of the websites you want to crawl. *

*

* The list can include a maximum of three sitemap URLs. *

* * @param siteMaps * The list of sitemap URLs of the websites you want to crawl.

*

* The list can include a maximum of three sitemap URLs. */ public void setSiteMaps(java.util.Collection siteMaps) { if (siteMaps == null) { this.siteMaps = null; return; } this.siteMaps = new java.util.ArrayList(siteMaps); } /** *

* The list of sitemap URLs of the websites you want to crawl. *

*

* The list can include a maximum of three sitemap URLs. *

*

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

* * @param siteMaps * The list of sitemap URLs of the websites you want to crawl.

*

* The list can include a maximum of three sitemap URLs. * @return Returns a reference to this object so that method calls can be chained together. */ public SiteMapsConfiguration withSiteMaps(String... siteMaps) { if (this.siteMaps == null) { setSiteMaps(new java.util.ArrayList(siteMaps.length)); } for (String ele : siteMaps) { this.siteMaps.add(ele); } return this; } /** *

* The list of sitemap URLs of the websites you want to crawl. *

*

* The list can include a maximum of three sitemap URLs. *

* * @param siteMaps * The list of sitemap URLs of the websites you want to crawl.

*

* The list can include a maximum of three sitemap URLs. * @return Returns a reference to this object so that method calls can be chained together. */ public SiteMapsConfiguration withSiteMaps(java.util.Collection siteMaps) { setSiteMaps(siteMaps); 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 (getSiteMaps() != null) sb.append("SiteMaps: ").append(getSiteMaps()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof SiteMapsConfiguration == false) return false; SiteMapsConfiguration other = (SiteMapsConfiguration) obj; if (other.getSiteMaps() == null ^ this.getSiteMaps() == null) return false; if (other.getSiteMaps() != null && other.getSiteMaps().equals(this.getSiteMaps()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getSiteMaps() == null) ? 0 : getSiteMaps().hashCode()); return hashCode; } @Override public SiteMapsConfiguration clone() { try { return (SiteMapsConfiguration) 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.kendra.model.transform.SiteMapsConfigurationMarshaller.getInstance().marshall(this, protocolMarshaller); } }