Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * Copyright 2010-2015 Amazon.com, Inc. or its affiliates. All Rights Reserved.
   *
   * Portions copyright 2006-2009 James Murty. Please see LICENSE.txt
   * for applicable license terms and NOTICE.txt for applicable notices.
   *
   * 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.s3.model;
 
 import java.util.List;
 
 
 public class BucketTaggingConfiguration {
 
     private List<TagSettagSets = null;

    

Creates a new bucket tagging configuration. By default, the newly created configuration is empty.

Passing the new configuration directly to com.amazonaws.services.s3.AmazonS3.setBucketTaggingConfiguration(java.lang.String,com.amazonaws.services.s3.model.BucketTaggingConfiguration) will remove any existing bucket tagging configuration.

See also:
BucketTaggingConfiguration.BucketTaggingConfiguration(java.util.Collection)
 
     public BucketTaggingConfiguration() {
         this. = new ArrayList<TagSet>( 1 );
     }
    
    

Creates a new bucket Tagging configuration containing the specified TopicConfigurations.

Passing the new configuration directly to com.amazonaws.services.s3.AmazonS3.setBucketTaggingConfiguration(java.lang.String,com.amazonaws.services.s3.model.BucketTaggingConfiguration) will set the bucket's Tagging configuration and overwrite any existing configuration.

See also:
BucketTaggingConfiguration.BucketTaggingConfiguration()
 
     public BucketTaggingConfigurationCollection<TagSettagSets ) {
         this. = new ArrayList<TagSet>( 1 );
         this..addAlltagSets );
     }

    

Sets the TagSet TagSets and returns this object, enabling additional method calls to be chained together.

Calling this method will overwrite any previously set TagSets for this object.

Parameters:
tagSets A set of TagSet objects.
Returns:
The updated BucketTaggingConfiguration object, enabling additional method calls to be chained together.
See also:
setTagSets(java.util.Collection)
 
     public BucketTaggingConfiguration withTagSetsTagSet... tagSets ) {
         this..clear();
         
         for ( int index = 0; index < tagSets.lengthindex++ ) {
             this..addtagSetsindex ] );
         }
         
         return this;
     }

    

Sets the TagSet.

Calling this method will overwrite any previously set TagSets for this object.

Parameters:
tagSets A collection of TagSet objects.
See also:
withTagSets(com.amazonaws.services.s3.model.TagSet[])
    public void setTagSetsCollection<TagSettagSets ) {
        this..clear();
        this..addAlltagSets );
    }

    

Gets the list of TagSet objects contained in this object. This method may return an empty list if no TagSet objects are present.

Returns:
The list of TagSet objects contained in this object. May return an empty list.
    public List<TagSetgetAllTagSets() {
        return this.;
    }

    

Gets the first TagSet object contained in this object. This method may return null list if no TagSet objects are present.

Returns:
The first TagSet object contained in the object
    public TagSet getTagSet() {
    	return this..get( 0 );
    }
    
    

Gets the TagSet object at the specified index contained in this object.

Parameters:
index The index of the TagSet object to return
Returns:
The TagSet object contained in the object
    public TagSet getTagSetAtIndexint index ) {
    	return this..getindex );
    }
    
    public String toString() {
        StringBuffer sb = new StringBuffer();
        sb.append("{");
        sb.append("TagSets: " + this.getAllTagSets() );
        sb.append("}");
        return sb.toString();
    }
    
New to GrepCode? Check out our FAQ X