196279301Sopenharmony_ci/*
296279301Sopenharmony_ci * Copyright (c) 2024-2024 Huawei Device Co., Ltd.
396279301Sopenharmony_ci * Licensed under the Apache License, Version 2.0 (the "License");
496279301Sopenharmony_ci * you may not use this file except in compliance with the License.
596279301Sopenharmony_ci * You may obtain a copy of the License at
696279301Sopenharmony_ci *
796279301Sopenharmony_ci *     http://www.apache.org/licenses/LICENSE-2.0
896279301Sopenharmony_ci *
996279301Sopenharmony_ci * Unless required by applicable law or agreed to in writing, software
1096279301Sopenharmony_ci * distributed under the License is distributed on an "AS IS" BASIS,
1196279301Sopenharmony_ci * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
1296279301Sopenharmony_ci * See the License for the specific language governing permissions and
1396279301Sopenharmony_ci * limitations under the License.
1496279301Sopenharmony_ci */
1596279301Sopenharmony_ci
1696279301Sopenharmony_ci#ifndef BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMINDER_AFFECTED_H
1796279301Sopenharmony_ci#define BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMINDER_AFFECTED_H
1896279301Sopenharmony_ci
1996279301Sopenharmony_ci#ifdef NOTIFICATION_SMART_REMINDER_SUPPORTED
2096279301Sopenharmony_ci#include <string>
2196279301Sopenharmony_ci#include <vector>
2296279301Sopenharmony_ci
2396279301Sopenharmony_ci#include "nlohmann/json.hpp"
2496279301Sopenharmony_ci#include "notification_flags.h"
2596279301Sopenharmony_ci
2696279301Sopenharmony_cinamespace OHOS {
2796279301Sopenharmony_cinamespace Notification {
2896279301Sopenharmony_ciclass ReminderAffected {
2996279301Sopenharmony_cipublic:
3096279301Sopenharmony_ci    static bool ValidStatus(const nlohmann::json &root, std::string &status);
3196279301Sopenharmony_ci    static bool ValidAndGetAffectedBy(
3296279301Sopenharmony_ci        const nlohmann::json &affectedByJson, std::vector<std::pair<std::string, std::string>> &affectedBy);
3396279301Sopenharmony_ci
3496279301Sopenharmony_ci    bool FromJson(const nlohmann::json &root);
3596279301Sopenharmony_ci    std::vector<std::pair<std::string, std::string>> affectedBy_;
3696279301Sopenharmony_ci    std::string status_;
3796279301Sopenharmony_ci    std::shared_ptr<NotificationFlags> reminderFlags_;
3896279301Sopenharmony_ci
3996279301Sopenharmony_ci    constexpr static const char* AFFECTED_BY = "affectedBy";
4096279301Sopenharmony_ci    constexpr static const char* DEVICE_TYPE = "deviceType";
4196279301Sopenharmony_ci    constexpr static const char* STATUS = "status";
4296279301Sopenharmony_ci    static constexpr char STATUS_DEFAULT = 'x';
4396279301Sopenharmony_ci    static constexpr char STATUS_DISABLE = '0';
4496279301Sopenharmony_ci    static constexpr char STATUS_ENABLE = '1';
4596279301Sopenharmony_ci};
4696279301Sopenharmony_ci}  // namespace Notification
4796279301Sopenharmony_ci}  // namespace OHOS
4896279301Sopenharmony_ci
4996279301Sopenharmony_ci#endif // BASE_NOTIFICATION_DISTRIBUTED_NOTIFICATION_SERVICE_SERVICES_ANS_INCLUDE_REMINDER_AFFECTED_H
5096279301Sopenharmony_ci#endif
51