//
// Copyright (c) Microsoft Corporation. All rights reserved.
// 
//
// File generated by WinMDIDL version 8.00.0021
//

import "inspectable.idl";
import "AsyncInfo.idl";
import "EventToken.idl";
import "windowscontracts.idl";
import "Windows.Foundation.idl";

// Forward Declare
namespace Windows
{
    namespace Foundation
    {
        interface IStringable;

        apicontract UniversalApiContract;
    }
}
namespace Windows
{
    namespace Data
    {
        namespace Json
        {
            typedef enum JsonErrorStatus JsonErrorStatus;

            typedef enum JsonValueType JsonValueType;

            interface IJsonArray;

            interface IJsonArrayStatics;

            interface IJsonErrorStatics2;

            interface IJsonObject;

            interface IJsonObjectStatics;

            interface IJsonObjectWithDefaultValues;

            interface IJsonValue;

            interface IJsonValueStatics;

            interface IJsonValueStatics2;

            runtimeclass JsonArray;

            runtimeclass JsonError;

            runtimeclass JsonObject;

            runtimeclass JsonValue;
        }
    }
}

// Generic instantiations
namespace Windows
{
    namespace Data
    {
        namespace Json
        {
            declare
            {
                interface Windows.Foundation.Collections.IIterable<Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue*>*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IIterator<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue*>*>;

                interface Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IMapView<HSTRING, Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IMap<HSTRING, Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IVectorView<Windows.Data.Json.IJsonValue*>;

                interface Windows.Foundation.Collections.IVector<Windows.Data.Json.IJsonValue*>;
            }
        }
    }
}

