Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 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.route53domains.model;
 
 
Container for the parameters to the UpdateTagsForDomain operation.

This operation adds or updates tags for a specified domain.

All tag operations are eventually consistent; subsequent operations may not immediately represent all issued operations.

 
 public class UpdateTagsForDomainRequest extends AmazonWebServiceRequest implements SerializableCloneable {

    
The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

Constraints:
Length: 0 - 255
Pattern: [a-zA-Z0-9_\-.]*

 
     private String domainName;

    
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

 
The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

Constraints:
Length: 0 - 255
Pattern: [a-zA-Z0-9_\-.]*

Returns:
The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

 
     public String getDomainName() {
         return ;
     }
    
    
The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

Constraints:
Length: 0 - 255
Pattern: [a-zA-Z0-9_\-.]*

Parameters:
domainName The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

    public void setDomainName(String domainName) {
        this. = domainName;
    }
    
    
The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

Returns a reference to this object so that method calls can be chained together.

Constraints:
Length: 0 - 255
Pattern: [a-zA-Z0-9_\-.]*

Parameters:
domainName The domain for which you want to add or update tags.

The name of a domain.

Type: String

Default: None

Constraints: The domain name can contain only the letters a through z, the numbers 0 through 9, and hyphen (-). Hyphens are allowed only when they're surrounded by letters, numbers, or other hyphens. You can't specify a hyphen at the beginning or end of a label. To specify an Internationalized Domain Name, you must convert the name to Punycode.

Required: Yes

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTagsForDomainRequest withDomainName(String domainName) {
        this. = domainName;
        return this;
    }

    
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

Returns:
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

    public java.util.List<TaggetTagsToUpdate() {
        if ( == null) {
               = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>();
              .setAutoConstruct(true);
        }
        return ;
    }
    
    
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

Parameters:
tagsToUpdate A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

    public void setTagsToUpdate(java.util.Collection<TagtagsToUpdate) {
        if (tagsToUpdate == null) {
            this. = null;
            return;
        }
        com.amazonaws.internal.ListWithAutoConstructFlag<TagtagsToUpdateCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>(tagsToUpdate.size());
        tagsToUpdateCopy.addAll(tagsToUpdate);
        this. = tagsToUpdateCopy;
    }
    
    
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

NOTE: This method appends the values to the existing list (if any). Use setTagsToUpdate(java.util.Collection) or withTagsToUpdate(java.util.Collection) if you want to override the existing values.

Returns a reference to this object so that method calls can be chained together.

Parameters:
tagsToUpdate A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

Returns:
A reference to this updated object so that method calls can be chained together.
    public UpdateTagsForDomainRequest withTagsToUpdate(Tag... tagsToUpdate) {
        if (getTagsToUpdate() == nullsetTagsToUpdate(new java.util.ArrayList<Tag>(tagsToUpdate.length));
        for (Tag value : tagsToUpdate) {
            getTagsToUpdate().add(value);
        }
        return this;
    }
    
    
A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

Returns a reference to this object so that method calls can be chained together.

Parameters:
tagsToUpdate A list of the tag keys and values that you want to add or update. If you specify a key that already exists, the corresponding value will be replaced.

Type: A complex type containing a list of tags

Default: None

Required: No'>

Each tag includes the following elements:

  • Key

    The key (name) of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each key can be 1-128 characters long.

    Required: Yes

  • Value

    The value of a tag.

    Type: String

    Default: None

    Valid values: Unicode characters including alphanumeric, space, and ".:/=+\-@"

    Constraints: Each value can be 0-256 characters long.

    Required: Yes

Returns:
A reference to this updated object so that method calls can be chained together.
        if (tagsToUpdate == null) {
            this. = null;
        } else {
            com.amazonaws.internal.ListWithAutoConstructFlag<TagtagsToUpdateCopy = new com.amazonaws.internal.ListWithAutoConstructFlag<Tag>(tagsToUpdate.size());
            tagsToUpdateCopy.addAll(tagsToUpdate);
            this. = tagsToUpdateCopy;
        }
        return this;
    }

    
Returns a string representation of this object; useful for testing and debugging.

Returns:
A string representation of this object.
See also:
java.lang.Object.toString()
    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append("{");
        if (getDomainName() != nullsb.append("DomainName: " + getDomainName() + ",");
        if (getTagsToUpdate() != nullsb.append("TagsToUpdate: " + getTagsToUpdate() );
        sb.append("}");
        return sb.toString();
    }
    
    @Override
    public int hashCode() {
        final int prime = 31;
        int hashCode = 1;
        
        hashCode = prime * hashCode + ((getDomainName() == null) ? 0 : getDomainName().hashCode()); 
        hashCode = prime * hashCode + ((getTagsToUpdate() == null) ? 0 : getTagsToUpdate().hashCode()); 
        return hashCode;
    }
    
    @Override
    public boolean equals(Object obj) {
        if (this == objreturn true;
        if (obj == nullreturn false;
        if (obj instanceof UpdateTagsForDomainRequest == falsereturn false;
        
        if (other.getDomainName() == null ^ this.getDomainName() == nullreturn false;
        if (other.getDomainName() != null && other.getDomainName().equals(this.getDomainName()) == falsereturn false
        if (other.getTagsToUpdate() == null ^ this.getTagsToUpdate() == nullreturn false;
        if (other.getTagsToUpdate() != null && other.getTagsToUpdate().equals(this.getTagsToUpdate()) == falsereturn false
        return true;
    }
    
    @Override
    public UpdateTagsForDomainRequest clone() {
        
            return (UpdateTagsForDomainRequestsuper.clone();
    }
}
    
New to GrepCode? Check out our FAQ X