//
// Copyright 2023 Pixar
//
// Licensed under the terms set forth in the LICENSE.txt file available at
// https://openusd.org/license.
//
////////////////////////////////////////////////////////////////////////

/* ************************************************************************** */
/* **                                                                      ** */
/* ** This file is generated by a script.                                  ** */
/* **                                                                      ** */
/* ** Do not edit it directly (unless it is within a CUSTOM CODE section)! ** */
/* ** Edit hdSchemaDefs.py instead to make changes.                        ** */
/* **                                                                      ** */
/* ************************************************************************** */

#ifndef PXR_USD_IMAGING_USD_IMAGING_SCENE_INDEX_CREATE_ARGS_SCHEMA_H
#define PXR_USD_IMAGING_USD_IMAGING_SCENE_INDEX_CREATE_ARGS_SCHEMA_H

/// \file

#include "pxr/usdImaging/usdImaging/api.h"

#include "pxr/imaging/hd/schema.h"

// --(BEGIN CUSTOM CODE: Includes)--
// --(END CUSTOM CODE: Includes)--

PXR_NAMESPACE_OPEN_SCOPE

// --(BEGIN CUSTOM CODE: Declares)--
TF_DECLARE_REF_PTRS(UsdStage);
using UsdStageRefPtrDataSource = HdTypedSampledDataSource<UsdStageRefPtr>;
using UsdStageRefPtrDataSourceHandle = UsdStageRefPtrDataSource::Handle;
// --(END CUSTOM CODE: Declares)--

#define USD_IMAGING_SCENE_INDEX_CREATE_ARGS_SCHEMA_TOKENS \
    (usdImagingSceneIndexCreateArgs) \
    (stage) \
    (includeUnloadedPrims) \
    (displayUnloadedPrimsWithBounds) \
    (addDrawModeSceneIndex) \

TF_DECLARE_PUBLIC_TOKENS(UsdImagingSceneIndexCreateArgsSchemaTokens, USDIMAGING_API,
    USD_IMAGING_SCENE_INDEX_CREATE_ARGS_SCHEMA_TOKENS);

//-----------------------------------------------------------------------------


/// \class UsdImagingSceneIndexCreateArgsSchema
///
class UsdImagingSceneIndexCreateArgsSchema : public HdSchema
{
public:
    /// \name Schema retrieval
    /// @{

    UsdImagingSceneIndexCreateArgsSchema(HdContainerDataSourceHandle container)
      : HdSchema(container) {}

    /// Retrieves a container data source with the schema's default name token
    /// "usdImagingSceneIndexCreateArgs" from the parent container and constructs a
    /// UsdImagingSceneIndexCreateArgsSchema instance.
    /// Because the requested container data source may not exist, the result
    /// should be checked with IsDefined() or a bool comparison before use.
    USDIMAGING_API
    static UsdImagingSceneIndexCreateArgsSchema GetFromParent(
        const HdContainerDataSourceHandle &fromParentContainer);

    /// @}

// --(BEGIN CUSTOM CODE: Schema Methods)--
// --(END CUSTOM CODE: Schema Methods)--

    /// \name Member accessor
    /// @{

    /// The USD stage used to populate the usd imaging scene indices. Note
    /// that a client of usd imaging can specify the stage either in this
    /// schema or later by calling UsdStageSceneIndex::SetStage, for example
    /// after all scene indices and the renderer have been created. The
    /// results of either are equivalent but there might differences in the
    /// performance.
    USDIMAGING_API
    UsdStageRefPtrDataSourceHandle GetStage() const;

    USDIMAGING_API
    HdBoolDataSourceHandle GetIncludeUnloadedPrims() const;

    /// If true, switch the draw mode for unloaded prims to bounds.
    USDIMAGING_API
    HdBoolDataSourceHandle GetDisplayUnloadedPrimsWithBounds() const;

    /// If true, add scene index resolving usd draw mode (from GeomModelAPI,
    /// e.g., "cards").
    USDIMAGING_API
    HdBoolDataSourceHandle GetAddDrawModeSceneIndex() const; 

    /// @}

    /// \name Schema location
    /// @{

    /// Returns a token where the container representing this schema is found in
    /// a container by default.
    USDIMAGING_API
    static const TfToken &GetSchemaToken();

    /// Returns an HdDataSourceLocator (relative to the prim-level data source)
    /// where the container representing this schema is found by default.
    USDIMAGING_API
    static const HdDataSourceLocator &GetDefaultLocator();

    /// @} 

    /// \name Schema construction
    /// @{

    /// \deprecated Use Builder instead.
    ///
    /// Builds a container data source which includes the provided child data
    /// sources. Parameters with nullptr values are excluded. This is a
    /// low-level interface. For cases in which it's desired to define
    /// the container with a sparse set of child fields, the Builder class
    /// is often more convenient and readable.
    USDIMAGING_API
    static HdContainerDataSourceHandle
    BuildRetained(
        const UsdStageRefPtrDataSourceHandle &stage,
        const HdBoolDataSourceHandle &includeUnloadedPrims,
        const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds,
        const HdBoolDataSourceHandle &addDrawModeSceneIndex
    );

    /// \class UsdImagingSceneIndexCreateArgsSchema::Builder
    /// 
    /// Utility class for setting sparse sets of child data source fields to be
    /// filled as arguments into BuildRetained. Because all setter methods
    /// return a reference to the instance, this can be used in the "builder
    /// pattern" form.
    class Builder
    {
    public:
        USDIMAGING_API
        Builder &SetStage(
            const UsdStageRefPtrDataSourceHandle &stage);
        USDIMAGING_API
        Builder &SetIncludeUnloadedPrims(
            const HdBoolDataSourceHandle &includeUnloadedPrims);
        USDIMAGING_API
        Builder &SetDisplayUnloadedPrimsWithBounds(
            const HdBoolDataSourceHandle &displayUnloadedPrimsWithBounds);
        USDIMAGING_API
        Builder &SetAddDrawModeSceneIndex(
            const HdBoolDataSourceHandle &addDrawModeSceneIndex);

        /// Returns a container data source containing the members set thus far.
        USDIMAGING_API
        HdContainerDataSourceHandle Build();

    private:
        UsdStageRefPtrDataSourceHandle _stage;
        HdBoolDataSourceHandle _includeUnloadedPrims;
        HdBoolDataSourceHandle _displayUnloadedPrimsWithBounds;
        HdBoolDataSourceHandle _addDrawModeSceneIndex;

    };

    /// @}
};

PXR_NAMESPACE_CLOSE_SCOPE

#endif