<commit_before>{{#models}}{{#model}}

/**
 * The {{classname}} model module.
 * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
 */
export default class {{{classname}}} {{#interfaceModels}}extends {{{classname}}}{{/interfaceModels}} {
    /**
     * Constructs a new "{{{classname}}}".
    {{#description}}
     * {{description}}
    {{/description}}
     * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
     * @class
    {{#vars}}{{#required}}
     * @param {{name}} { {{&vendorExtensions.x-jsdoc-type}} }{{#description}} {{&description}}{{/description}}
    {{/required}}{{/vars}}
     */
    constructor(
    {{#vars}}{{#required}}
        {{name}},
    {{/required}}{{/vars}}
    ) {
        {{#useInheritance}}
            {{#interfaceModels}}
        super(
                {{#vars}}{{#required}}
            {{name}},
                {{/required}}{{/vars}}
        );
            {{/interfaceModels}}
        {{/useInheritance}}

        {{#vars}}
            {{#required}}
        this.{{name}} = {{name}};
            {{/required}}
            {{^required}}
                {{#defaultValue}}
        this.{{name}} = {{&defaultValue}};
                {{/defaultValue}}
                {{^defaultValue}}
                    {{#isContainer}}
        this.{{name}} = [];
                    {{/isContainer}}
                    {{^isContainer}}
        this.{{name}} = null;
                    {{/isContainer}}
                {{/defaultValue}}
            {{/required}}
        {{/vars}}

        {{#vars}}
            {{#complexType}}
        this.{{&name}}Type = {{&complexType}};
            {{/complexType}}
        {{/vars}}
    }

    /**
     * Constructs a "{{{classname}}}" from a plain JavaScript object.
     * @param { object } data The plain JavaScript object bearing properties of interest.
     * @param { module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{&classname}} } object Optional instance to populate.
     * @return { module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{&classname}} } The populated "{{{classname}}}" instance.
     */
    static constructFromData(
        data,
        object = null,
    ) {
        if (data === null) {
            throw new Error('No data to build object');
        }

        if (object === null) {
            object = new {{&classname}}();
        }

        {{#interfaceModels}}
        object = super.constructFromData(data, object);
        {{/interfaceModels}}

{{=// \\=}}
//!
        {{#vars}}
        if (data.hasOwnProperty('{{baseName}}')) {
            object['{{baseName}}']{{{defaultValueWithParam}}}
        }
        {{/vars}}
\\
//={{ }}=\\

        {{#vars}}
            if (data.hasOwnProperty('{{&baseName}}')) {
            {{#complexType}}
                {{#isListContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], [object.{{&name}}Type]);
                {{/isListContainer}}
                {{#isMapContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], { 'String': object.{{&name}}Type });
                {{/isMapContainer}}
                {{^isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], object.{{&name}}Type);
                {{/isContainer}}
            {{/complexType}}
            {{^complexType}}
                {{#isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], '[\'{{#items}}{{&baseType}}{{/items}}\']');
                {{/isContainer}}
                {{^isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], '{{&baseType}}');
                {{/isContainer}}
            {{/complexType}}
            }
        {{/vars}}

        return object;
    }

    {{#emitModelMethods}}{{#vars}}
    /**
        {{#description}}
     * Returns {{&description}}
        {{/description}}
        {{#minimum}}
     * minimum: {{minimum}}
        {{/minimum}}
        {{#maximum}}
     * maximum: {{maximum}}
        {{/maximum}}
     * @return { {{&vendorExtensions.x-jsdoc-type}} }
     */
    {{getter}}() {
        return this.{{name}};
    }

        {{#isReadOnly}}
    /**
            {{#description}}
     * Sets {{&description}}
            {{/description}}
     * @param { {{&vendorExtensions.x-jsdoc-type}} } {{name}}{{#description}} {{&description}}{{/description}}
     */
    {{setter}}({{name}}) {
        this.{{name}} = {{name}};
    }
        {{/isReadOnly}}
    {{/vars}}{{/emitModelMethods}}

    {{#vars}}
        {{#isEnum}}
            {{^isContainer}}
    {{>partial_model_inner_enum}}<commit_msg>Always useInheritance and emitModelMethods in models.<commit_after>{{#models}}{{#model}}

/**
 * The {{classname}} model module.
 * @module {{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
 */
export default class {{{classname}}} {{#interfaceModels}}extends {{{classname}}}{{/interfaceModels}} {
    /**
     * Constructs a new "{{{classname}}}".
    {{#description}}
     * {{description}}
    {{/description}}
     * @alias module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{classname}}
     * @class
    {{#vars}}{{#required}}
     * @param {{name}} { {{&vendorExtensions.x-jsdoc-type}} }{{#description}} {{&description}}{{/description}}
    {{/required}}{{/vars}}
     */
    constructor(
    {{#vars}}{{#required}}
        {{name}},
    {{/required}}{{/vars}}
    ) {
        {{#interfaceModels}}
        super(
          {{#vars}}{{#required}}
            {{name}},
          {{/required}}{{/vars}}
        );
        {{/interfaceModels}}

        {{#vars}}
            {{#required}}
        this.{{name}} = {{name}};
            {{/required}}
            {{^required}}
                {{#defaultValue}}
        this.{{name}} = {{&defaultValue}};
                {{/defaultValue}}
                {{^defaultValue}}
                    {{#isContainer}}
        this.{{name}} = [];
                    {{/isContainer}}
                    {{^isContainer}}
        this.{{name}} = null;
                    {{/isContainer}}
                {{/defaultValue}}
            {{/required}}
        {{/vars}}

        {{#vars}}
            {{#complexType}}
        this.{{&name}}Type = {{&complexType}};
            {{/complexType}}
        {{/vars}}
    }

    /**
     * Constructs a "{{{classname}}}" from a plain JavaScript object.
     * @param { object } data The plain JavaScript object bearing properties of interest.
     * @param { module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{&classname}} } object Optional instance to populate.
     * @return { module:{{#invokerPackage}}{{invokerPackage}}/{{/invokerPackage}}{{#modelPackage}}{{modelPackage}}/{{/modelPackage}}{{&classname}} } The populated "{{{classname}}}" instance.
     */
    static constructFromData(
        data,
        object = null,
    ) {
        if (data === null) {
            throw new Error('No data to build object');
        }

        if (object === null) {
            object = new {{&classname}}();
        }

        {{#interfaceModels}}
        object = super.constructFromData(data, object);
        {{/interfaceModels}}

        {{#vars}}
            if (data.hasOwnProperty('{{&baseName}}')) {
            {{#complexType}}
                {{#isListContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], [object.{{&name}}Type]);
                {{/isListContainer}}
                {{#isMapContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], { 'String': object.{{&name}}Type });
                {{/isMapContainer}}
                {{^isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], object.{{&name}}Type);
                {{/isContainer}}
            {{/complexType}}
            {{^complexType}}
                {{#isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], '[\'{{#items}}{{&baseType}}{{/items}}\']');
                {{/isContainer}}
                {{^isContainer}}
                    object.{{&name}} = ApiClient.convertToType(data["{{&baseName}}"], '{{&baseType}}');
                {{/isContainer}}
            {{/complexType}}
            }
        {{/vars}}

        return object;
    }

    {{#vars}}
      /**
      {{#description}}
       * Gets {{&description}}
      {{/description}}
      {{#minimum}}
       * minimum: {{minimum}}
      {{/minimum}}
      {{#maximum}}
       * maximum: {{maximum}}
      {{/maximum}}
       * @return { {{&vendorExtensions.x-jsdoc-type}} }
       */
      {{getter}}() {
          return this.{{name}};
      }

      {{^isReadOnly}}
      /**
      {{#description}}
       * Sets {{&description}}
      {{/description}}
       * @param { {{&vendorExtensions.x-jsdoc-type}} } {{name}}{{#description}} {{&description}}{{/description}}
       */
      {{setter}}({{name}}) {
          this.{{name}} = {{name}};
      }
      {{/isReadOnly}}
    {{/vars}}

    {{#vars}}
        {{#isEnum}}
            {{^isContainer}}
    {{>partial_model_inner_enum}}
{'fraction_non_alphanumeric': 0.22027754763877383, 'fraction_numerical': 0.0, 'mean_word_length': 2.066687837408701, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5447629', 'n_tokens_mistral': 2826, 'n_tokens_neox': 2729, 'n_words': 405}