All files / output zcl_abapgit_data_deserializer.clas.mjs

34.5% Statements 167/484
47.05% Branches 8/17
13.88% Functions 5/36
34.5% Lines 167/484

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 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 4841x 1x 1x 1x 1x 1x 1x 1x       1x 1x                         1x 1x 1x 1x   1x 1x                         1x 1x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 4x 1x 4x 4x 4x 1x                                                     1x                               1x                                         1x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 3x 2x 2x 2x 2x 1x 1x 1x 1x 1x 1x 2x 3x 3x 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 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 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 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_data_deserializer.clas.abap
class zcl_abapgit_data_deserializer {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_DATA_DESERIALIZER';
  static IMPLEMENTED_INTERFACES = ["ZIF_ABAPGIT_DATA_DESERIALIZER"];
  static ATTRIBUTES = {};
  static METHODS = {"CONVERT_JSON_TO_ITAB": {"visibility": "I", "parameters": {"IS_FILE": {"type": () => {return new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
  "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {});}, "is_optional": " "}, "IR_DATA": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}},
  "PREVIEW_DATABASE_CHANGES": {"visibility": "I", "parameters": {"RS_RESULT": {"type": () => {return new abap.types.Structure({
  "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
  "name": new abap.types.Character(40, {}),
  "deletes": new abap.types.DataReference(new abap.types.Character(4)),
  "updates": new abap.types.DataReference(new abap.types.Character(4)),
  "inserts": new abap.types.DataReference(new abap.types.Character(4)),
  "file": new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
  "config": new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {});}, "is_optional": " "}, "IV_NAME": {"type": () => {return new abap.types.Character(40, {});}, "is_optional": " "}, "IR_LC_DATA": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}, "IR_DB_DATA": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}},
  "WRITE_DATABASE_TABLE": {"visibility": "I", "parameters": {"IV_NAME": {"type": () => {return new abap.types.Character(40, {});}, "is_optional": " "}, "IR_DEL": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}, "IR_INS": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}, "IR_UPD": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}}},
  "READ_DATABASE_TABLE": {"visibility": "I", "parameters": {"RR_DATA": {"type": () => {return new abap.types.DataReference(new abap.types.Character(4));}, "is_optional": " "}, "IV_NAME": {"type": () => {return new abap.types.Character(40, {});}, "is_optional": " "}, "IT_WHERE": {"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": " "}}},
  "DETERMINE_TRANSPORT_REQUEST": {"visibility": "I", "parameters": {"RV_TRANSPORT_REQUEST": {"type": () => {return new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"});}, "is_optional": " "}, "II_REPO": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"});}, "is_optional": " "}, "IV_TRANSPORT_TYPE": {"type": () => {return new abap.types.Structure({
  "request": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"}),
  "task": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"})}, "zif_abapgit_definitions=>ty_transport_type", undefined, {}, {});}, "is_optional": " "}}},
  "IS_TABLE_ALLOWED_TO_EDIT": {"visibility": "I", "parameters": {"RV_ALLOWED_TO_EDIT": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IS_RESULT": {"type": () => {return new abap.types.Structure({
  "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
  "name": new abap.types.Character(40, {}),
  "deletes": new abap.types.DataReference(new abap.types.Character(4)),
  "updates": new abap.types.DataReference(new abap.types.Character(4)),
  "inserts": new abap.types.DataReference(new abap.types.Character(4)),
  "file": new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
  "config": new abap.types.Structure({
  "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
  "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
  "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {});}, "is_optional": " "}}}};
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "convert_json_to_itab": this.#convert_json_to_itab.bind(this),
      "preview_database_changes": this.#preview_database_changes.bind(this),
      "write_database_table": this.#write_database_table.bind(this),
      "read_database_table": this.#read_database_table.bind(this),
      "determine_transport_request": this.#determine_transport_request.bind(this),
      "is_table_allowed_to_edit": this.#is_table_allowed_to_edit.bind(this),
    };
  }
  async constructor_(INPUT) {
    if (super.constructor_) { await super.constructor_(INPUT); }
    return this;
  }
  async #convert_json_to_itab(INPUT) {
    let is_file = INPUT?.is_file;
    if (is_file?.getQualifiedName === undefined || is_file.getQualifiedName() !== "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE") { is_file = undefined; }
    if (is_file === undefined) { is_file = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}).set(INPUT.is_file); }
    let ir_data = INPUT?.ir_data;
    if (ir_data === undefined) { ir_data = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_data); }
    let lo_ajson = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_AJSON", RTTIName: "\\CLASS=ZCL_ABAPGIT_AJSON"});
    let lx_ajson = new abap.types.ABAPObject({qualifiedName: "ZCX_ABAPGIT_AJSON_ERROR", RTTIName: "\\CLASS=ZCX_ABAPGIT_AJSON_ERROR"});
    let fs_lg_tab_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    abap.statements.assign({target: fs_lg_tab_, source: ir_data.dereference()});
    try {
      lo_ajson.set((await abap.Classes['ZCL_ABAPGIT_AJSON'].parse({iv_json: (await abap.Classes['ZCL_ABAPGIT_CONVERT'].xstring_to_string_utf8({iv_data: is_file.get().data}))})));
      await lo_ajson.get().zif_abapgit_ajson$to_abap_corresponding_only();
      await lo_ajson.get().zif_abapgit_ajson$to_abap({ev_container: fs_lg_tab_});
    } catch (e) {
      if ((abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'] && e instanceof abap.Classes['ZCX_ABAPGIT_AJSON_ERROR'])) {
        lx_ajson.set(e);
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: (await lx_ajson.get().if_message$get_text())});
      } else {
        throw e;
      }
    }
  }
  async #determine_transport_request(INPUT) {
    let rv_transport_request = new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"});
    let ii_repo = INPUT?.ii_repo;
    if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; }
    if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); }
    let iv_transport_type = INPUT?.iv_transport_type;
    if (iv_transport_type?.getQualifiedName === undefined || iv_transport_type.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_TRANSPORT_TYPE") { iv_transport_type = undefined; }
    if (iv_transport_type === undefined) { iv_transport_type = new abap.types.Structure({
    "request": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"}),
    "task": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"})}, "zif_abapgit_definitions=>ty_transport_type", undefined, {}, {}).set(INPUT.iv_transport_type); }
    let li_exit = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_EXIT", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_EXIT"});
    li_exit.set((await abap.Classes['ZCL_ABAPGIT_EXIT'].get_instance()));
    rv_transport_request.set(((await ii_repo.get().zif_abapgit_repo$get_local_settings())).get().customizing_request);
    await li_exit.get().zif_abapgit_exit$determine_transport_request({ii_repo: ii_repo, iv_transport_type: iv_transport_type, cv_transport_request: rv_transport_request});
    return rv_transport_request;
  }
  async #is_table_allowed_to_edit(INPUT) {
    let rv_allowed_to_edit = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let is_result = INPUT?.is_result;
    if (is_result?.getQualifiedName === undefined || is_result.getQualifiedName() !== "ZIF_ABAPGIT_DATA_DESERIALIZER=>TY_RESULT") { is_result = undefined; }
    if (is_result === undefined) { is_result = new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {}).set(INPUT.is_result); }
    rv_allowed_to_edit.set((await (await abap.Classes['ZCL_ABAPGIT_DATA_FACTORY'].get_supporter()).get().zif_abapgit_data_supporter$is_object_supported({iv_type: is_result.get().type, iv_name: is_result.get().name})));
    return rv_allowed_to_edit;
  }
  async #preview_database_changes(INPUT) {
    let rs_result = new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {});
    let iv_name = INPUT?.iv_name;
    if (iv_name === undefined) { iv_name = new abap.types.Character(40, {}).set(INPUT.iv_name); }
    let ir_lc_data = INPUT?.ir_lc_data;
    if (ir_lc_data === undefined) { ir_lc_data = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_lc_data); }
    let ir_db_data = INPUT?.ir_db_data;
    if (ir_db_data === undefined) { ir_db_data = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_db_data); }
    let fs_lg_old_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lg_new_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_ls_del_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_ls_ins_ = new abap.types.FieldSymbol(new abap.types.Character(4));
    let fs_lg_del_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lg_ins_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lg_upd_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    abap.statements.assign({target: fs_lg_old_, source: ir_db_data.dereference()});
    abap.statements.assign({target: fs_lg_new_, source: ir_lc_data.dereference()});
    rs_result.get().type.set(abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_data_type.get().tabu);
    rs_result.get().name.set(iv_name);
    rs_result.get().deletes.set((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_table_itab({iv_name: iv_name})));
    rs_result.get().inserts.set((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_table_itab({iv_name: iv_name})));
    rs_result.get().updates.set((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_table_itab({iv_name: iv_name})));
    abap.statements.assign({target: fs_lg_del_, source: rs_result.get().deletes.dereference()});
    abap.statements.assign({target: fs_lg_ins_, source: rs_result.get().inserts.dereference()});
    abap.statements.assign({target: fs_lg_upd_, source: rs_result.get().updates.dereference()});
    fs_lg_del_.set(fs_lg_old_);
    fs_lg_ins_.set(fs_lg_new_);
    for await (const unique59 of abap.statements.loop(fs_lg_del_)) {
      fs_ls_del_.assign(unique59);
      abap.statements.readTable(fs_lg_ins_,{from: fs_ls_del_,
        assigning: fs_ls_ins_});
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        if (abap.compare.ne(fs_ls_del_, fs_ls_ins_)) {
          abap.statements.insertInternal({data: fs_ls_ins_, table: fs_lg_upd_});
        }
        await abap.statements.deleteInternal(fs_lg_del_,{fromValue: fs_ls_del_});
        await abap.statements.deleteInternal(fs_lg_ins_,{fromValue: fs_ls_ins_});
      }
    }
    return rs_result;
  }
  async #read_database_table(INPUT) {
    let rr_data = new abap.types.DataReference(new abap.types.Character(4));
    let iv_name = INPUT?.iv_name;
    if (iv_name === undefined) { iv_name = new abap.types.Character(40, {}).set(INPUT.iv_name); }
    let it_where = INPUT?.it_where;
    if (it_where?.getQualifiedName === undefined || it_where.getQualifiedName() !== "STRING_TABLE") { it_where = undefined; }
    if (it_where === undefined) { it_where = 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").set(INPUT.it_where); }
    let lv_where = new abap.types.String({qualifiedName: "STRING"});
    let fs_lg_tab_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    rr_data.set((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_table_itab({iv_name: iv_name})));
    abap.statements.assign({target: fs_lg_tab_, source: rr_data.dereference()});
    for await (const unique60 of abap.statements.loop(it_where)) {
      lv_where.set(unique60);
      await abap.statements.select(fs_lg_tab_, {select: "SELECT * FROM " + abap.buildDbTableName(iv_name.get().trimEnd().toLowerCase()) + " WHERE " + abap.expandDynamic(lv_where.get(), (name) => {try { return eval(name);} catch {}}) + " ORDER BY PRIMARY KEY"}, {appending: true});
    }
    if (abap.compare.eq(abap.builtin.lines({val: it_where}), abap.IntegerFactory.get(0))) {
      await abap.statements.select(fs_lg_tab_, {select: "SELECT * FROM " + abap.buildDbTableName(iv_name.get().trimEnd().toLowerCase()) + " ORDER BY PRIMARY KEY"});
    }
    return rr_data;
  }
  async #write_database_table(INPUT) {
    let iv_name = INPUT?.iv_name;
    if (iv_name === undefined) { iv_name = new abap.types.Character(40, {}).set(INPUT.iv_name); }
    let ir_del = INPUT?.ir_del;
    if (ir_del === undefined) { ir_del = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_del); }
    let ir_ins = INPUT?.ir_ins;
    if (ir_ins === undefined) { ir_ins = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_ins); }
    let ir_upd = INPUT?.ir_upd;
    if (ir_upd === undefined) { ir_upd = new abap.types.DataReference(new abap.types.Character(4)).set(INPUT.ir_upd); }
    let fs_lg_del_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lg_ins_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lg_upd_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    if (abap.compare.eq((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].does_table_exist({iv_name: iv_name})), abap.builtin.abap_false)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Table ${abap.templateFormatting(iv_name)} not found for data deserialization`)});
    }
    abap.statements.assign({target: fs_lg_del_, source: ir_del.dereference()});
    abap.statements.assign({target: fs_lg_ins_, source: ir_ins.dereference()});
    abap.statements.assign({target: fs_lg_upd_, source: ir_upd.dereference()});
    if (abap.compare.gt(abap.builtin.lines({val: fs_lg_del_}), abap.IntegerFactory.get(0))) {
      await abap.statements.deleteDatabase(iv_name.get().trimEnd().toLowerCase(), {"table": fs_lg_del_});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Error deleting ${abap.templateFormatting(abap.builtin.lines({val: fs_lg_del_}))} records from table ${abap.templateFormatting(iv_name)}`)});
      }
    }
    if (abap.compare.gt(abap.builtin.lines({val: fs_lg_ins_}), abap.IntegerFactory.get(0))) {
      await abap.statements.insertDatabase(iv_name.get().trimEnd().toLowerCase(), {"table": fs_lg_ins_});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Error inserting ${abap.templateFormatting(abap.builtin.lines({val: fs_lg_ins_}))} records into table ${abap.templateFormatting(iv_name)}`)});
      }
    }
    if (abap.compare.gt(abap.builtin.lines({val: fs_lg_upd_}), abap.IntegerFactory.get(0))) {
      await abap.statements.updateDatabase(iv_name.get().trimEnd().toLowerCase(), {});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Error updating ${abap.templateFormatting(abap.builtin.lines({val: fs_lg_upd_}))} records into table ${abap.templateFormatting(iv_name)}`)});
      }
    }
  }
  async zif_abapgit_data_deserializer$actualize(INPUT) {
    let rt_accessed_files = abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zif_abapgit_git_definitions=>ty_file_signatures_tt");
    let is_checks = INPUT?.is_checks;
    if (is_checks?.getQualifiedName === undefined || is_checks.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_DESERIALIZE_CHECKS") { is_checks = undefined; }
    if (is_checks === undefined) { is_checks = new abap.types.Structure({
    "overwrite": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"}),
    "state": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_definitions=>ty_overwrite-state"}),
    "action": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-ACTION"}),
    "icon": new abap.types.Character(4, {"qualifiedName":"ICON_D","ddicName":"ICON_D","description":"ICON_D"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-TEXT"}),
    "decision": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"})}, "zif_abapgit_definitions=>ty_overwrite", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"object_type_and_name","type":"HASHED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]}]}, "zif_abapgit_definitions=>ty_overwrite_tt"),
    "warning_package": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"}),
    "state": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_definitions=>ty_overwrite-state"}),
    "action": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-ACTION"}),
    "icon": new abap.types.Character(4, {"qualifiedName":"ICON_D","ddicName":"ICON_D","description":"ICON_D"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-TEXT"}),
    "decision": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"})}, "zif_abapgit_definitions=>ty_overwrite", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"object_type_and_name","type":"HASHED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]}]}, "zif_abapgit_definitions=>ty_overwrite_tt"),
    "data_loss": abap.types.TableFactory.construct(new abap.types.Structure({
    "obj_type": new abap.types.Character(4, {}),
    "obj_name": new abap.types.Character(40, {}),
    "devclass": new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}),
    "srcsystem": new abap.types.Character(5, {}),
    "origlang": new abap.types.Character(1, {}),
    "inactive": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "abap_language_version": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"}),
    "state": new abap.types.Character(2, {"qualifiedName":"zif_abapgit_definitions=>ty_overwrite-state"}),
    "action": new abap.types.Integer({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-ACTION"}),
    "icon": new abap.types.Character(4, {"qualifiedName":"ICON_D","ddicName":"ICON_D","description":"ICON_D"}),
    "text": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_DEFINITIONS=>TY_OVERWRITE-TEXT"}),
    "decision": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"})}, "zif_abapgit_definitions=>ty_overwrite", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"object_type_and_name","type":"HASHED","isUnique":true,"keyFields":["OBJ_TYPE","OBJ_NAME"]}]}, "zif_abapgit_definitions=>ty_overwrite_tt"),
    "requirements": new abap.types.Structure({
    "met": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"}),
    "decision": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"})}, "zif_abapgit_definitions=>ty_requirements", undefined, {}, {}),
    "dependencies": new abap.types.Structure({
    "met": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"}),
    "decision": new abap.types.Character(1, {"qualifiedName":"zif_abapgit_definitions=>ty_yes_no"})}, "zif_abapgit_definitions=>ty_dependencies", undefined, {}, {}),
    "transport": new abap.types.Structure({
    "required": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "transport": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "type": new abap.types.Structure({
    "request": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"}),
    "task": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"})}, "zif_abapgit_definitions=>ty_transport_type", undefined, {}, {})}, "zif_abapgit_definitions=>ty_transport", undefined, {}, {}),
    "customizing": new abap.types.Structure({
    "required": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "transport": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "type": new abap.types.Structure({
    "request": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"}),
    "task": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"})}, "zif_abapgit_definitions=>ty_transport_type", undefined, {}, {})}, "zif_abapgit_definitions=>ty_transport", undefined, {}, {})}, "zif_abapgit_definitions=>ty_deserialize_checks", undefined, {}, {}).set(INPUT.is_checks); }
    let it_result = INPUT?.it_result;
    if (it_result?.getQualifiedName === undefined || it_result.getQualifiedName() !== "ZIF_ABAPGIT_DATA_DESERIALIZER=>TY_RESULTS") { it_result = undefined; }
    if (it_result === undefined) { it_result = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TYPE","NAME"]},"secondary":[]}, "zif_abapgit_data_deserializer=>ty_results").set(INPUT.it_result); }
    let ls_result = new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {});
    let li_cts_api = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_CTS_API", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_CTS_API"});
    let fs_lt_ins_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lt_del_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    let fs_lt_upd_ = new abap.types.FieldSymbol(abap.types.TableFactory.construct(new abap.types.Character(4), {"withHeader":false,"keyType":"DEFAULT"}));
    li_cts_api.set((await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_cts_api()));
    for await (const unique61 of abap.statements.loop(it_result)) {
      ls_result.set(unique61);
      abap.statements.assert(abap.compare.eq(ls_result.get().type, abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_data_type.get().tabu));
      abap.statements.assert(abap.compare.initial(ls_result.get().name) === false);
      abap.statements.readTable(is_checks.get().overwrite,{keyName: "object_type_and_name",
        withKey: (i) => {return abap.compare.eq(i.obj_type, ls_result.get().type) && abap.compare.eq(i.obj_name, ls_result.get().name) && abap.compare.eq(i.decision, abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_yes);},
        withKeyValue: [{key: (i) => {return i.obj_type}, value: ls_result.get().type},{key: (i) => {return i.obj_name}, value: ls_result.get().name},{key: (i) => {return i.decision}, value: abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_yes}],
        usesTableLine: false,
        withKeySimple: {"obj_type": ls_result.get().type,"obj_name": ls_result.get().name,"decision": abap.Classes['ZIF_ABAPGIT_DEFINITIONS'].zif_abapgit_definitions$c_yes}});
      if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        continue;
      }
      if (abap.compare.eq((await this.#is_table_allowed_to_edit({is_result: ls_result})), abap.builtin.abap_false)) {
        await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: new abap.types.String().set(`Table ${abap.templateFormatting(ls_result.get().name)} not supported for updating data`)});
      }
      await this.#write_database_table({iv_name: ls_result.get().name, ir_del: ls_result.get().deletes, ir_ins: ls_result.get().inserts, ir_upd: ls_result.get().updates});
      abap.statements.assign({target: fs_lt_ins_, source: ls_result.get().inserts.dereference()});
      abap.statements.assign({target: fs_lt_del_, source: ls_result.get().deletes.dereference()});
      abap.statements.assign({target: fs_lt_upd_, source: ls_result.get().updates.dereference()});
      if (abap.compare.eq((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].is_customizing_table({iv_name: ls_result.get().name})), abap.builtin.abap_true)) {
        await li_cts_api.get().zif_abapgit_cts_api$create_transport_entries({iv_transport: is_checks.get().customizing.get().transport, it_table_ins: fs_lt_ins_, it_table_upd: fs_lt_upd_, it_table_del: fs_lt_del_, iv_tabname: new abap.types.String().set(`${abap.templateFormatting(ls_result.get().name)}`)});
      } else if (abap.compare.eq((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].is_application_table({iv_name: ls_result.get().name})), abap.builtin.abap_true)) {
        await li_cts_api.get().zif_abapgit_cts_api$create_transport_entries({iv_transport: is_checks.get().transport.get().transport, it_table_ins: fs_lt_ins_, it_table_upd: fs_lt_upd_, it_table_del: fs_lt_del_, iv_tabname: new abap.types.String().set(`${abap.templateFormatting(ls_result.get().name)}`)});
      }
      abap.statements.insertInternal({data: ls_result.get().file, table: rt_accessed_files});
      abap.statements.insertInternal({data: ls_result.get().config, table: rt_accessed_files});
    }
    return rt_accessed_files;
  }
  async zif_abapgit_data_deserializer$deserialize(INPUT) {
    let rt_result = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":["TYPE","NAME"]},"secondary":[]}, "zif_abapgit_data_deserializer=>ty_results");
    let ii_config = INPUT?.ii_config;
    if (ii_config?.getQualifiedName === undefined || ii_config.getQualifiedName() !== "ZIF_ABAPGIT_DATA_CONFIG") { ii_config = undefined; }
    if (ii_config === undefined) { ii_config = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_DATA_CONFIG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_DATA_CONFIG"}).set(INPUT.ii_config); }
    let it_files = INPUT?.it_files;
    if (it_files?.getQualifiedName === undefined || it_files.getQualifiedName() !== "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILES_TT") { it_files = undefined; }
    if (it_files === undefined) { it_files = abap.types.TableFactory.construct(new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[{"name":"file_path","type":"SORTED","isUnique":true,"keyFields":["PATH","FILENAME"]},{"name":"file","type":"SORTED","isUnique":false,"keyFields":["FILENAME"]}]}, "zif_abapgit_git_definitions=>ty_files_tt").set(INPUT.it_files); }
    let lt_configs = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "skip_initial": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "where": 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")}, "zif_abapgit_data_config=>ty_config", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["TYPE","NAME"]},"secondary":[]}, "zif_abapgit_data_config=>ty_config_tt");
    let ls_config = new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "skip_initial": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "where": 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")}, "zif_abapgit_data_config=>ty_config", undefined, {}, {});
    let lr_lc_data = new abap.types.DataReference(new abap.types.Character(4));
    let lr_db_data = new abap.types.DataReference(new abap.types.Character(4));
    let ls_file = new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"}),
    "data": new abap.types.XString({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE-DATA"})}, "zif_abapgit_git_definitions=>ty_file", undefined, {}, {});
    let ls_result = new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "deletes": new abap.types.DataReference(new abap.types.Character(4)),
    "updates": new abap.types.DataReference(new abap.types.Character(4)),
    "inserts": new abap.types.DataReference(new abap.types.Character(4)),
    "file": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {}),
    "config": new abap.types.Structure({
    "path": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-PATH"}),
    "filename": new abap.types.String({qualifiedName: "ZIF_ABAPGIT_GIT_DEFINITIONS=>TY_FILE_SIGNATURE-FILENAME"}),
    "sha1": new abap.types.Character(40, {"qualifiedName":"zif_abapgit_git_definitions=>ty_sha1"})}, "zif_abapgit_git_definitions=>ty_file_signature", undefined, {}, {})}, "zif_abapgit_data_deserializer=>ty_result", undefined, {}, {});
    lt_configs.set((await ii_config.get().zif_abapgit_data_config$get_configs()));
    for await (const unique62 of abap.statements.loop(lt_configs)) {
      ls_config.set(unique62);
      abap.statements.assert(abap.compare.eq(ls_config.get().type, abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_data_type.get().tabu));
      abap.statements.assert(abap.compare.initial(ls_config.get().name) === false);
      lr_lc_data.set((await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_table_itab({iv_name: ls_config.get().name})));
      const unique63 = (await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_data_filename({is_config: ls_config}));
      abap.statements.readTable(it_files,{keyName: "file_path",
        into: ls_file,
        withKey: (i) => {return abap.compare.eq(i.path, abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path) && abap.compare.eq(i.filename, unique63);},
        withKeyValue: [{key: (i) => {return i.path}, value: abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path},{key: (i) => {return i.filename}, value: unique63}],
        usesTableLine: false,
        withKeySimple: {"path": abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path,"filename": unique63}});
      if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) {
        await this.#convert_json_to_itab({ir_data: lr_lc_data, is_file: ls_file});
        lr_db_data.set((await this.#read_database_table({iv_name: ls_config.get().name, it_where: ls_config.get().where})));
        ls_result.set((await this.#preview_database_changes({iv_name: ls_config.get().name, ir_lc_data: lr_lc_data, ir_db_data: lr_db_data})));
        abap.statements.moveCorresponding(ls_file, ls_result.get().file);
        const unique64 = (await abap.Classes['ZCL_ABAPGIT_DATA_UTILS'].build_config_filename({is_config: ls_config}));
        abap.statements.readTable(it_files,{keyName: "file_path",
          into: ls_file,
          withKey: (i) => {return abap.compare.eq(i.path, abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path) && abap.compare.eq(i.filename, unique64);},
          withKeyValue: [{key: (i) => {return i.path}, value: abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path},{key: (i) => {return i.filename}, value: unique64}],
          usesTableLine: false,
          withKeySimple: {"path": abap.Classes['ZIF_ABAPGIT_DATA_CONFIG'].zif_abapgit_data_config$c_default_path,"filename": unique64}});
        abap.statements.assert(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)));
        abap.statements.moveCorresponding(ls_file, ls_result.get().config);
        abap.statements.insertInternal({data: ls_result, table: rt_result});
      }
    }
    return rt_result;
  }
  async zif_abapgit_data_deserializer$deserialize_check(INPUT) {
    let rs_checks = new abap.types.Structure({
    "required": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "transport": new abap.types.Character(20, {"qualifiedName":"TRKORR","ddicName":"TRKORR","description":"TRKORR"}),
    "type": new abap.types.Structure({
    "request": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"}),
    "task": new abap.types.Character(1, {"qualifiedName":"TRFUNCTION","ddicName":"TRFUNCTION","description":"TRFUNCTION"})}, "zif_abapgit_definitions=>ty_transport_type", undefined, {}, {})}, "zif_abapgit_definitions=>ty_transport", undefined, {}, {});
    let ii_repo = INPUT?.ii_repo;
    if (ii_repo?.getQualifiedName === undefined || ii_repo.getQualifiedName() !== "ZIF_ABAPGIT_REPO") { ii_repo = undefined; }
    if (ii_repo === undefined) { ii_repo = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_REPO", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_REPO"}).set(INPUT.ii_repo); }
    let ii_config = INPUT?.ii_config;
    if (ii_config?.getQualifiedName === undefined || ii_config.getQualifiedName() !== "ZIF_ABAPGIT_DATA_CONFIG") { ii_config = undefined; }
    if (ii_config === undefined) { ii_config = new abap.types.ABAPObject({qualifiedName: "ZIF_ABAPGIT_DATA_CONFIG", RTTIName: "\\INTERFACE=ZIF_ABAPGIT_DATA_CONFIG"}).set(INPUT.ii_config); }
    let lt_configs = abap.types.TableFactory.construct(new abap.types.Structure({
    "type": new abap.types.Character(4, {"qualifiedName":"zif_abapgit_data_config=>ty_data_type"}),
    "name": new abap.types.Character(40, {}),
    "skip_initial": new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}),
    "where": 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")}, "zif_abapgit_data_config=>ty_config", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"SORTED","isUnique":true,"keyFields":["TYPE","NAME"]},"secondary":[]}, "zif_abapgit_data_config=>ty_config_tt");
    lt_configs.set((await ii_config.get().zif_abapgit_data_config$get_configs()));
    if (abap.compare.initial(lt_configs) === false) {
      rs_checks.get().required.set(abap.builtin.abap_true);
      rs_checks.get().type.get().request.set(abap.Classes['ZIF_ABAPGIT_CTS_API'].zif_abapgit_cts_api$c_transport_type.get().cust_request);
      rs_checks.get().type.get().task.set(abap.Classes['ZIF_ABAPGIT_CTS_API'].zif_abapgit_cts_api$c_transport_type.get().cust_task);
      rs_checks.get().transport.set((await this.#determine_transport_request({ii_repo: ii_repo, iv_transport_type: rs_checks.get().type})));
    }
    return rs_checks;
  }
}
abap.Classes['ZCL_ABAPGIT_DATA_DESERIALIZER'] = zcl_abapgit_data_deserializer;
export {zcl_abapgit_data_deserializer};