//
// Automatically generated by ipdlc.
// Edit at your own risk
//

#ifndef IPCServiceWorkerDescriptor_h
#define IPCServiceWorkerDescriptor_h

#include "mozilla/Attributes.h"
#include "IPCMessageStart.h"
#include "mozilla/RefPtr.h"
#include "nsString.h"
#include "nsTArray.h"
#include "nsTHashtable.h"
#include "mozilla/MozPromise.h"
#include "mozilla/OperatorNewExtensions.h"
#include "mozilla/UniquePtr.h"
#include "mozilla/ipc/ByteBuf.h"
#include "mozilla/ipc/FileDescriptor.h"
#include "mozilla/ipc/IPCForwards.h"
#include "mozilla/ipc/Shmem.h"

// Headers for typedefs
#include "mozilla/dom/ServiceWorkerBinding.h"
#include "mozilla/dom/WorkerBinding.h"
#include "mozilla/ipc/IPDLStructMember.h"
#include "mozilla/ipc/PBackgroundSharedTypes.h"


//-----------------------------------------------------------------------------
// Declaration of the IPDL type |struct IPCServiceWorkerDescriptor|
//
namespace mozilla {
namespace dom {
class IPCServiceWorkerDescriptor final
{
private:
    typedef ::uint64_t uint64_t;
    typedef ::mozilla::ipc::PrincipalInfo PrincipalInfo;
    typedef ::nsCString nsCString;
    typedef ::mozilla::dom::WorkerType WorkerType;
    typedef ::mozilla::dom::ServiceWorkerState ServiceWorkerState;

public:
#ifdef __clang__
#  pragma clang diagnostic push
#  if __has_warning("-Wdefaulted-function-deleted")
#    pragma clang diagnostic ignored "-Wdefaulted-function-deleted"
#  endif
#endif
    IPCServiceWorkerDescriptor() = default;
#ifdef __clang__
#  pragma clang diagnostic pop
#endif

    MOZ_IMPLICIT IPCServiceWorkerDescriptor(
            const uint64_t& _id,
            const uint64_t& _registrationId,
            const uint64_t& _registrationVersion,
            const PrincipalInfo& _principalInfo,
            const nsCString& _scope,
            const WorkerType& _type,
            const nsCString& _scriptURL,
            const ServiceWorkerState& _state,
            const bool& _handlesFetch) :
        principalInfo_(_principalInfo),
        scope_(_scope),
        type_(_type),
        scriptURL_(_scriptURL),
        state_(_state),
        handlesFetch_(_handlesFetch),
        id_(_id),
        registrationId_(_registrationId),
        registrationVersion_(_registrationVersion)
    {
    }

    MOZ_IMPLICIT IPCServiceWorkerDescriptor(
            uint64_t&& _id,
            uint64_t&& _registrationId,
            uint64_t&& _registrationVersion,
            PrincipalInfo&& _principalInfo,
            nsCString&& _scope,
            WorkerType&& _type,
            nsCString&& _scriptURL,
            ServiceWorkerState&& _state,
            bool&& _handlesFetch) :
        principalInfo_(std::move(_principalInfo)),
        scope_(std::move(_scope)),
        type_(std::move(_type)),
        scriptURL_(std::move(_scriptURL)),
        state_(std::move(_state)),
        handlesFetch_(std::move(_handlesFetch)),
        id_(std::move(_id)),
        registrationId_(std::move(_registrationId)),
        registrationVersion_(std::move(_registrationVersion))
    {
    }

    bool
    operator==(const IPCServiceWorkerDescriptor& _o) const;

    bool
    operator!=(const IPCServiceWorkerDescriptor& _o) const;

    uint64_t&
    id()
    {
        return id_;
    }
    const uint64_t&
    id() const
    {
        return id_;
    }

    uint64_t&
    registrationId()
    {
        return registrationId_;
    }
    const uint64_t&
    registrationId() const
    {
        return registrationId_;
    }

    uint64_t&
    registrationVersion()
    {
        return registrationVersion_;
    }
    const uint64_t&
    registrationVersion() const
    {
        return registrationVersion_;
    }

    PrincipalInfo&
    principalInfo()
    {
        return principalInfo_;
    }
    const PrincipalInfo&
    principalInfo() const
    {
        return principalInfo_;
    }

    nsCString&
    scope()
    {
        return scope_;
    }
    const nsCString&
    scope() const
    {
        return scope_;
    }

    WorkerType&
    type()
    {
        return type_;
    }
    const WorkerType&
    type() const
    {
        return type_;
    }

    nsCString&
    scriptURL()
    {
        return scriptURL_;
    }
    const nsCString&
    scriptURL() const
    {
        return scriptURL_;
    }

    ServiceWorkerState&
    state()
    {
        return state_;
    }
    const ServiceWorkerState&
    state() const
    {
        return state_;
    }

    bool&
    handlesFetch()
    {
        return handlesFetch_;
    }
    const bool&
    handlesFetch() const
    {
        return handlesFetch_;
    }

private:
    void
    StaticAssertions() const;
    ::mozilla::ipc::IPDLStructMember<PrincipalInfo> principalInfo_;
    ::mozilla::ipc::IPDLStructMember<nsCString> scope_;
    ::mozilla::ipc::IPDLStructMember<WorkerType> type_;
    ::mozilla::ipc::IPDLStructMember<nsCString> scriptURL_;
    ::mozilla::ipc::IPDLStructMember<ServiceWorkerState> state_;
    ::mozilla::ipc::IPDLStructMember<bool> handlesFetch_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> id_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> registrationId_;
    ::mozilla::ipc::IPDLStructMember<uint64_t> registrationVersion_;
};
} // namespace dom
} // namespace mozilla

namespace IPC {
template<>
struct ParamTraits <::mozilla::dom::IPCServiceWorkerDescriptor>
{
    typedef ::mozilla::dom::IPCServiceWorkerDescriptor paramType;
    static void
    Write(
            IPC::MessageWriter* aWriter,
            const paramType& aVar);
    static IPC::ReadResult<paramType>
    Read(IPC::MessageReader* aReader);
};
} // namespace IPC

#endif // ifndef IPCServiceWorkerDescriptor_h
