/*
 * Copyright 2012 Splunk, Inc.
 *
 * Licensed under the Apache License, Version 2.0 (the "License"): you may
 * not use this file except in compliance with the License. You may obtain
 * a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License 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.splunk;

/**
 * Contains arguments used to list a collection of entities.
 */
public class CollectionArgs extends Args {
    
    /**
     * Indicates whether to sort returned entries in ascending or descending order.
     */
    public static enum SortDirection {
        ASC("asc"),
        DESC("desc");
        
        private String value;
        
        private SortDirection(String value) {
            this.value = value;
        }
        
        /**
         * @return The REST API value for this enumerated constant.
         */
        public String toString() {
            return this.value;
        }
    }
    
    /**
     * Indicates the collating sequence for sorting the returned entries.
     */
    public static enum SortMode {
        /** If all values of the field are numbers, collate numerically. Otherwise, collate alphabetically. */
        AUTO("auto"),
        /** Collate alphabetically. */
        ALPHA("alpha"),
        /** Collate alphabetically, case-sensitive. */
        ALPHA_CASE("alpha_case"),
        /** Collate numerically. */
        NUM("num");
        
        private String value;
        
        private SortMode(String value) {
            this.value = value;
        }
        
        /**
         * @return The REST API value for this enumerated constant.
         */
        public String toString() {
            return this.value;
        }
    }
    
    /**
     * Class constructor.
     */
    public CollectionArgs() { super(); }
    
    /* BEGIN AUTOGENERATED CODE */
    
    /**
     * @param count
     *      Indicates the maximum number of entries to return. To return all entries, specify 0.
     */
    public void setCount(int count) {
        this.put("count", String.valueOf(count));
    }
    
    /**
     * @param offset
     *      Index for first item to return.
     */
    public void setOffset(int offset) {
        this.put("offset", String.valueOf(offset));
    }
    
    /**
     * @param search
     *      Search expression to filter the response. The response matches field values against the search expression. For example:
     *      
     *      "foo" matches any object that has "foo" as a substring in a field. "field_name=field_value" restricts the match to a single field.
     */
    public void setSearch(String search) {
        this.put("search", String.valueOf(search));
    }
    
    /**
     * @param sortDirection
     *      Indicates whether to sort returned entries in ascending or descending order.
     */
    public void setSortDirection(SortDirection sortDirection) {
        this.put("sort_dir", String.valueOf(sortDirection));
    }
    
    /**
     * @param sortKey
     *      Field to use for sorting.
     */
    public void setSortKey(String sortKey) {
        this.put("sort_key", String.valueOf(sortKey));
    }
    
    /**
     * @param sortMode
     *      Indicates the collating sequence for sorting the returned entries.
     */
    public void setSortMode(SortMode sortMode) {
        this.put("sort_mode", String.valueOf(sortMode));
    }
    
    /* END AUTOGENERATED CODE */
}

@@ -2224,32 +2224,981 @@
 %0A    %0D%0A    /**%0D%0A
+     * @param app%0D%0A     *      The app context in which to list the collection.%0D%0A     *      A %7B@code null%7D value indicates no app context, and a value of %0D%0A     *      %7B@code %22-%22%7D indicates an app wildcard.%0D%0A     */%0D%0A    public void setApp(String app) %7B%0D%0A        this.put(%22app%22, String.valueOf(app));%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * @param owner%0D%0A     *      The owner context in which to list the collection.%0D%0A     *      A value of %7B@code %22-%22%7D indicates a wildcard, and a %7B@code null%7D value %0D%0A     *      indicates no owner context.%0D%0A     */%0D%0A    public void setOwner(String owner) %7B%0D%0A        this.put(%22owner%22, String.valueOf(owner));%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A     * @param sharing%0D%0A     *      The sharing context in which to list the collection.%0D%0A     *      Valid values are %22user%22, %22app%22, %22global%22, and %22system%22.%0D%0A     */%0D%0A    public void setSharing(String sharing) %7B%0D%0A        this.put(%22sharing%22, String.valueOf(sharing));%0D%0A    %7D%0D%0A    %0D%0A    /**%0D%0A
      * @param co

Extend CollectionArgs with namespace-related arguments (app, owner, sharing).