All Downloads are FREE. Search and download functionalities are using the official Maven repository.

openapi.templates.kora.javaClientApiOptionalParams.mustache Maven / Gradle / Ivy

The newest version!
    @ru.tinkoff.kora.common.annotation.Generated("openapi generator kora client")
    public record {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs(
{{#vendorExtensions.x-optional-params}}        @Nullable {{{dataType}}} {{paramName}}{{^-last}},{{/-last}}{{#-last}}) { {{/-last}}
{{/vendorExtensions.x-optional-params}}

        public static {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs defaults() {
            return new {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs({{#vendorExtensions.x-optional-params}}{{#defaultValue}}{{#isEnum}}{{{enumDefaultValue}}}{{/isEnum}}{{^isEnum}}{{{defaultValue}}}{{/isEnum}}{{/defaultValue}}{{^defaultValue}}null{{/defaultValue}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-optional-params}});
        }

        public static {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs empty() {
            return new {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs({{#vendorExtensions.x-optional-params}}null{{^-last}}, {{/-last}}{{/vendorExtensions.x-optional-params}});
        }
        {{#vendorExtensions.x-optional-params}}

        public {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs with{{#lambda.titlecase}}{{paramName}}{{/lambda.titlecase}}(@Nullable {{{dataType}}} {{paramName}}) {
            if (this.{{paramName}} == {{paramName}}) return this;
            return new {{#lambda.titlecase}}{{operationId}}{{/lambda.titlecase}}OptArgs({{#vendorExtensions.x-optional-params}}{{paramName}}{{^-last}}, {{/-last}}{{/vendorExtensions.x-optional-params}});
        }
        {{/vendorExtensions.x-optional-params}}
    }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy