All files / output cl_oa2c_config_writer_api.clas.mjs

12.03% Statements 26/216
66.66% Branches 2/3
1.78% Functions 1/56
12.03% Lines 26/216

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 2161x 1x                                             1x 1x 1x 1x                                                                                                                                                                                                                                                                                                                                                 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// cl_oa2c_config_writer_api.clas.abap
class cl_oa2c_config_writer_api {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'CL_OA2C_CONFIG_WRITER_API';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MT_SAVED_CONFIGS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({
  "configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
  "client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
  "client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
  "authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
  "token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
  "target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
  "granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["CONFIGURATION"]},"secondary":[]}, "");}, "visibility": "I", "is_constant": " ", "is_class": "X"},
  "MS_CONFIG": {"type": () => {return new abap.types.Structure({
  "configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
  "client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
  "client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
  "authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
  "token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
  "target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
  "granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_GRANTTYPE_CC": {"type": () => {return new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"CREATE": {"visibility": "U", "parameters": {"RO_CONFIG_WRITER_API": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_OA2C_CONFIG_WRITER_API", RTTIName: "\\CLASS=CL_OA2C_CONFIG_WRITER_API"});}, "is_optional": " "}, "I_CLIENT_ID": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_CLIENT_SECRET": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_PROFILE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"OA2C_PROFILE","ddicName":"OA2C_PROFILE","description":""});}, "is_optional": " "}, "I_AUTH_CODE_ALLOWED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "I_AUTHENTICATION_METHOD": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "I_AUTHORIZATION_ENDPOINT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_CLOCK_SKEW_TOLERANCE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "I_CONFIGURATION": {"type": () => {return new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""});}, "is_optional": " "}, "I_CONFIGURED_GRANTTYPE": {"type": () => {return new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});}, "is_optional": " "}, "I_PROXY_HOST": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_PROXY_PORT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_PROXY_USER": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_REDIRECTION_URI_SERVER": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_RS_AUTHENTICATION_METHOD": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "I_RT_VALIDITY": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "I_SAML20_ALLOWED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "I_SAML20_AUDIENCE": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_SAML20_NAMEID_EMAIL_NUM": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}, "I_TARGET_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "I_TOKEN_ENDPOINT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IT_CONFIGURED_SCOPES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "is_optional": " "}}},
  "LOAD": {"visibility": "U", "parameters": {"RO_CONFIG_WRITER_API": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "CL_OA2C_CONFIG_WRITER_API", RTTIName: "\\CLASS=CL_OA2C_CONFIG_WRITER_API"});}, "is_optional": " "}, "I_PROFILE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"OA2C_PROFILE","ddicName":"OA2C_PROFILE","description":""});}, "is_optional": " "}, "I_CONFIGURATION": {"type": () => {return new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""});}, "is_optional": " "}}},
  "SAVE": {"visibility": "U", "parameters": {}},
  "READ": {"visibility": "U", "parameters": {"E_AUTH_CODE_ALLOWED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "E_AUTHENTICATION_METHOD": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_AUTHORIZATION_ENDPOINT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_CLIENT_ID": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_CLIENT_UUID": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_CLOCK_SKEW_TOLERANCE": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "E_CONFIGURATION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_CONFIGURED_GRANT_TYPE": {"type": () => {return new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});}, "is_optional": " "}, "E_PROXY_HOST": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_PROXY_PORT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_PROXY_USER": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_REDIRECT_URI": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_REDIRECT_URI_HOST": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_REDIRECT_URI_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_REDIRECT_URI_PORT": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "E_RS_AUTHENTICATION_METHOD": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_RT_VALIDITY": {"type": () => {return new abap.types.Integer({qualifiedName: "I"});}, "is_optional": " "}, "E_SAML20_ALLOWED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "E_SAML20_AUDIENCE": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_SAML20_NAMEID_EMAIL": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_SAML20_RECIPIENT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_TARGET_PATH": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "E_TOKEN_ENDPOINT": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "ES_OA2C_ADMIN": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "ET_PROFILES": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "ET_CONFIGURED_SCOPES": {"type": () => {return abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");}, "is_optional": " "}, "E_CONFIGURED_GRANTTYPE": {"type": () => {return new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});}, "is_optional": " "}}},
  "SET_PROFILES": {"visibility": "U", "parameters": {"IT_PROFILES": {"type": () => {return new abap.types.Character(4);}, "is_optional": " "}}},
  "SET_CLIENT_SECRET": {"visibility": "U", "parameters": {"I_CLIENT_SECRET": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}};
  #mt_saved_configs;
  #ms_config;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "save": this.save.bind(this),
      "read": this.read.bind(this),
      "set_profiles": this.set_profiles.bind(this),
      "set_client_secret": this.set_client_secret.bind(this),
    };
    this.mt_saved_configs = cl_oa2c_config_writer_api.mt_saved_configs;
    this.#ms_config = new abap.types.Structure({
    "configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
    "client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
    "client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
    "authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
    "token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
    "target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
    "granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {});
    this.FRIENDS_ACCESS_INSTANCE["ms_config"] = this.#ms_config;
    this.c_granttype_cc = cl_oa2c_config_writer_api.c_granttype_cc;
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async set_client_secret(INPUT) {
    let i_client_secret = INPUT?.i_client_secret;
    if (i_client_secret?.getQualifiedName === undefined || i_client_secret.getQualifiedName() !== "STRING") { i_client_secret = undefined; }
    if (i_client_secret === undefined) { i_client_secret = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.i_client_secret); }
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async set_profiles(INPUT) {
    let it_profiles = INPUT?.it_profiles;
    abap.statements.assert(abap.compare.eq(abap.IntegerFactory.get(1), abap.CharacterFactory.get(4, 'todo')));
  }
  async create(INPUT) {
    return cl_oa2c_config_writer_api.create(INPUT);
  }
  static async create(INPUT) {
    let ro_config_writer_api = new abap.types.ABAPObject({qualifiedName: "CL_OA2C_CONFIG_WRITER_API", RTTIName: "\\CLASS=CL_OA2C_CONFIG_WRITER_API"});
    let i_client_id = INPUT?.i_client_id;
    if (i_client_id?.getQualifiedName === undefined || i_client_id.getQualifiedName() !== "STRING") { i_client_id = undefined; }
    if (i_client_id === undefined) { i_client_id = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.i_client_id); }
    let i_client_secret = INPUT?.i_client_secret;
    if (i_client_secret?.getQualifiedName === undefined || i_client_secret.getQualifiedName() !== "STRING") { i_client_secret = undefined; }
    if (i_client_secret === undefined) { i_client_secret = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.i_client_secret); }
    let i_profile = INPUT?.i_profile;
    if (i_profile?.getQualifiedName === undefined || i_profile.getQualifiedName() !== "OA2C_PROFILE") { i_profile = undefined; }
    if (i_profile === undefined) { i_profile = new abap.types.Character(30, {"qualifiedName":"OA2C_PROFILE","ddicName":"OA2C_PROFILE","description":""}).set(INPUT.i_profile); }
    let i_auth_code_allowed = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.i_auth_code_allowed) {i_auth_code_allowed.set(INPUT.i_auth_code_allowed);}
    let i_authentication_method = INPUT?.i_authentication_method || new abap.types.Character(4);
    let i_authorization_endpoint = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_authorization_endpoint) {i_authorization_endpoint.set(INPUT.i_authorization_endpoint);}
    let i_clock_skew_tolerance = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.i_clock_skew_tolerance) {i_clock_skew_tolerance.set(INPUT.i_clock_skew_tolerance);}
    let i_configuration = new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""});
    if (INPUT && INPUT.i_configuration) {i_configuration.set(INPUT.i_configuration);}
    let i_configured_granttype = new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});
    if (INPUT && INPUT.i_configured_granttype) {i_configured_granttype.set(INPUT.i_configured_granttype);}
    if (INPUT === undefined || INPUT.i_configured_granttype === undefined) {i_configured_granttype = abap.IntegerFactory.get(0);}
    let i_proxy_host = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_proxy_host) {i_proxy_host.set(INPUT.i_proxy_host);}
    let i_proxy_port = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_proxy_port) {i_proxy_port.set(INPUT.i_proxy_port);}
    let i_proxy_user = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_proxy_user) {i_proxy_user.set(INPUT.i_proxy_user);}
    let i_redirection_uri_server = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_redirection_uri_server) {i_redirection_uri_server.set(INPUT.i_redirection_uri_server);}
    let i_rs_authentication_method = INPUT?.i_rs_authentication_method || new abap.types.Character(4);
    let i_rt_validity = new abap.types.Integer({qualifiedName: "I"});
    if (INPUT && INPUT.i_rt_validity) {i_rt_validity.set(INPUT.i_rt_validity);}
    let i_saml20_allowed = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    if (INPUT && INPUT.i_saml20_allowed) {i_saml20_allowed.set(INPUT.i_saml20_allowed);}
    let i_saml20_audience = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_saml20_audience) {i_saml20_audience.set(INPUT.i_saml20_audience);}
    let i_saml20_nameid_email_num = INPUT?.i_saml20_nameid_email_num || new abap.types.Character(4);
    let i_target_path = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_target_path) {i_target_path.set(INPUT.i_target_path);}
    let i_token_endpoint = new abap.types.String({qualifiedName: "STRING"});
    if (INPUT && INPUT.i_token_endpoint) {i_token_endpoint.set(INPUT.i_token_endpoint);}
    let it_configured_scopes = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");
    if (INPUT && INPUT.it_configured_scopes) {it_configured_scopes.set(INPUT.it_configured_scopes);}
    abap.statements.assert(abap.compare.eq(i_configured_granttype, cl_oa2c_config_writer_api.c_granttype_cc));
    ro_config_writer_api.set(await (new abap.Classes['CL_OA2C_CONFIG_WRITER_API']()).constructor_());
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().configuration.set(i_configuration);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().client_id.set(i_client_id);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().client_secret.set(i_client_secret);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().authorization_endpoint.set(i_authorization_endpoint);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().token_endpoint.set(i_token_endpoint);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().target_path.set(i_target_path);
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].get().granttype.set(i_configured_granttype);
    return ro_config_writer_api;
  }
  async save() {
    abap.statements.insertInternal({data: this.#ms_config, table: cl_oa2c_config_writer_api.mt_saved_configs});
    abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)));
  }
  async load(INPUT) {
    return cl_oa2c_config_writer_api.load(INPUT);
  }
  static async load(INPUT) {
    let ro_config_writer_api = new abap.types.ABAPObject({qualifiedName: "CL_OA2C_CONFIG_WRITER_API", RTTIName: "\\CLASS=CL_OA2C_CONFIG_WRITER_API"});
    let i_profile = new abap.types.Character(30, {"qualifiedName":"OA2C_PROFILE","ddicName":"OA2C_PROFILE","description":""});
    if (INPUT && INPUT.i_profile) {i_profile.set(INPUT.i_profile);}
    let i_configuration = new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""});
    if (INPUT && INPUT.i_configuration) {i_configuration.set(INPUT.i_configuration);}
    let ls_config = new abap.types.Structure({
    "configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
    "client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
    "client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
    "authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
    "token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
    "target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
    "granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {});
    abap.statements.readTable(cl_oa2c_config_writer_api.mt_saved_configs,{into: ls_config,
      withKey: (i) => {return abap.compare.eq(i.configuration, i_configuration);},
      withKeyValue: [{key: (i) => {return i.configuration}, value: i_configuration}],
      usesTableLine: false,
      withKeySimple: {"configuration": i_configuration}});
    if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
      const unique1216 = await (new abap.Classes['CX_OA2C_CONFIG_NOT_FOUND']()).constructor_();
      unique1216.EXTRA_CX = {"INTERNAL_FILENAME": "cl_oa2c_config_writer_api.clas.abap","INTERNAL_LINE": 137};
      throw unique1216;
    }
    ro_config_writer_api.set(await (new abap.Classes['CL_OA2C_CONFIG_WRITER_API']()).constructor_());
    ro_config_writer_api.get().FRIENDS_ACCESS_INSTANCE["ms_config"].set(ls_config);
    return ro_config_writer_api;
  }
  async read(INPUT) {
    let e_auth_code_allowed = INPUT?.e_auth_code_allowed || new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let e_authentication_method = INPUT?.e_authentication_method || new abap.types.String({qualifiedName: "STRING"});
    let e_authorization_endpoint = INPUT?.e_authorization_endpoint || new abap.types.String({qualifiedName: "STRING"});
    let e_client_id = INPUT?.e_client_id || new abap.types.String({qualifiedName: "STRING"});
    let e_client_uuid = INPUT?.e_client_uuid || new abap.types.String({qualifiedName: "STRING"});
    let e_clock_skew_tolerance = INPUT?.e_clock_skew_tolerance || new abap.types.Integer({qualifiedName: "I"});
    let e_configuration = INPUT?.e_configuration || new abap.types.String({qualifiedName: "STRING"});
    let e_configured_grant_type = INPUT?.e_configured_grant_type || new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});
    let e_proxy_host = INPUT?.e_proxy_host || new abap.types.String({qualifiedName: "STRING"});
    let e_proxy_port = INPUT?.e_proxy_port || new abap.types.String({qualifiedName: "STRING"});
    let e_proxy_user = INPUT?.e_proxy_user || new abap.types.String({qualifiedName: "STRING"});
    let e_redirect_uri = INPUT?.e_redirect_uri || new abap.types.String({qualifiedName: "STRING"});
    let e_redirect_uri_host = INPUT?.e_redirect_uri_host || new abap.types.String({qualifiedName: "STRING"});
    let e_redirect_uri_path = INPUT?.e_redirect_uri_path || new abap.types.String({qualifiedName: "STRING"});
    let e_redirect_uri_port = INPUT?.e_redirect_uri_port || new abap.types.Integer({qualifiedName: "I"});
    let e_rs_authentication_method = INPUT?.e_rs_authentication_method || new abap.types.String({qualifiedName: "STRING"});
    let e_rt_validity = INPUT?.e_rt_validity || new abap.types.Integer({qualifiedName: "I"});
    let e_saml20_allowed = INPUT?.e_saml20_allowed || new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let e_saml20_audience = INPUT?.e_saml20_audience || new abap.types.String({qualifiedName: "STRING"});
    let e_saml20_nameid_email = INPUT?.e_saml20_nameid_email || new abap.types.String({qualifiedName: "STRING"});
    let e_saml20_recipient = INPUT?.e_saml20_recipient || new abap.types.String({qualifiedName: "STRING"});
    let e_target_path = INPUT?.e_target_path || new abap.types.String({qualifiedName: "STRING"});
    let e_token_endpoint = INPUT?.e_token_endpoint || new abap.types.String({qualifiedName: "STRING"});
    let es_oa2c_admin = INPUT?.es_oa2c_admin || new abap.types.String({qualifiedName: "STRING"});
    let et_profiles = INPUT?.et_profiles || new abap.types.String({qualifiedName: "STRING"});
    let et_configured_scopes = INPUT?.et_configured_scopes || abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"isUnique":false,"type":"STANDARD","keyFields":[],"name":"primary_key"},"secondary":[]}, "STRING_TABLE");
    let e_configured_granttype = INPUT?.e_configured_granttype || new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});
    e_client_id.set(this.#ms_config.get().client_id);
    e_authorization_endpoint.set(this.#ms_config.get().authorization_endpoint);
    e_token_endpoint.set(this.#ms_config.get().token_endpoint);
    e_target_path.set(this.#ms_config.get().target_path);
    e_configured_granttype.set(this.#ms_config.get().granttype);
  }
}
abap.Classes['CL_OA2C_CONFIG_WRITER_API'] = cl_oa2c_config_writer_api;
cl_oa2c_config_writer_api.mt_saved_configs = abap.types.TableFactory.construct(new abap.types.Structure({
"configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
"client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
"client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
"authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
"token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
"target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
"granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["CONFIGURATION"]},"secondary":[]}, "");
cl_oa2c_config_writer_api.c_granttype_cc = new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"});
cl_oa2c_config_writer_api.c_granttype_cc.set(4);
cl_oa2c_config_writer_api.ty_config = new abap.types.Structure({
"configuration": new abap.types.Character(32, {"qualifiedName":"OA2C_CONFIGURATION","ddicName":"OA2C_CONFIGURATION","description":""}),
"client_id": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_ID"}),
"client_secret": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-CLIENT_SECRET"}),
"authorization_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-AUTHORIZATION_ENDPOINT"}),
"token_endpoint": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TOKEN_ENDPOINT"}),
"target_path": new abap.types.String({qualifiedName: "CL_OA2C_CONFIG_WRITER_API=>TY_CONFIG-TARGET_PATH"}),
"granttype": new abap.types.Integer({qualifiedName: "OA2C_GRANTTYPE"})}, "cl_oa2c_config_writer_api=>ty_config", undefined, {}, {});
export {cl_oa2c_config_writer_api};