Program Listing for File AccessControlList.h

Return to documentation for file (axr.sdk/models/AccessControlList.h)

// Copyright (C) AcceleratXR, Inc. All rights reserved.
#pragma once

#include "axr.sdk/EntityBase.h"
#include "axr.sdk/StringEnum.h"

#include <cpprest/details/basic_types.h>
#include <optional>
#include <vector>

namespace axr {
namespace sdk {
namespace models {

class ACLAction : public StringEnum<ACLAction>
{
public:
    static const ACLAction* CREATE;
    static const ACLAction* DELETE;
    static const ACLAction* FULL;
    static const ACLAction* READ;
    static const ACLAction* SPECIAL;
    static const ACLAction* UPDATE;

private:
    ACLAction(const utility::char_t* value)
        : StringEnum(value)
    {
    }
};

class ACLRecord : public Object
{
public:
    ACLRecord() : Object() {}
    ACLRecord(const ACLRecord& value) : Object(value) {}
    ACLRecord(ACLRecord&& value) : Object(value) {}
    virtual ~ACLRecord() {}

    // Object overrides

    virtual ACLRecord& SetProperties(const std::map<utility::string_t, Variant>& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual ACLRecord& SetProperties(std::map<utility::string_t, Variant>&& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual ACLRecord& SetProperty(const utility::char_t* name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual ACLRecord& SetProperty(const utility::string_t& name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    // ACLRecord members

    utility::string_t GetUserOrRoleId() const;

    ACLRecord& SetUserOrRoleId(const utility::string_t& value);

    std::optional<bool> GetCreate() const;

    ACLRecord& SetCreate(std::optional<bool> value);

    std::optional<bool> GetRead() const;

    ACLRecord& SetRead(std::optional<bool> value);

    std::optional<bool> GetUpdate() const;

    ACLRecord& SetUpdate(std::optional<bool> value);

    std::optional<bool> GetDelete() const;

    ACLRecord& SetDelete(std::optional<bool> value);

    std::optional<bool> GetSpecial() const;

    ACLRecord& SetSpecial(std::optional<bool> value);

    std::optional<bool> GetFull() const;

    ACLRecord& SetFull(std::optional<bool> value);
};

class AccessControlList : public EntityBase
{
public:
    AccessControlList() : EntityBase() {}
    AccessControlList(const AccessControlList& value) : EntityBase(value) {}
    AccessControlList(AccessControlList&& value) : EntityBase(value) {}
    virtual ~AccessControlList() {}

    // Object overrides

    virtual AccessControlList& SetProperties(const std::map<utility::string_t, Variant>& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual AccessControlList& SetProperties(std::map<utility::string_t, Variant>&& value) override
    {
        Object::SetProperties(value);
        return *this;
    }

    virtual AccessControlList& SetProperty(const utility::char_t* name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual AccessControlList& SetProperty(const utility::string_t& name, const Variant& value) override
    {
        Object::SetProperty(name, value);
        return*this;
    }

    virtual AccessControlList& SetRemoteUrl(const utility::string_t& url) override
    {
        Object::SetRemoteUrl(url);
        return *this;
    }

    // EntityBase overrides

    virtual AccessControlList& SetUid(const utility::string_t& value) override
    {
        EntityBase::SetUid(value);
        return *this;
    }

    virtual AccessControlList& SetDateCreated(const datetime& value) override
    {
        EntityBase::SetDateCreated(value);
        return *this;
    }

    virtual AccessControlList& SetDateModified(const datetime& value) override
    {
        EntityBase::SetDateModified(value);
        return *this;
    }

    virtual AccessControlList& SetVersion(const uint64_t value) override
    {
        EntityBase::SetVersion(value);
        return *this;
    }

    static const utility::char_t* ClassName()
    {
        return _XPLATSTR("axr::sdk::models::AccessControlList");
    }

    void Validate() override;

    // AccessControlList members

    std::shared_ptr<AccessControlList> GetParent() const;

    utility::string_t GetParentUid() const;

    AccessControlList& SetParentUid(const utility::string_t& value);

    std::vector<std::shared_ptr<ACLRecord>> GetRecords() const;

    AccessControlList& SetRecords(const std::vector<std::shared_ptr<ACLRecord>> value);
};

} // namespace models
} // namespace axr
} // namespace sdk