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

com.amazonaws.services.guardduty.model.CreateIPSetRequest Maven / Gradle / Ivy

Go to download

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

There is a newer version: 1.12.772
Show newest version
/*
 * Copyright 2015-2020 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.guardduty.model;

import java.io.Serializable;
import javax.annotation.Generated;

import com.amazonaws.AmazonWebServiceRequest;

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

    /**
     * 

* The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. *

*/ private String detectorId; /** *

* The user-friendly name to identify the IPSet. *

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). *

*/ private String name; /** *

* The format of the file that contains the IPSet. *

*/ private String format; /** *

* The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. *

*/ private String location; /** *

* A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. *

*/ private Boolean activate; /** *

* The idempotency token for the create request. *

*/ private String clientToken; /** *

* The tags to be added to a new IP set resource. *

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

* The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. *

* * @param detectorId * The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. */ public void setDetectorId(String detectorId) { this.detectorId = detectorId; } /** *

* The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. *

* * @return The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. */ public String getDetectorId() { return this.detectorId; } /** *

* The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. *

* * @param detectorId * The unique ID of the detector of the GuardDuty account that you want to create an IPSet for. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withDetectorId(String detectorId) { setDetectorId(detectorId); return this; } /** *

* The user-friendly name to identify the IPSet. *

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). *

* * @param name * The user-friendly name to identify the IPSet.

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). */ public void setName(String name) { this.name = name; } /** *

* The user-friendly name to identify the IPSet. *

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). *

* * @return The user-friendly name to identify the IPSet.

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). */ public String getName() { return this.name; } /** *

* The user-friendly name to identify the IPSet. *

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). *

* * @param name * The user-friendly name to identify the IPSet.

*

* Allowed characters are alphanumerics, spaces, hyphens (-), and underscores (_). * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withName(String name) { setName(name); return this; } /** *

* The format of the file that contains the IPSet. *

* * @param format * The format of the file that contains the IPSet. * @see IpSetFormat */ public void setFormat(String format) { this.format = format; } /** *

* The format of the file that contains the IPSet. *

* * @return The format of the file that contains the IPSet. * @see IpSetFormat */ public String getFormat() { return this.format; } /** *

* The format of the file that contains the IPSet. *

* * @param format * The format of the file that contains the IPSet. * @return Returns a reference to this object so that method calls can be chained together. * @see IpSetFormat */ public CreateIPSetRequest withFormat(String format) { setFormat(format); return this; } /** *

* The format of the file that contains the IPSet. *

* * @param format * The format of the file that contains the IPSet. * @return Returns a reference to this object so that method calls can be chained together. * @see IpSetFormat */ public CreateIPSetRequest withFormat(IpSetFormat format) { this.format = format.toString(); return this; } /** *

* The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. *

* * @param location * The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. */ public void setLocation(String location) { this.location = location; } /** *

* The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. *

* * @return The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. */ public String getLocation() { return this.location; } /** *

* The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. *

* * @param location * The URI of the file that contains the IPSet. For example: * https://s3.us-west-2.amazonaws.com/my-bucket/my-object-key. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withLocation(String location) { setLocation(location); return this; } /** *

* A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. *

* * @param activate * A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. */ public void setActivate(Boolean activate) { this.activate = activate; } /** *

* A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. *

* * @return A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. */ public Boolean getActivate() { return this.activate; } /** *

* A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. *

* * @param activate * A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withActivate(Boolean activate) { setActivate(activate); return this; } /** *

* A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. *

* * @return A Boolean value that indicates whether GuardDuty is to start using the uploaded IPSet. */ public Boolean isActivate() { return this.activate; } /** *

* The idempotency token for the create request. *

* * @param clientToken * The idempotency token for the create request. */ public void setClientToken(String clientToken) { this.clientToken = clientToken; } /** *

* The idempotency token for the create request. *

* * @return The idempotency token for the create request. */ public String getClientToken() { return this.clientToken; } /** *

* The idempotency token for the create request. *

* * @param clientToken * The idempotency token for the create request. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withClientToken(String clientToken) { setClientToken(clientToken); return this; } /** *

* The tags to be added to a new IP set resource. *

* * @return The tags to be added to a new IP set resource. */ public java.util.Map getTags() { return tags; } /** *

* The tags to be added to a new IP set resource. *

* * @param tags * The tags to be added to a new IP set resource. */ public void setTags(java.util.Map tags) { this.tags = tags; } /** *

* The tags to be added to a new IP set resource. *

* * @param tags * The tags to be added to a new IP set resource. * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest withTags(java.util.Map tags) { setTags(tags); return this; } /** * Add a single Tags entry * * @see CreateIPSetRequest#withTags * @returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest addTagsEntry(String key, String value) { if (null == this.tags) { this.tags = new java.util.HashMap(); } if (this.tags.containsKey(key)) throw new IllegalArgumentException("Duplicated keys (" + key.toString() + ") are provided."); this.tags.put(key, value); return this; } /** * Removes all the entries added into Tags. * * @return Returns a reference to this object so that method calls can be chained together. */ public CreateIPSetRequest clearTagsEntries() { this.tags = 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 (getDetectorId() != null) sb.append("DetectorId: ").append(getDetectorId()).append(","); if (getName() != null) sb.append("Name: ").append(getName()).append(","); if (getFormat() != null) sb.append("Format: ").append(getFormat()).append(","); if (getLocation() != null) sb.append("Location: ").append(getLocation()).append(","); if (getActivate() != null) sb.append("Activate: ").append(getActivate()).append(","); if (getClientToken() != null) sb.append("ClientToken: ").append(getClientToken()).append(","); if (getTags() != null) sb.append("Tags: ").append(getTags()); sb.append("}"); return sb.toString(); } @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (obj instanceof CreateIPSetRequest == false) return false; CreateIPSetRequest other = (CreateIPSetRequest) obj; if (other.getDetectorId() == null ^ this.getDetectorId() == null) return false; if (other.getDetectorId() != null && other.getDetectorId().equals(this.getDetectorId()) == false) return false; if (other.getName() == null ^ this.getName() == null) return false; if (other.getName() != null && other.getName().equals(this.getName()) == false) return false; if (other.getFormat() == null ^ this.getFormat() == null) return false; if (other.getFormat() != null && other.getFormat().equals(this.getFormat()) == false) return false; if (other.getLocation() == null ^ this.getLocation() == null) return false; if (other.getLocation() != null && other.getLocation().equals(this.getLocation()) == false) return false; if (other.getActivate() == null ^ this.getActivate() == null) return false; if (other.getActivate() != null && other.getActivate().equals(this.getActivate()) == false) return false; if (other.getClientToken() == null ^ this.getClientToken() == null) return false; if (other.getClientToken() != null && other.getClientToken().equals(this.getClientToken()) == false) return false; if (other.getTags() == null ^ this.getTags() == null) return false; if (other.getTags() != null && other.getTags().equals(this.getTags()) == false) return false; return true; } @Override public int hashCode() { final int prime = 31; int hashCode = 1; hashCode = prime * hashCode + ((getDetectorId() == null) ? 0 : getDetectorId().hashCode()); hashCode = prime * hashCode + ((getName() == null) ? 0 : getName().hashCode()); hashCode = prime * hashCode + ((getFormat() == null) ? 0 : getFormat().hashCode()); hashCode = prime * hashCode + ((getLocation() == null) ? 0 : getLocation().hashCode()); hashCode = prime * hashCode + ((getActivate() == null) ? 0 : getActivate().hashCode()); hashCode = prime * hashCode + ((getClientToken() == null) ? 0 : getClientToken().hashCode()); hashCode = prime * hashCode + ((getTags() == null) ? 0 : getTags().hashCode()); return hashCode; } @Override public CreateIPSetRequest clone() { return (CreateIPSetRequest) super.clone(); } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy