
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include "policy_control_request_trigger.h"

char* OpenAPI_policy_control_request_trigger_ToString(OpenAPI_policy_control_request_trigger_e policy_control_request_trigger)
{
    const char *policy_control_request_triggerArray[] =  { "NULL", "PLMN_CH", "RES_MO_RE", "AC_TY_CH", "UE_IP_CH", "UE_MAC_CH", "AN_CH_COR", "US_RE", "APP_STA", "APP_STO", "AN_INFO", "CM_SES_FAIL", "PS_DA_OFF", "DEF_QOS_CH", "SE_AMBR_CH", "QOS_NOTIF", "NO_CREDIT", "REALLO_OF_CREDIT", "PRA_CH", "SAREA_CH", "SCNN_CH", "RE_TIMEOUT", "RES_RELEASE", "SUCC_RES_ALLO", "RAT_TY_CH", "REF_QOS_IND_CH", "NUM_OF_PACKET_FILTER", "UE_STATUS_RESUME", "UE_TZ_CH", "AUTH_PROF_CH", "QOS_MONITORING", "QOS_MON_CAP_REPO", "SCELL_CH", "USER_LOCATION_CH", "EPS_FALLBACK", "MA_PDU", "TSN_BRIDGE_INFO", "5G_RG_JOIN", "5G_RG_LEAVE", "DDN_FAILURE", "DDN_DELIVERY_STATUS", "GROUP_ID_LIST_CHG", "DDN_FAILURE_CANCELLATION", "DDN_DELIVERY_STATUS_CANCELLATION", "VPLMN_QOS_CH", "SUCC_QOS_UPDATE", "SAT_CATEGORY_CHG", "PCF_UE_NOTIF_IND", "NWDAF_DATA_CHG", "UE_POL_CONT_IND", "URSP_ENFORCEMENT_INFO", "HR_SBO_IND_CHG", "L4S_SUPP", "NET_SLICE_REPL", "BAT_OFFSET_INFO", "UE_REACH_STATUS_CH", "N3G_DEV_INFO" };
    size_t sizeofArray = sizeof(policy_control_request_triggerArray) / sizeof(policy_control_request_triggerArray[0]);
    if (policy_control_request_trigger < sizeofArray)
        return (char *)policy_control_request_triggerArray[policy_control_request_trigger];
    else
        return (char *)"Unknown";
}

OpenAPI_policy_control_request_trigger_e OpenAPI_policy_control_request_trigger_FromString(char* policy_control_request_trigger)
{
    int stringToReturn = 0;
    const char *policy_control_request_triggerArray[] =  { "NULL", "PLMN_CH", "RES_MO_RE", "AC_TY_CH", "UE_IP_CH", "UE_MAC_CH", "AN_CH_COR", "US_RE", "APP_STA", "APP_STO", "AN_INFO", "CM_SES_FAIL", "PS_DA_OFF", "DEF_QOS_CH", "SE_AMBR_CH", "QOS_NOTIF", "NO_CREDIT", "REALLO_OF_CREDIT", "PRA_CH", "SAREA_CH", "SCNN_CH", "RE_TIMEOUT", "RES_RELEASE", "SUCC_RES_ALLO", "RAT_TY_CH", "REF_QOS_IND_CH", "NUM_OF_PACKET_FILTER", "UE_STATUS_RESUME", "UE_TZ_CH", "AUTH_PROF_CH", "QOS_MONITORING", "QOS_MON_CAP_REPO", "SCELL_CH", "USER_LOCATION_CH", "EPS_FALLBACK", "MA_PDU", "TSN_BRIDGE_INFO", "5G_RG_JOIN", "5G_RG_LEAVE", "DDN_FAILURE", "DDN_DELIVERY_STATUS", "GROUP_ID_LIST_CHG", "DDN_FAILURE_CANCELLATION", "DDN_DELIVERY_STATUS_CANCELLATION", "VPLMN_QOS_CH", "SUCC_QOS_UPDATE", "SAT_CATEGORY_CHG", "PCF_UE_NOTIF_IND", "NWDAF_DATA_CHG", "UE_POL_CONT_IND", "URSP_ENFORCEMENT_INFO", "HR_SBO_IND_CHG", "L4S_SUPP", "NET_SLICE_REPL", "BAT_OFFSET_INFO", "UE_REACH_STATUS_CH", "N3G_DEV_INFO" };
    size_t sizeofArray = sizeof(policy_control_request_triggerArray) / sizeof(policy_control_request_triggerArray[0]);
    while (stringToReturn < sizeofArray) {
        if (strcmp(policy_control_request_trigger, policy_control_request_triggerArray[stringToReturn]) == 0) {
            return stringToReturn;
        }
        stringToReturn++;
    }
    return 0;
}