// Type definition
namespace Windows
{
    namespace Data
    {
        namespace Json
        {
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum JsonErrorStatus
            {
                Unknown             = 0,
                InvalidJsonString   = 1,
                InvalidJsonNumber   = 2,
                JsonValueNotFound   = 3,
                ImplementationLimit = 4
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            enum JsonValueType
            {
                Null    = 0,
                Boolean = 1,
                Number  = 2,
                String  = 3,
                Array   = 4,
                Object  = 5
            };

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonArray)]
            [uuid(08C1DDB6-0CBD-4A9A-B5D3-2F852DC37E81)]
            interface IJsonArray : IInspectable
                requires
                    Windows.Data.Json.IJsonValue
            {
                HRESULT GetObjectAt([in] UINT32 index, [out] [retval] Windows.Data.Json.JsonObject** returnValue);
                HRESULT GetArrayAt([in] UINT32 index, [out] [retval] Windows.Data.Json.JsonArray** returnValue);
                HRESULT GetStringAt([in] UINT32 index, [out] [retval] HSTRING* returnValue);
                HRESULT GetNumberAt([in] UINT32 index, [out] [retval] DOUBLE* returnValue);
                HRESULT GetBooleanAt([in] UINT32 index, [out] [retval] boolean* returnValue);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonArray)]
            [uuid(DB1434A9-E164-499F-93E2-8A8F49BB90BA)]
            interface IJsonArrayStatics : IInspectable
            {
                HRESULT Parse([in] HSTRING input, [out] [retval] Windows.Data.Json.JsonArray** jsonArray);
                HRESULT TryParse([in] HSTRING input, [out] Windows.Data.Json.JsonArray** result, [out] [retval] boolean* succeeded);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonError)]
            [uuid(404030DA-87D0-436C-83AB-FC7B12C0CC26)]
            interface IJsonErrorStatics2 : IInspectable
            {
                HRESULT GetJsonStatus([in] INT32 hresult, [out] [retval] Windows.Data.Json.JsonErrorStatus* status);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonObject)]
            [uuid(064E24DD-29C2-4F83-9AC1-9EE11578BEB3)]
            interface IJsonObject : IInspectable
                requires
                    Windows.Data.Json.IJsonValue
            {
                HRESULT GetNamedValue([in] HSTRING name, [out] [retval] Windows.Data.Json.JsonValue** returnValue);
                HRESULT SetNamedValue([in] HSTRING name, [in] Windows.Data.Json.IJsonValue* value);
                HRESULT GetNamedObject([in] HSTRING name, [out] [retval] Windows.Data.Json.JsonObject** returnValue);
                HRESULT GetNamedArray([in] HSTRING name, [out] [retval] Windows.Data.Json.JsonArray** returnValue);
                HRESULT GetNamedString([in] HSTRING name, [out] [retval] HSTRING* returnValue);
                HRESULT GetNamedNumber([in] HSTRING name, [out] [retval] DOUBLE* returnValue);
                HRESULT GetNamedBoolean([in] HSTRING name, [out] [retval] boolean* returnValue);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonObject)]
            [uuid(2289F159-54DE-45D8-ABCC-22603FA066A0)]
            interface IJsonObjectStatics : IInspectable
            {
                HRESULT Parse([in] HSTRING input, [out] [retval] Windows.Data.Json.JsonObject** jsonObject);
                HRESULT TryParse([in] HSTRING input, [out] Windows.Data.Json.JsonObject** result, [out] [retval] boolean* succeeded);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonObject)]
            [uuid(D960D2A2-B7F0-4F00-8E44-D82CF415EA13)]
            interface IJsonObjectWithDefaultValues : IInspectable
                requires
                    Windows.Data.Json.IJsonObject,
                    Windows.Data.Json.IJsonValue
            {
                [overload("GetNamedValue")] HRESULT GetNamedValueOrDefault([in] HSTRING name, [in] Windows.Data.Json.JsonValue* defaultValue, [out] [retval] Windows.Data.Json.JsonValue** returnValue);
                [overload("GetNamedObject")] HRESULT GetNamedObjectOrDefault([in] HSTRING name, [in] Windows.Data.Json.JsonObject* defaultValue, [out] [retval] Windows.Data.Json.JsonObject** returnValue);
                [overload("GetNamedString")] HRESULT GetNamedStringOrDefault([in] HSTRING name, [in] HSTRING defaultValue, [out] [retval] HSTRING* returnValue);
                [overload("GetNamedArray")] HRESULT GetNamedArrayOrDefault([in] HSTRING name, [in] Windows.Data.Json.JsonArray* defaultValue, [out] [retval] Windows.Data.Json.JsonArray** returnValue);
                [overload("GetNamedNumber")] HRESULT GetNamedNumberOrDefault([in] HSTRING name, [in] DOUBLE defaultValue, [out] [retval] DOUBLE* returnValue);
                [overload("GetNamedBoolean")] HRESULT GetNamedBooleanOrDefault([in] HSTRING name, [in] boolean defaultValue, [out] [retval] boolean* returnValue);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [uuid(A3219ECB-F0B3-4DCD-BEEE-19D48CD3ED1E)]
            interface IJsonValue : IInspectable
            {
                [propget] HRESULT ValueType([out] [retval] Windows.Data.Json.JsonValueType* value);
                HRESULT Stringify([out] [retval] HSTRING* returnValue);
                HRESULT GetString([out] [retval] HSTRING* returnValue);
                HRESULT GetNumber([out] [retval] DOUBLE* returnValue);
                HRESULT GetBoolean([out] [retval] boolean* returnValue);
                HRESULT GetArray([out] [retval] Windows.Data.Json.JsonArray** returnValue);
                HRESULT GetObject([out] [retval] Windows.Data.Json.JsonObject** returnValue);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonValue)]
            [uuid(5F6B544A-2F53-48E1-91A3-F78B50A6345C)]
            interface IJsonValueStatics : IInspectable
            {
                HRESULT Parse([in] HSTRING input, [out] [retval] Windows.Data.Json.JsonValue** jsonValue);
                HRESULT TryParse([in] HSTRING input, [out] Windows.Data.Json.JsonValue** result, [out] [retval] boolean* succeeded);
                HRESULT CreateBooleanValue([in] boolean input, [out] [retval] Windows.Data.Json.JsonValue** jsonValue);
                HRESULT CreateNumberValue([in] DOUBLE input, [out] [retval] Windows.Data.Json.JsonValue** jsonValue);
                HRESULT CreateStringValue([in] HSTRING input, [out] [retval] Windows.Data.Json.JsonValue** jsonValue);
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [exclusiveto(Windows.Data.Json.JsonValue)]
            [uuid(1D9ECBE4-3FE8-4335-8392-93D8E36865F0)]
            interface IJsonValueStatics2 : IInspectable
            {
                HRESULT CreateNullValue([out] [retval] Windows.Data.Json.JsonValue** jsonValue);
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Data.Json.IJsonArrayStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass JsonArray
            {
                [default] interface Windows.Data.Json.IJsonArray;
                interface Windows.Data.Json.IJsonValue;
                interface Windows.Foundation.Collections.IVector<Windows.Data.Json.IJsonValue*>;
                interface Windows.Foundation.Collections.IIterable<Windows.Data.Json.IJsonValue*>;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Data.Json.IJsonErrorStatics2, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass JsonError
            {
            }

            [activatable(Windows.Foundation.UniversalApiContract, 1.0)]
            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Data.Json.IJsonObjectStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass JsonObject
            {
                [default] interface Windows.Data.Json.IJsonObject;
                interface Windows.Data.Json.IJsonValue;
                interface Windows.Foundation.Collections.IMap<HSTRING, Windows.Data.Json.IJsonValue*>;
                interface Windows.Foundation.Collections.IIterable<Windows.Foundation.Collections.IKeyValuePair<HSTRING, Windows.Data.Json.IJsonValue*>*>;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Data.Json.IJsonObjectWithDefaultValues;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
            }

            [contract(Windows.Foundation.UniversalApiContract, 1.0)]
            [marshaling_behavior(agile)]
            [static(Windows.Data.Json.IJsonValueStatics, Windows.Foundation.UniversalApiContract, 1.0)]
            [static(Windows.Data.Json.IJsonValueStatics2, Windows.Foundation.UniversalApiContract, 1.0)]
            [threading(both)]
            runtimeclass JsonValue
            {
                [default] interface Windows.Data.Json.IJsonValue;
                [contract(Windows.Foundation.UniversalApiContract, 1.0)] interface Windows.Foundation.IStringable;
            }
        }
    }
}
