All files / output zcl_abapgit_abap_language_vers.clas.mjs

66.53% Statements 165/248
70% Branches 35/50
28.57% Functions 10/35
66.53% Lines 165/248

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 2481x 1x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 1x 1x 1x 1x 1x 1x 1x 1x             20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x     20x 3x 3x 3x 3x 3x 3x               3x 1x   3x 20x 20x 20x 20x 20x 20x 10x 10x 2x 10x 2x 8x 6x 6x 20x 20x 20x                                                                       20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 20x 12x 20x 2x 8x 6x 6x 6x     6x 6x 6x 6x     6x 6x 20x 20x 20x 18x 18x 18x     18x 18x 20x 6x 6x 6x 6x 6x   6x 6x 6x 3x 3x 3x 3x 6x 6x 6x 20x     20x 2x 2x 2x 2x 2x 2x 1x 1x   1x 1x 1x     2x 2x 2x 20x 20x 20x 20x 8x 8x 20x 20x 2x 20x 2x 18x 2x 16x 2x 14x 12x 12x 20x 20x 20x                                         20x 1x 1x 1x 1x 1x 1x 1x 1x
const {cx_root} = await import("./cx_root.clas.mjs");
// zcl_abapgit_abap_language_vers.clas.abap
class zcl_abapgit_abap_language_vers {
  static INTERNAL_TYPE = 'CLAS';
  static INTERNAL_NAME = 'ZCL_ABAPGIT_ABAP_LANGUAGE_VERS';
  static IMPLEMENTED_INTERFACES = [];
  static ATTRIBUTES = {"MO_DOT_ABAPGIT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_DOT_ABAPGIT", RTTIName: "\\CLASS=ZCL_ABAPGIT_DOT_ABAPGIT"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "MV_HAS_ABAP_LANGUAGE_VERS": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "I", "is_constant": " ", "is_class": " "},
  "C_ANY_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "C_NO_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "visibility": "U", "is_constant": "X", "is_class": "X"},
  "C_FEATURE_FLAG": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "visibility": "U", "is_constant": "X", "is_class": "X"}};
  static METHODS = {"GET_DEFAULT_ABAP_LANGUAGE_VERS": {"visibility": "I", "parameters": {"RV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "is_optional": " "}, "IV_OBJECT_TYPE": {"type": () => {return new abap.types.Character(4, {"qualifiedName":"TROBJTYPE","ddicName":"TROBJTYPE","description":"TROBJTYPE"});}, "is_optional": " "}}},
  "GET_ABAP_LANGUAGE_VERS_BY_DEVC": {"visibility": "I", "parameters": {"RV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}}},
  "GET_ABAP_LANGUAGE_VERS_BY_REPO": {"visibility": "I", "parameters": {"RV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}},
  "GET_DESCRIPTION": {"visibility": "I", "parameters": {"RV_DESCRIPTION": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "is_optional": " "}}},
  "CONSTRUCTOR": {"visibility": "U", "parameters": {"IO_DOT_ABAPGIT": {"type": () => {return new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_DOT_ABAPGIT", RTTIName: "\\CLASS=ZCL_ABAPGIT_DOT_ABAPGIT"});}, "is_optional": " "}}},
  "GET_ABAP_LANGUAGE_VERS_BY_OBJT": {"visibility": "U", "parameters": {"RV_ALLOWED_ABAP_LANGU_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "is_optional": " "}, "IV_OBJECT_TYPE": {"type": () => {return new abap.types.Character(4, {"qualifiedName":"TROBJTYPE","ddicName":"TROBJTYPE","description":"TROBJTYPE"});}, "is_optional": " "}, "IV_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}}},
  "GET_REPO_ABAP_LANGUAGE_VERSION": {"visibility": "U", "parameters": {"RV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "is_optional": " "}}},
  "IS_IMPORT_ALLOWED": {"visibility": "U", "parameters": {"RV_ALLOWED": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_PACKAGE": {"type": () => {return new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"});}, "is_optional": " "}}},
  "CHECK_ABAP_LANGUAGE_VERSION": {"visibility": "U", "parameters": {"IV_ABAP_LANGUAGE_VERSION": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});}, "is_optional": " "}, "IS_ITEM": {"type": () => {return 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"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {});}, "is_optional": " "}}}};
  #mo_dot_abapgit;
  #mv_has_abap_language_vers;
  constructor() {
    this.me = new abap.types.ABAPObject();
    this.me.set(this);
    this.INTERNAL_ID = abap.internalIdCounter++;
    this.FRIENDS_ACCESS_INSTANCE = {
      "get_default_abap_language_vers": this.#get_default_abap_language_vers.bind(this),
      "get_abap_language_vers_by_devc": this.#get_abap_language_vers_by_devc.bind(this),
      "get_abap_language_vers_by_repo": this.#get_abap_language_vers_by_repo.bind(this),
      "get_abap_language_vers_by_objt": this.get_abap_language_vers_by_objt.bind(this),
      "get_repo_abap_language_version": this.get_repo_abap_language_version.bind(this),
      "is_import_allowed": this.is_import_allowed.bind(this),
    };
    this.#mo_dot_abapgit = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_DOT_ABAPGIT", RTTIName: "\\CLASS=ZCL_ABAPGIT_DOT_ABAPGIT"});
    this.FRIENDS_ACCESS_INSTANCE["mo_dot_abapgit"] = this.#mo_dot_abapgit;
    this.#mv_has_abap_language_vers = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    this.FRIENDS_ACCESS_INSTANCE["mv_has_abap_language_vers"] = this.#mv_has_abap_language_vers;
    this.c_any_abap_language_version = zcl_abapgit_abap_language_vers.c_any_abap_language_version;
    this.c_no_abap_language_version = zcl_abapgit_abap_language_vers.c_no_abap_language_version;
    this.c_feature_flag = zcl_abapgit_abap_language_vers.c_feature_flag;
  }
  async check_abap_language_version(INPUT) {
    return zcl_abapgit_abap_language_vers.check_abap_language_version(INPUT);
  }
  static async check_abap_language_version(INPUT) {
    let iv_abap_language_version = INPUT?.iv_abap_language_version;
    if (iv_abap_language_version?.getQualifiedName === undefined || iv_abap_language_version.getQualifiedName() !== "ZIF_ABAPGIT_AFF_TYPES_V1=>TY_ABAP_LANGUAGE_VERSION") { iv_abap_language_version = undefined; }
    if (iv_abap_language_version === undefined) { iv_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"}).set(INPUT.iv_abap_language_version); }
    let is_item = INPUT?.is_item;
    if (is_item?.getQualifiedName === undefined || is_item.getQualifiedName() !== "ZIF_ABAPGIT_DEFINITIONS=>TY_ITEM") { is_item = undefined; }
    if (is_item === undefined) { is_item = 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"})}, "zif_abapgit_definitions=>ty_item", undefined, {}, {}).set(INPUT.is_item); }
    if (abap.compare.initial(is_item.get().abap_language_version) === false && abap.compare.ne(iv_abap_language_version, is_item.get().abap_language_version)) {
      await abap.Classes['ZCX_ABAPGIT_EXCEPTION'].raise({iv_text: abap.operators.concat(new abap.types.String().set(`Object ${abap.templateFormatting(is_item.get().obj_type)} ${abap.templateFormatting(is_item.get().obj_name)} has ${abap.templateFormatting((await this.get_description({iv_abap_language_version: iv_abap_language_version})))}`),new abap.types.String().set(` but repository is set to ${abap.templateFormatting((await this.get_description({iv_abap_language_version: is_item.get().abap_language_version})))}`))});
    }
  }
  async constructor_(INPUT) {
    let io_dot_abapgit = INPUT?.io_dot_abapgit;
    if (io_dot_abapgit?.getQualifiedName === undefined || io_dot_abapgit.getQualifiedName() !== "ZCL_ABAPGIT_DOT_ABAPGIT") { io_dot_abapgit = undefined; }
    if (io_dot_abapgit === undefined) { io_dot_abapgit = new abap.types.ABAPObject({qualifiedName: "ZCL_ABAPGIT_DOT_ABAPGIT", RTTIName: "\\CLASS=ZCL_ABAPGIT_DOT_ABAPGIT"}).set(INPUT.io_dot_abapgit); }
    this.#mo_dot_abapgit.set(io_dot_abapgit);
    if (abap.compare.eq((await abap.Classes['ZCL_ABAPGIT_FEATURE'].is_enabled({iv_feature: zcl_abapgit_abap_language_vers.c_feature_flag})), abap.builtin.abap_false)) {
      this.#mv_has_abap_language_vers.set(abap.builtin.abap_undefined);
    } else if (abap.compare.eq((await this.#get_abap_language_vers_by_repo()), abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined)) {
      this.#mv_has_abap_language_vers.set(abap.builtin.abap_undefined);
    } else if (abap.compare.eq((await this.#get_abap_language_vers_by_repo()), abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().ignore)) {
      this.#mv_has_abap_language_vers.set(abap.builtin.abap_false);
    } else {
      this.#mv_has_abap_language_vers.set(abap.builtin.abap_true);
    }
    return this;
  }
  async #get_abap_language_vers_by_devc(INPUT) {
    let rv_abap_language_version = new abap.types.String({qualifiedName: "STRING"});
    let iv_package = INPUT?.iv_package;
    if (iv_package?.getQualifiedName === undefined || iv_package.getQualifiedName() !== "DEVCLASS") { iv_package = undefined; }
    if (iv_package === undefined) { iv_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_package); }
    let lv_class = new abap.types.String({qualifiedName: "STRING"});
    let lv_abap_lang_version_devc = new abap.types.String({qualifiedName: "STRING"});
    let lo_abap_language_version_cfg = new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined});
    lv_class.set(abap.CharacterFactory.get(28, 'CL_ABAP_LANGUAGE_VERSION_CFG'));
    try {
      if (abap.Classes[lv_class.get().trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } }
      lo_abap_language_version_cfg.set(await abap.dynamicCallLookup(abap.Classes[lv_class.get().trimEnd()], "get_instance")());
      if (abap.compare.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_sap_package({iv_package: iv_package})).get().zif_abapgit_sap_package$exists()), abap.builtin.abap_true)) {
        lv_abap_lang_version_devc.set(await abap.dynamicCallLookup(lo_abap_language_version_cfg.get(), "if_abap_language_version_cfg$get_package_default_version")({iv_package_name: iv_package}));
      } else {
        lv_abap_lang_version_devc.set(abap.CharacterFactory.get(1, '-'));
      }
      let unique95 = lv_abap_lang_version_devc;
      if (abap.compare.eq(unique95, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().standard)) {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().standard);
      } else if (abap.compare.eq(unique95, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().key_user)) {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().key_user);
      } else if (abap.compare.eq(unique95, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().cloud_development)) {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().cloud_development);
      } else {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined);
      }
    } catch (e) {
      if ((abap.Classes['CX_ROOT'] && e instanceof abap.Classes['CX_ROOT'])) {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined);
      } else {
        throw e;
      }
    }
    return rv_abap_language_version;
  }
  async get_abap_language_vers_by_objt(INPUT) {
    let rv_allowed_abap_langu_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});
    let iv_object_type = INPUT?.iv_object_type;
    if (iv_object_type?.getQualifiedName === undefined || iv_object_type.getQualifiedName() !== "TROBJTYPE") { iv_object_type = undefined; }
    if (iv_object_type === undefined) { iv_object_type = new abap.types.Character(4, {"qualifiedName":"TROBJTYPE","ddicName":"TROBJTYPE","description":"TROBJTYPE"}).set(INPUT.iv_object_type); }
    let iv_package = INPUT?.iv_package;
    if (iv_package?.getQualifiedName === undefined || iv_package.getQualifiedName() !== "DEVCLASS") { iv_package = undefined; }
    if (iv_package === undefined) { iv_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_package); }
    let lv_class = new abap.types.String({qualifiedName: "STRING"});
    let lo_abap_language_version = new abap.types.ABAPObject({qualifiedName: undefined, RTTIName: undefined});
    if (abap.compare.eq(this.#mv_has_abap_language_vers, abap.builtin.abap_undefined)) {
      rv_allowed_abap_langu_version.set(zcl_abapgit_abap_language_vers.c_any_abap_language_version);
    } else if (abap.compare.eq(this.#mv_has_abap_language_vers, abap.builtin.abap_false)) {
      rv_allowed_abap_langu_version.set(zcl_abapgit_abap_language_vers.c_no_abap_language_version);
    } else {
      lv_class.set(abap.CharacterFactory.get(24, 'CL_ABAP_LANGUAGE_VERSION'));
      try {
        if (abap.Classes[lv_class.get().trimEnd()] === undefined) { if (abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()] === undefined) { throw "CX_SY_DYN_CALL_ILLEGAL_CLASS not found"; } else {throw new abap.Classes['CX_SY_DYN_CALL_ILLEGAL_CLASS'.trimEnd()](); } }
        lo_abap_language_version.set(await abap.dynamicCallLookup(abap.Classes[lv_class.get().trimEnd()], "get_instance")());
        rv_allowed_abap_langu_version.set(await abap.dynamicCallLookup(lo_abap_language_version.get(), "if_abap_language_version$get_default_version")({iv_object_type: iv_object_type,iv_package: iv_package}));
      } catch (e) {
        if ((abap.Classes['CX_ROOT'] && e instanceof abap.Classes['CX_ROOT'])) {
          rv_allowed_abap_langu_version.set((await this.#get_default_abap_language_vers({iv_object_type: iv_object_type})));
        } else {
          throw e;
        }
      }
    }
    return rv_allowed_abap_langu_version;
  }
  async #get_abap_language_vers_by_repo() {
    let rv_abap_language_version = new abap.types.String({qualifiedName: "STRING"});
    rv_abap_language_version.set((await this.#mo_dot_abapgit.get().get_abap_language_version()));
    if (abap.compare.initial(rv_abap_language_version)) {
      rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined);
    }
    return rv_abap_language_version;
  }
  async #get_default_abap_language_vers(INPUT) {
    let rv_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});
    let iv_object_type = INPUT?.iv_object_type;
    if (iv_object_type?.getQualifiedName === undefined || iv_object_type.getQualifiedName() !== "TROBJTYPE") { iv_object_type = undefined; }
    if (iv_object_type === undefined) { iv_object_type = new abap.types.Character(4, {"qualifiedName":"TROBJTYPE","ddicName":"TROBJTYPE","description":"TROBJTYPE"}).set(INPUT.iv_object_type); }
    if (abap.compare.eq((await (await abap.Classes['ZCL_ABAPGIT_FACTORY'].get_environment()).get().zif_abapgit_environment$is_sap_cloud_platform()), abap.builtin.abap_true)) {
      rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_cloud.get().cloud_development);
    } else {
      let unique96 = iv_object_type;
      if (abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'BDEF')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'CLAS')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'FUGR')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'FUGS')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'INTF')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'PROG')) || abap.compare.eq(unique96, abap.CharacterFactory.get(4, 'TYPE'))) {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().standard);
      } else {
        rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().standard);
      }
    }
    return rv_abap_language_version;
  }
  async get_description(INPUT) {
    return zcl_abapgit_abap_language_vers.get_description(INPUT);
  }
  static async get_description(INPUT) {
    let rv_description = new abap.types.String({qualifiedName: "STRING"});
    let iv_abap_language_version = INPUT?.iv_abap_language_version;
    if (iv_abap_language_version?.getQualifiedName === undefined || iv_abap_language_version.getQualifiedName() !== "ZIF_ABAPGIT_AFF_TYPES_V1=>TY_ABAP_LANGUAGE_VERSION") { iv_abap_language_version = undefined; }
    if (iv_abap_language_version === undefined) { iv_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"}).set(INPUT.iv_abap_language_version); }
    let unique97 = iv_abap_language_version;
    if (abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().standard) || abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().standard)) {
      rv_description.set(abap.CharacterFactory.get(13, 'Standard ABAP'));
    } else if (abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().key_user) || abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().key_user)) {
      rv_description.set(abap.CharacterFactory.get(18, 'ABAP for Key Users'));
    } else if (abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version.get().cloud_development) || abap.compare.eq(unique97, abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().cloud_development)) {
      rv_description.set(abap.CharacterFactory.get(26, 'ABAP for Cloud Development'));
    } else {
      rv_description.set(abap.CharacterFactory.get(9, 'Undefined'));
    }
    rv_description.set(new abap.types.String().set(`ABAP language version "${abap.templateFormatting(rv_description)}"`));
    return rv_description;
  }
  async get_repo_abap_language_version() {
    let rv_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});
    let lv_abap_language_version = new abap.types.String({qualifiedName: "STRING"});
    if (abap.compare.ne(this.#mv_has_abap_language_vers, abap.builtin.abap_undefined)) {
      lv_abap_language_version.set((await this.#mo_dot_abapgit.get().get_abap_language_version()));
    }
    let unique98 = lv_abap_language_version;
    if (abap.compare.eq(unique98, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().standard)) {
      rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().standard);
    } else if (abap.compare.eq(unique98, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().key_user)) {
      rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().key_user);
    } else if (abap.compare.eq(unique98, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().cloud_development)) {
      rv_abap_language_version.set(abap.Classes['ZIF_ABAPGIT_AFF_TYPES_V1'].zif_abapgit_aff_types_v1$co_abap_language_version_src.get().cloud_development);
    } else if (abap.compare.eq(unique98, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().ignore)) {
      rv_abap_language_version.set(zcl_abapgit_abap_language_vers.c_no_abap_language_version);
    } else {
      rv_abap_language_version.set(zcl_abapgit_abap_language_vers.c_any_abap_language_version);
    }
    return rv_abap_language_version;
  }
  async is_import_allowed(INPUT) {
    let rv_allowed = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});
    let iv_package = INPUT?.iv_package;
    if (iv_package?.getQualifiedName === undefined || iv_package.getQualifiedName() !== "DEVCLASS") { iv_package = undefined; }
    if (iv_package === undefined) { iv_package = new abap.types.Character(30, {"qualifiedName":"DEVCLASS","ddicName":"DEVCLASS","description":"DEVCLASS"}).set(INPUT.iv_package); }
    let lv_package_version = new abap.types.String({qualifiedName: "STRING"});
    lv_package_version.set((await this.#get_abap_language_vers_by_devc({iv_package: iv_package})));
    let unique99 = (await this.#get_abap_language_vers_by_repo());
    if (abap.compare.eq(unique99, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined) || abap.compare.eq(unique99, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().ignore)) {
      rv_allowed.set(abap.builtin.abap_true);
    } else {
      if (abap.compare.eq((await this.#get_abap_language_vers_by_repo()), lv_package_version)) {
        rv_allowed.set(abap.builtin.abap_true);
      } else if (abap.compare.eq(lv_package_version, abap.Classes['ZIF_ABAPGIT_DOT_ABAPGIT'].zif_abapgit_dot_abapgit$c_abap_language_version.get().undefined)) {
        rv_allowed.set(abap.builtin.abap_true);
      } else {
        rv_allowed.set(abap.builtin.abap_false);
      }
    }
    return rv_allowed;
  }
}
abap.Classes['ZCL_ABAPGIT_ABAP_LANGUAGE_VERS'] = zcl_abapgit_abap_language_vers;
zcl_abapgit_abap_language_vers.c_any_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});
zcl_abapgit_abap_language_vers.c_any_abap_language_version.set('*');
zcl_abapgit_abap_language_vers.c_no_abap_language_version = new abap.types.Character(1, {"qualifiedName":"zif_abapgit_aff_types_v1=>ty_abap_language_version"});
zcl_abapgit_abap_language_vers.c_no_abap_language_version.set('-');
zcl_abapgit_abap_language_vers.c_feature_flag = new abap.types.String({qualifiedName: "STRING"});
zcl_abapgit_abap_language_vers.c_feature_flag.set('ALAV');
export {zcl_abapgit_abap_language_vers};