diff --git a/.DS_Store b/.DS_Store
new file mode 100644
index 0000000..fb7012c
Binary files /dev/null and b/.DS_Store differ
diff --git a/generate-project.gradle b/generate-project.gradle
new file mode 100644
index 0000000..76dc9fc
--- /dev/null
+++ b/generate-project.gradle
@@ -0,0 +1,102 @@
+
+def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : '17'
+def gradleVersion = project.hasProperty('gradleVersion') ? project.getProperty('gradleVersion') : '8.5'
+def springBootVersion = project.hasProperty('springBootVersion') ? project.getProperty('springBootVersion') : '3.1.0'
+def openApiSpecDir = project.hasProperty('openApiSpecDir') ? project.getProperty('openApiSpecDir') : 'spec/spi'
+def openApiGeneratorVersion = project.hasProperty('openApiGeneratorVersion') ? project.getProperty('openApiGeneratorVersion') : '6.6.0'
+
+task generateSpringBootProject {
+ doLast {
+ def projectDir = file("generated-spring-boot-project")
+ projectDir.mkdirs()
+
+ def buildGradle = new File(projectDir, "build.gradle")
+ buildGradle.text = """
+plugins {
+ id 'java'
+ id 'org.springframework.boot' version '${springBootVersion}'
+ id 'io.spring.dependency-management' version '1.1.0'
+ id 'org.openapi.generator' version '${openApiGeneratorVersion}'
+}
+
+group = 'com.example'
+version = '0.0.1-SNAPSHOT'
+
+java {
+ sourceCompatibility = JavaVersion.VERSION_${javaVersion}
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.springframework.boot:spring-boot-starter-web'
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ implementation 'io.swagger.core.v3:swagger-annotations:2.2.8'
+ implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
+ testImplementation 'org.springframework.boot:spring-boot-starter-test'
+}
+
+def specDir = file("${openApiSpecDir}")
+specDir.eachFile { file ->
+ if (file.name.endsWith('.yml') || file.name.endsWith('.yaml')) {
+ def taskName = "openApiGenerate_" + file.name.replaceAll("[^a-zA-Z0-9]", "_")
+ tasks.create(name: taskName, type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
+ generatorName = "spring"
+ inputSpec = file.absolutePath
+ outputDir = "$buildDir/generated-" + file.name
+ apiPackage = "com.example.api." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ modelPackage = "com.example.model." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ configOptions = [
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ skipDefaultInterface: "true"
+ ]
+ }
+ compileJava.dependsOn tasks.named(taskName)
+ }
+}
+
+tasks.named('test') {
+ useJUnitPlatform()
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ["$buildDir/generated-*/src/main/java", 'src/main/java']
+ }
+ }
+}
+"""
+
+ def settingsGradle = new File(projectDir, "settings.gradle")
+ settingsGradle.text = "rootProject.name = 'spring-boot-openapi-project'"
+
+ def srcDir = new File(projectDir, "src/main/java/com/example")
+ srcDir.mkdirs()
+ def applicationJava = new File(srcDir, "Application.java")
+ applicationJava.text = """
+package com.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
+"""
+
+ exec {
+ workingDir projectDir
+ commandLine 'gradle', 'wrapper', '--gradle-version', gradleVersion
+ }
+
+ println "Spring Boot project generated successfully in 'generated-spring-boot-project' directory."
+ println "To build the project, navigate to the directory and run: ./gradlew build"
+ }
+}
diff --git a/generated-spring-boot-project/.gradle/7.5/checksums/checksums.lock b/generated-spring-boot-project/.gradle/7.5/checksums/checksums.lock
new file mode 100644
index 0000000..15731bf
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/checksums/checksums.lock differ
diff --git a/generated-spring-boot-project/.gradle/7.5/checksums/md5-checksums.bin b/generated-spring-boot-project/.gradle/7.5/checksums/md5-checksums.bin
new file mode 100644
index 0000000..c4617e0
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/checksums/md5-checksums.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/checksums/sha1-checksums.bin b/generated-spring-boot-project/.gradle/7.5/checksums/sha1-checksums.bin
new file mode 100644
index 0000000..e756f45
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/checksums/sha1-checksums.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock b/generated-spring-boot-project/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock
new file mode 100644
index 0000000..9b3c24b
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/dependencies-accessors/dependencies-accessors.lock differ
diff --git a/generated-spring-boot-project/.gradle/7.5/dependencies-accessors/gc.properties b/generated-spring-boot-project/.gradle/7.5/dependencies-accessors/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.bin b/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.bin
new file mode 100644
index 0000000..76a14be
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.lock b/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.lock
new file mode 100644
index 0000000..1f5107c
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/executionHistory/executionHistory.lock differ
diff --git a/generated-spring-boot-project/.gradle/7.5/fileChanges/last-build.bin b/generated-spring-boot-project/.gradle/7.5/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/fileChanges/last-build.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.bin b/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..438c21a
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.lock b/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..f7b0599
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/fileHashes/fileHashes.lock differ
diff --git a/generated-spring-boot-project/.gradle/7.5/fileHashes/resourceHashesCache.bin b/generated-spring-boot-project/.gradle/7.5/fileHashes/resourceHashesCache.bin
new file mode 100644
index 0000000..d502e50
Binary files /dev/null and b/generated-spring-boot-project/.gradle/7.5/fileHashes/resourceHashesCache.bin differ
diff --git a/generated-spring-boot-project/.gradle/7.5/gc.properties b/generated-spring-boot-project/.gradle/7.5/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/generated-spring-boot-project/.gradle/8.10.2/checksums/checksums.lock b/generated-spring-boot-project/.gradle/8.10.2/checksums/checksums.lock
new file mode 100644
index 0000000..fe1b70a
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/checksums/checksums.lock differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/checksums/md5-checksums.bin b/generated-spring-boot-project/.gradle/8.10.2/checksums/md5-checksums.bin
new file mode 100644
index 0000000..9b36fb5
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/checksums/md5-checksums.bin differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/checksums/sha1-checksums.bin b/generated-spring-boot-project/.gradle/8.10.2/checksums/sha1-checksums.bin
new file mode 100644
index 0000000..f9631dc
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/checksums/sha1-checksums.bin differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/dependencies-accessors/gc.properties b/generated-spring-boot-project/.gradle/8.10.2/dependencies-accessors/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.bin b/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.bin
new file mode 100644
index 0000000..b0a1c6b
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.bin differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.lock b/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.lock
new file mode 100644
index 0000000..b3dcb78
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/executionHistory/executionHistory.lock differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/fileChanges/last-build.bin b/generated-spring-boot-project/.gradle/8.10.2/fileChanges/last-build.bin
new file mode 100644
index 0000000..f76dd23
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/fileChanges/last-build.bin differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.bin b/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.bin
new file mode 100644
index 0000000..49a2825
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.bin differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.lock b/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.lock
new file mode 100644
index 0000000..e55b9c8
Binary files /dev/null and b/generated-spring-boot-project/.gradle/8.10.2/fileHashes/fileHashes.lock differ
diff --git a/generated-spring-boot-project/.gradle/8.10.2/gc.properties b/generated-spring-boot-project/.gradle/8.10.2/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/generated-spring-boot-project/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/generated-spring-boot-project/.gradle/buildOutputCleanup/buildOutputCleanup.lock
new file mode 100644
index 0000000..c35fd6d
Binary files /dev/null and b/generated-spring-boot-project/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/generated-spring-boot-project/.gradle/buildOutputCleanup/cache.properties b/generated-spring-boot-project/.gradle/buildOutputCleanup/cache.properties
new file mode 100644
index 0000000..3f97ee2
--- /dev/null
+++ b/generated-spring-boot-project/.gradle/buildOutputCleanup/cache.properties
@@ -0,0 +1,2 @@
+#Thu Oct 03 14:05:38 IST 2024
+gradle.version=8.10.2
diff --git a/generated-spring-boot-project/.gradle/file-system.probe b/generated-spring-boot-project/.gradle/file-system.probe
new file mode 100644
index 0000000..c246919
Binary files /dev/null and b/generated-spring-boot-project/.gradle/file-system.probe differ
diff --git a/generated-spring-boot-project/.gradle/vcs-1/gc.properties b/generated-spring-boot-project/.gradle/vcs-1/gc.properties
new file mode 100644
index 0000000..e69de29
diff --git a/generated-spring-boot-project/build.gradle b/generated-spring-boot-project/build.gradle
new file mode 100644
index 0000000..b9e8d43
--- /dev/null
+++ b/generated-spring-boot-project/build.gradle
@@ -0,0 +1,58 @@
+
+plugins {
+ id 'java'
+ id 'org.springframework.boot' version '3.1.0'
+ id 'io.spring.dependency-management' version '1.1.0'
+ id 'org.openapi.generator' version '6.6.0'
+}
+
+group = 'com.example'
+version = '0.0.1-SNAPSHOT'
+
+java {
+ sourceCompatibility = JavaVersion.VERSION_17
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.springframework.boot:spring-boot-starter-web'
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ implementation 'io.swagger.core.v3:swagger-annotations:2.2.8'
+ implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
+ testImplementation 'org.springframework.boot:spring-boot-starter-test'
+}
+
+def specDir = file("spec/spi")
+specDir.eachFile { file ->
+ if (file.name.endsWith('.yml') || file.name.endsWith('.yaml')) {
+ def taskName = "openApiGenerate_" + file.name.replaceAll("[^a-zA-Z0-9]", "_")
+ tasks.create(name: taskName, type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
+ generatorName = "spring"
+ inputSpec = file.absolutePath
+ outputDir = "/Users/shishir/Documents/cb-provider-spi/build/generated-" + file.name
+ apiPackage = "com.example.api." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ modelPackage = "com.example.model." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ configOptions = [
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ skipDefaultInterface: "true"
+ ]
+ }
+ compileJava.dependsOn tasks.named(taskName)
+ }
+}
+
+tasks.named('test') {
+ useJUnitPlatform()
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ["/Users/shishir/Documents/cb-provider-spi/build/generated-*/src/main/java", 'src/main/java']
+ }
+ }
+}
diff --git a/generated-spring-boot-project/build/bootJarMainClassName b/generated-spring-boot-project/build/bootJarMainClassName
new file mode 100644
index 0000000..76ca1b8
--- /dev/null
+++ b/generated-spring-boot-project/build/bootJarMainClassName
@@ -0,0 +1 @@
+com.example.Application
\ No newline at end of file
diff --git a/generated-spring-boot-project/build/bootRunMainClassName b/generated-spring-boot-project/build/bootRunMainClassName
new file mode 100644
index 0000000..76ca1b8
--- /dev/null
+++ b/generated-spring-boot-project/build/bootRunMainClassName
@@ -0,0 +1 @@
+com.example.Application
\ No newline at end of file
diff --git a/generated-spring-boot-project/build/tmp/bootJar/MANIFEST.MF b/generated-spring-boot-project/build/tmp/bootJar/MANIFEST.MF
new file mode 100644
index 0000000..1147e1a
--- /dev/null
+++ b/generated-spring-boot-project/build/tmp/bootJar/MANIFEST.MF
@@ -0,0 +1,9 @@
+Manifest-Version: 1.0
+Main-Class: org.springframework.boot.loader.JarLauncher
+Start-Class: com.example.Application
+Spring-Boot-Version: 2.7.0
+Spring-Boot-Classes: BOOT-INF/classes/
+Spring-Boot-Lib: BOOT-INF/lib/
+Spring-Boot-Classpath-Index: BOOT-INF/classpath.idx
+Spring-Boot-Layers-Index: BOOT-INF/layers.idx
+
diff --git a/generated-spring-boot-project/build/tmp/compileJava/previous-compilation-data.bin b/generated-spring-boot-project/build/tmp/compileJava/previous-compilation-data.bin
new file mode 100644
index 0000000..bdfbbf6
Binary files /dev/null and b/generated-spring-boot-project/build/tmp/compileJava/previous-compilation-data.bin differ
diff --git a/generated-spring-boot-project/build/tmp/jar/MANIFEST.MF b/generated-spring-boot-project/build/tmp/jar/MANIFEST.MF
new file mode 100644
index 0000000..58630c0
--- /dev/null
+++ b/generated-spring-boot-project/build/tmp/jar/MANIFEST.MF
@@ -0,0 +1,2 @@
+Manifest-Version: 1.0
+
diff --git a/generated-spring-boot-project/gradle/wrapper/gradle-wrapper.properties b/generated-spring-boot-project/gradle/wrapper/gradle-wrapper.properties
new file mode 100644
index 0000000..8049c68
--- /dev/null
+++ b/generated-spring-boot-project/gradle/wrapper/gradle-wrapper.properties
@@ -0,0 +1,5 @@
+distributionBase=GRADLE_USER_HOME
+distributionPath=wrapper/dists
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
+zipStoreBase=GRADLE_USER_HOME
+zipStorePath=wrapper/dists
diff --git a/generated-spring-boot-project/gradlew b/generated-spring-boot-project/gradlew
new file mode 100755
index 0000000..a69d9cb
--- /dev/null
+++ b/generated-spring-boot-project/gradlew
@@ -0,0 +1,240 @@
+#!/bin/sh
+
+#
+# Copyright © 2015-2021 the original authors.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# https://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
+##############################################################################
+#
+# Gradle start up script for POSIX generated by Gradle.
+#
+# Important for running:
+#
+# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
+# noncompliant, but you have some other compliant shell such as ksh or
+# bash, then to run this script, type that shell name before the whole
+# command line, like:
+#
+# ksh Gradle
+#
+# Busybox and similar reduced shells will NOT work, because this script
+# requires all of these POSIX shell features:
+# * functions;
+# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
+# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
+# * compound commands having a testable exit status, especially «case»;
+# * various built-in commands including «command», «set», and «ulimit».
+#
+# Important for patching:
+#
+# (2) This script targets any POSIX shell, so it avoids extensions provided
+# by Bash, Ksh, etc; in particular arrays are avoided.
+#
+# The "traditional" practice of packing multiple parameters into a
+# space-separated string is a well documented source of bugs and security
+# problems, so this is (mostly) avoided, by progressively accumulating
+# options in "$@", and eventually passing that to Java.
+#
+# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
+# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
+# see the in-line comments for details.
+#
+# There are tweaks for specific operating systems such as AIX, CygWin,
+# Darwin, MinGW, and NonStop.
+#
+# (3) This script is generated from the Groovy template
+# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
+# within the Gradle project.
+#
+# You can find Gradle at https://github.com/gradle/gradle/.
+#
+##############################################################################
+
+# Attempt to set APP_HOME
+
+# Resolve links: $0 may be a link
+app_path=$0
+
+# Need this for daisy-chained symlinks.
+while
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
+ [ -h "$app_path" ]
+do
+ ls=$( ls -ld "$app_path" )
+ link=${ls#*' -> '}
+ case $link in #(
+ /*) app_path=$link ;; #(
+ *) app_path=$APP_HOME$link ;;
+ esac
+done
+
+APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
+
+APP_NAME="Gradle"
+APP_BASE_NAME=${0##*/}
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD=maximum
+
+warn () {
+ echo "$*"
+} >&2
+
+die () {
+ echo
+ echo "$*"
+ echo
+ exit 1
+} >&2
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "$( uname )" in #(
+ CYGWIN* ) cygwin=true ;; #(
+ Darwin* ) darwin=true ;; #(
+ MSYS* | MINGW* ) msys=true ;; #(
+ NONSTOP* ) nonstop=true ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+ # IBM's JDK on AIX uses strange locations for the executables
+ JAVACMD=$JAVA_HOME/jre/sh/java
+ else
+ JAVACMD=$JAVA_HOME/bin/java
+ fi
+ if [ ! -x "$JAVACMD" ] ; then
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+ fi
+else
+ JAVACMD=java
+ which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
+ case $MAX_FD in #(
+ max*)
+ MAX_FD=$( ulimit -H -n ) ||
+ warn "Could not query maximum file descriptor limit"
+ esac
+ case $MAX_FD in #(
+ '' | soft) :;; #(
+ *)
+ ulimit -n "$MAX_FD" ||
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
+ esac
+fi
+
+# Collect all arguments for the java command, stacking in reverse order:
+# * args from the command line
+# * the main class name
+# * -classpath
+# * -D...appname settings
+# * --module-path (only if needed)
+# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
+
+# For Cygwin or MSYS, switch paths to Windows format before running java
+if "$cygwin" || "$msys" ; then
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
+
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
+
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
+ for arg do
+ if
+ case $arg in #(
+ -*) false ;; # don't mess with options #(
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
+ [ -e "$t" ] ;; #(
+ *) false ;;
+ esac
+ then
+ arg=$( cygpath --path --ignore --mixed "$arg" )
+ fi
+ # Roll the args list around exactly as many times as the number of
+ # args, so each arg winds up back in the position where it started, but
+ # possibly modified.
+ #
+ # NB: a `for` loop captures its iteration list before it begins, so
+ # changing the positional parameters here affects neither the number of
+ # iterations, nor the values presented in `arg`.
+ shift # remove old arg
+ set -- "$@" "$arg" # push replacement arg
+ done
+fi
+
+# Collect all arguments for the java command;
+# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
+# shell script including quotes and variable substitutions, so put them in
+# double quotes to make sure that they get re-expanded; and
+# * put everything else in single quotes, so that it's not re-expanded.
+
+set -- \
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
+ -classpath "$CLASSPATH" \
+ org.gradle.wrapper.GradleWrapperMain \
+ "$@"
+
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
+# Use "xargs" to parse quoted args.
+#
+# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
+#
+# In Bash we could simply go:
+#
+# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
+# set -- "${ARGS[@]}" "$@"
+#
+# but POSIX shell has neither arrays nor command substitution, so instead we
+# post-process each arg (as a line of input to sed) to backslash-escape any
+# character that might be a shell metacharacter, then use eval to reverse
+# that process (while maintaining the separation between arguments), and wrap
+# the whole thing up as a single "set" statement.
+#
+# This will of course break if any of these variables contains a newline or
+# an unmatched quote.
+#
+
+eval "set -- $(
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
+ xargs -n1 |
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
+ tr '\n' ' '
+ )" '"$@"'
+
+exec "$JAVACMD" "$@"
diff --git a/generated-spring-boot-project/gradlew.bat b/generated-spring-boot-project/gradlew.bat
new file mode 100644
index 0000000..53a6b23
--- /dev/null
+++ b/generated-spring-boot-project/gradlew.bat
@@ -0,0 +1,91 @@
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/generated-spring-boot-project/settings.gradle b/generated-spring-boot-project/settings.gradle
new file mode 100644
index 0000000..9b76f4a
--- /dev/null
+++ b/generated-spring-boot-project/settings.gradle
@@ -0,0 +1 @@
+rootProject.name = 'spring-boot-openapi-project'
\ No newline at end of file
diff --git a/generated-spring-boot-project/src/main/java/com/example/Application.java b/generated-spring-boot-project/src/main/java/com/example/Application.java
new file mode 100644
index 0000000..6f90308
--- /dev/null
+++ b/generated-spring-boot-project/src/main/java/com/example/Application.java
@@ -0,0 +1,12 @@
+
+package com.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
diff --git a/gradle/wrapper/gradle-wrapper.jar b/gradle/wrapper/gradle-wrapper.jar
index 7454180..249e583 100644
Binary files a/gradle/wrapper/gradle-wrapper.jar and b/gradle/wrapper/gradle-wrapper.jar differ
diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties
index 84a0b92..8049c68 100644
--- a/gradle/wrapper/gradle-wrapper.properties
+++ b/gradle/wrapper/gradle-wrapper.properties
@@ -1,5 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-8.2.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-7.5-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
diff --git a/gradlew b/gradlew
index 1b6c787..a69d9cb 100755
--- a/gradlew
+++ b/gradlew
@@ -205,6 +205,12 @@ set -- \
org.gradle.wrapper.GradleWrapperMain \
"$@"
+# Stop when "xargs" is not available.
+if ! command -v xargs >/dev/null 2>&1
+then
+ die "xargs is not available"
+fi
+
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
diff --git a/gradlew.bat b/gradlew.bat
index 107acd3..53a6b23 100644
--- a/gradlew.bat
+++ b/gradlew.bat
@@ -1,89 +1,91 @@
-@rem
-@rem Copyright 2015 the original author or authors.
-@rem
-@rem Licensed under the Apache License, Version 2.0 (the "License");
-@rem you may not use this file except in compliance with the License.
-@rem You may obtain a copy of the License at
-@rem
-@rem https://www.apache.org/licenses/LICENSE-2.0
-@rem
-@rem Unless required by applicable law or agreed to in writing, software
-@rem distributed under the License is distributed on an "AS IS" BASIS,
-@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-@rem See the License for the specific language governing permissions and
-@rem limitations under the License.
-@rem
-
-@if "%DEBUG%" == "" @echo off
-@rem ##########################################################################
-@rem
-@rem Gradle startup script for Windows
-@rem
-@rem ##########################################################################
-
-@rem Set local scope for the variables with windows NT shell
-if "%OS%"=="Windows_NT" setlocal
-
-set DIRNAME=%~dp0
-if "%DIRNAME%" == "" set DIRNAME=.
-set APP_BASE_NAME=%~n0
-set APP_HOME=%DIRNAME%
-
-@rem Resolve any "." and ".." in APP_HOME to make it shorter.
-for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
-
-@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
-set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
-
-@rem Find java.exe
-if defined JAVA_HOME goto findJavaFromJavaHome
-
-set JAVA_EXE=java.exe
-%JAVA_EXE% -version >NUL 2>&1
-if "%ERRORLEVEL%" == "0" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:findJavaFromJavaHome
-set JAVA_HOME=%JAVA_HOME:"=%
-set JAVA_EXE=%JAVA_HOME%/bin/java.exe
-
-if exist "%JAVA_EXE%" goto execute
-
-echo.
-echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
-echo.
-echo Please set the JAVA_HOME variable in your environment to match the
-echo location of your Java installation.
-
-goto fail
-
-:execute
-@rem Setup the command line
-
-set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
-
-
-@rem Execute Gradle
-"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
-
-:end
-@rem End local scope for the variables with windows NT shell
-if "%ERRORLEVEL%"=="0" goto mainEnd
-
-:fail
-rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
-rem the _cmd.exe /c_ return code!
-if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
-exit /b 1
-
-:mainEnd
-if "%OS%"=="Windows_NT" endlocal
-
-:omega
+@rem
+@rem Copyright 2015 the original author or authors.
+@rem
+@rem Licensed under the Apache License, Version 2.0 (the "License");
+@rem you may not use this file except in compliance with the License.
+@rem You may obtain a copy of the License at
+@rem
+@rem https://www.apache.org/licenses/LICENSE-2.0
+@rem
+@rem Unless required by applicable law or agreed to in writing, software
+@rem distributed under the License is distributed on an "AS IS" BASIS,
+@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+@rem See the License for the specific language governing permissions and
+@rem limitations under the License.
+@rem
+
+@if "%DEBUG%"=="" @echo off
+@rem ##########################################################################
+@rem
+@rem Gradle startup script for Windows
+@rem
+@rem ##########################################################################
+
+@rem Set local scope for the variables with windows NT shell
+if "%OS%"=="Windows_NT" setlocal
+
+set DIRNAME=%~dp0
+if "%DIRNAME%"=="" set DIRNAME=.
+set APP_BASE_NAME=%~n0
+set APP_HOME=%DIRNAME%
+
+@rem Resolve any "." and ".." in APP_HOME to make it shorter.
+for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
+
+@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
+
+@rem Find java.exe
+if defined JAVA_HOME goto findJavaFromJavaHome
+
+set JAVA_EXE=java.exe
+%JAVA_EXE% -version >NUL 2>&1
+if %ERRORLEVEL% equ 0 goto execute
+
+echo.
+echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:findJavaFromJavaHome
+set JAVA_HOME=%JAVA_HOME:"=%
+set JAVA_EXE=%JAVA_HOME%/bin/java.exe
+
+if exist "%JAVA_EXE%" goto execute
+
+echo.
+echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
+echo.
+echo Please set the JAVA_HOME variable in your environment to match the
+echo location of your Java installation.
+
+goto fail
+
+:execute
+@rem Setup the command line
+
+set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
+
+
+@rem Execute Gradle
+"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
+
+:end
+@rem End local scope for the variables with windows NT shell
+if %ERRORLEVEL% equ 0 goto mainEnd
+
+:fail
+rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
+rem the _cmd.exe /c_ return code!
+set EXIT_CODE=%ERRORLEVEL%
+if %EXIT_CODE% equ 0 set EXIT_CODE=1
+if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
+exit /b %EXIT_CODE%
+
+:mainEnd
+if "%OS%"=="Windows_NT" endlocal
+
+:omega
diff --git a/meta-generator.gradle b/meta-generator.gradle
new file mode 100644
index 0000000..0622ca1
--- /dev/null
+++ b/meta-generator.gradle
@@ -0,0 +1,112 @@
+// File: meta-generator.gradle
+
+task createGenerator {
+ doLast {
+ def generatorFile = file("generate-project.gradle")
+ generatorFile.text = '''
+def javaVersion = project.hasProperty('javaVersion') ? project.getProperty('javaVersion') : '17'
+def gradleVersion = project.hasProperty('gradleVersion') ? project.getProperty('gradleVersion') : '8.5'
+def springBootVersion = project.hasProperty('springBootVersion') ? project.getProperty('springBootVersion') : '3.1.0'
+def openApiSpecDir = project.hasProperty('openApiSpecDir') ? project.getProperty('openApiSpecDir') : 'spec/spi'
+def openApiGeneratorVersion = project.hasProperty('openApiGeneratorVersion') ? project.getProperty('openApiGeneratorVersion') : '6.6.0'
+
+task generateSpringBootProject {
+ doLast {
+ def projectDir = file("generated-spring-boot-project")
+ projectDir.mkdirs()
+
+ def buildGradle = new File(projectDir, "build.gradle")
+ buildGradle.text = """
+plugins {
+ id 'java'
+ id 'org.springframework.boot' version '${springBootVersion}'
+ id 'io.spring.dependency-management' version '1.1.0'
+ id 'org.openapi.generator' version '${openApiGeneratorVersion}'
+}
+
+group = 'com.example'
+version = '0.0.1-SNAPSHOT'
+
+java {
+ sourceCompatibility = JavaVersion.VERSION_${javaVersion}
+}
+
+repositories {
+ mavenCentral()
+}
+
+dependencies {
+ implementation 'org.springframework.boot:spring-boot-starter-web'
+ implementation 'org.springframework.boot:spring-boot-starter-validation'
+ implementation 'io.swagger.core.v3:swagger-annotations:2.2.8'
+ implementation 'org.openapitools:jackson-databind-nullable:0.2.6'
+ testImplementation 'org.springframework.boot:spring-boot-starter-test'
+}
+
+def specDir = file("${openApiSpecDir}")
+specDir.eachFile { file ->
+ if (file.name.endsWith('.yml') || file.name.endsWith('.yaml')) {
+ def taskName = "openApiGenerate_" + file.name.replaceAll("[^a-zA-Z0-9]", "_")
+ tasks.create(name: taskName, type: org.openapitools.generator.gradle.plugin.tasks.GenerateTask) {
+ generatorName = "spring"
+ inputSpec = file.absolutePath
+ outputDir = "\$buildDir/generated-" + file.name
+ apiPackage = "com.example.api." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ modelPackage = "com.example.model." + file.name.replaceAll("[^a-zA-Z0-9]", "").toLowerCase()
+ configOptions = [
+ dateLibrary: "java8",
+ interfaceOnly: "true",
+ skipDefaultInterface: "true"
+ ]
+ }
+ compileJava.dependsOn tasks.named(taskName)
+ }
+}
+
+tasks.named('test') {
+ useJUnitPlatform()
+}
+
+sourceSets {
+ main {
+ java {
+ srcDirs = ["\$buildDir/generated-*/src/main/java", 'src/main/java']
+ }
+ }
+}
+"""
+
+ def settingsGradle = new File(projectDir, "settings.gradle")
+ settingsGradle.text = "rootProject.name = 'spring-boot-openapi-project'"
+
+ def srcDir = new File(projectDir, "src/main/java/com/example")
+ srcDir.mkdirs()
+ def applicationJava = new File(srcDir, "Application.java")
+ applicationJava.text = """
+package com.example;
+
+import org.springframework.boot.SpringApplication;
+import org.springframework.boot.autoconfigure.SpringBootApplication;
+
+@SpringBootApplication
+public class Application {
+ public static void main(String[] args) {
+ SpringApplication.run(Application.class, args);
+ }
+}
+"""
+
+ exec {
+ workingDir projectDir
+ commandLine 'gradle', 'wrapper', '--gradle-version', gradleVersion
+ }
+
+ println "Spring Boot project generated successfully in 'generated-spring-boot-project' directory."
+ println "To build the project, navigate to the directory and run: ./gradlew build"
+ }
+}
+'''
+ println "generate-project.gradle file has been created successfully."
+ println "To generate a Spring Boot project, run: gradle -b generate-project.gradle generateSpringBootProject"
+ }
+}
\ No newline at end of file
diff --git a/spec/.DS_Store b/spec/.DS_Store
new file mode 100644
index 0000000..89cb70a
Binary files /dev/null and b/spec/.DS_Store differ
diff --git a/spec/spi/config.yml b/spec/spi/config/config.yml
similarity index 100%
rename from spec/spi/config.yml
rename to spec/spi/config/config.yml
diff --git a/springproject/generated-openapi_location_validation.yml/.openapi-generator-ignore b/springproject/generated-openapi_location_validation.yml/.openapi-generator-ignore
new file mode 100644
index 0000000..7484ee5
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/springproject/generated-openapi_location_validation.yml/.openapi-generator/FILES b/springproject/generated-openapi_location_validation.yml/.openapi-generator/FILES
new file mode 100644
index 0000000..1e82a7e
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/.openapi-generator/FILES
@@ -0,0 +1,22 @@
+.openapi-generator-ignore
+README.md
+pom.xml
+src/main/java/com/example/api/openapilocationvalidationyml/ApiUtil.java
+src/main/java/com/example/api/openapilocationvalidationyml/CredentialsApi.java
+src/main/java/com/example/api/openapilocationvalidationyml/HealthApi.java
+src/main/java/com/example/api/openapilocationvalidationyml/ValidateLocationApi.java
+src/main/java/com/example/model/openapilocationvalidationyml/Address.java
+src/main/java/com/example/model/openapilocationvalidationyml/BasicErrorResponse.java
+src/main/java/com/example/model/openapilocationvalidationyml/CredentialStatus.java
+src/main/java/com/example/model/openapilocationvalidationyml/CredentialValidationResponse.java
+src/main/java/com/example/model/openapilocationvalidationyml/ErrorCode.java
+src/main/java/com/example/model/openapilocationvalidationyml/EvidenceOrigin.java
+src/main/java/com/example/model/openapilocationvalidationyml/FieldItem.java
+src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckComponent.java
+src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckResponse.java
+src/main/java/com/example/model/openapilocationvalidationyml/HealthStatus.java
+src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponse.java
+src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponseErrorsInner.java
+src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateResponse.java
+src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationEvidence.java
+src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationStatus.java
diff --git a/springproject/generated-openapi_location_validation.yml/.openapi-generator/VERSION b/springproject/generated-openapi_location_validation.yml/.openapi-generator/VERSION
new file mode 100644
index 0000000..73a86b1
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
\ No newline at end of file
diff --git a/springproject/generated-openapi_location_validation.yml/README.md b/springproject/generated-openapi_location_validation.yml/README.md
new file mode 100644
index 0000000..d43a1de
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/README.md
@@ -0,0 +1,27 @@
+
+# OpenAPI generated API stub
+
+Spring Framework stub
+
+
+## Overview
+This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
+By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
+This is an example of building API stub interfaces in Java using the Spring framework.
+
+The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
+by adding ```@Controller``` classes that implement the interface. Eg:
+```java
+@Controller
+public class PetController implements PetApi {
+// implement all PetApi methods
+}
+```
+
+You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
+```java
+@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
+public interface PetClient extends PetApi {
+
+}
+```
diff --git a/springproject/generated-openapi_location_validation.yml/pom.xml b/springproject/generated-openapi_location_validation.yml/pom.xml
new file mode 100644
index 0000000..4cbf265
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/pom.xml
@@ -0,0 +1,74 @@
+
+ 4.0.0
+ org.openapitools
+ openapi-spring
+ jar
+ openapi-spring
+ 0.0.1
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ UTF-8
+ 1.6.14
+ 4.15.5
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.6
+
+
+
+ src/main/java
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.data
+ spring-data-commons
+
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.6
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ApiUtil.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ApiUtil.java
new file mode 100644
index 0000000..5ac8514
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ApiUtil.java
@@ -0,0 +1,19 @@
+package com.example.api.openapilocationvalidationyml;
+
+import org.springframework.web.context.request.NativeWebRequest;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiUtil {
+ public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
+ try {
+ HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
+ res.setCharacterEncoding("UTF-8");
+ res.addHeader("Content-Type", contentType);
+ res.getWriter().print(example);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/CredentialsApi.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/CredentialsApi.java
new file mode 100644
index 0000000..b2744c6
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/CredentialsApi.java
@@ -0,0 +1,86 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapilocationvalidationyml;
+
+import com.example.model.openapilocationvalidationyml.BasicErrorResponse;
+import com.example.model.openapilocationvalidationyml.CredentialValidationResponse;
+import com.example.model.openapilocationvalidationyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Authentication", description = "Endpoints to validate the credentials used for calling the Service Provider.")
+public interface CredentialsApi {
+
+ /**
+ * POST /credentials/validate : Validate credentials
+ * This endpoint is used to validate the credentials used to call the Service Provider.
+ *
+ * @return Authentication succeeded. (status code 200)
+ * or Authentication failed. (status code 401)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "validateCredentials",
+ summary = "Validate credentials",
+ description = "This endpoint is used to validate the credentials used to call the Service Provider.",
+ tags = { "Authentication" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Authentication succeeded.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Authentication failed.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credentials/validate",
+ produces = { "application/json" }
+ )
+ ResponseEntity validateCredentials(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/HealthApi.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/HealthApi.java
new file mode 100644
index 0000000..d85937e
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/HealthApi.java
@@ -0,0 +1,81 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapilocationvalidationyml;
+
+import com.example.model.openapilocationvalidationyml.BasicErrorResponse;
+import com.example.model.openapilocationvalidationyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Health", description = "Endpoints to monitor the health of the Service Provider and the Service Adapter.")
+public interface HealthApi {
+
+ /**
+ * GET /health : Fetch the health status of the Service Provider.
+ * This endpoint is used to fetch the health status of the Service Provider.
+ *
+ * @return Service is healthy. (status code 200)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchHealth",
+ summary = "Fetch the health status of the Service Provider.",
+ description = "This endpoint is used to fetch the health status of the Service Provider.",
+ tags = { "Health" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Service is healthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/health",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchHealth(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ValidateLocationApi.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ValidateLocationApi.java
new file mode 100644
index 0000000..67eb269
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/api/openapilocationvalidationyml/ValidateLocationApi.java
@@ -0,0 +1,94 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapilocationvalidationyml;
+
+import com.example.model.openapilocationvalidationyml.BasicErrorResponse;
+import com.example.model.openapilocationvalidationyml.HealthCheckResponse;
+import com.example.model.openapilocationvalidationyml.LocationValidateErrorResponse;
+import com.example.model.openapilocationvalidationyml.LocationValidateResponse;
+import com.example.model.openapilocationvalidationyml.LocationValidationEvidence;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "LocationValidate", description = "Endpoints to validate the location of the end customer.")
+public interface ValidateLocationApi {
+
+ /**
+ * POST /validate-location : Validate the location of customer with given evidences
+ * This endpoint validates the location of a customer using the evidences like ip, bin, address, etc. to determine if a customer is taxable or not.
+ *
+ * @param locationValidationEvidence (optional)
+ * @return Response to validate the location submitted successfully. (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "locationValidate",
+ summary = "Validate the location of customer with given evidences",
+ description = "This endpoint validates the location of a customer using the evidences like ip, bin, address, etc. to determine if a customer is taxable or not.",
+ tags = { "LocationValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Response to validate the location submitted successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = LocationValidateResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = LocationValidateErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/validate-location",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity locationValidate(
+ @Parameter(name = "LocationValidationEvidence", description = "") @Valid @RequestBody(required = false) LocationValidationEvidence locationValidationEvidence
+ );
+
+}
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/Address.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/Address.java
new file mode 100644
index 0000000..6bfd255
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/Address.java
@@ -0,0 +1,228 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Represents the address used for validation.
+ */
+
+@Schema(name = "Address", description = "Represents the address used for validation.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class Address {
+
+ private String line1;
+
+ private String line2;
+
+ private String line3;
+
+ private String city;
+
+ private String state;
+
+ private String postalCode;
+
+ private String country;
+
+ public Address line1(String line1) {
+ this.line1 = line1;
+ return this;
+ }
+
+ /**
+ * First line of the street address
+ * @return line1
+ */
+ @Size(max = 180)
+ @Schema(name = "line1", description = "First line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line1")
+ public String getLine1() {
+ return line1;
+ }
+
+ public void setLine1(String line1) {
+ this.line1 = line1;
+ }
+
+ public Address line2(String line2) {
+ this.line2 = line2;
+ return this;
+ }
+
+ /**
+ * Second line of the street address
+ * @return line2
+ */
+ @Size(max = 150)
+ @Schema(name = "line2", description = "Second line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line2")
+ public String getLine2() {
+ return line2;
+ }
+
+ public void setLine2(String line2) {
+ this.line2 = line2;
+ }
+
+ public Address line3(String line3) {
+ this.line3 = line3;
+ return this;
+ }
+
+ /**
+ * Third line of the street address
+ * @return line3
+ */
+ @Size(max = 150)
+ @Schema(name = "line3", description = "Third line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line3")
+ public String getLine3() {
+ return line3;
+ }
+
+ public void setLine3(String line3) {
+ this.line3 = line3;
+ }
+
+ public Address city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * The city of the address
+ * @return city
+ */
+ @Size(max = 50)
+ @Schema(name = "city", description = "The city of the address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("city")
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public Address state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * The state of the address following the ISO 3166-2 state/province code without the country prefix.
+ * @return state
+ */
+ @Size(max = 50)
+ @Schema(name = "state", description = "The state of the address following the ISO 3166-2 state/province code without the country prefix.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("state")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public Address postalCode(String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ /**
+ * Postal Code / Zip Code of the address.
+ * @return postalCode
+ */
+ @Size(max = 20)
+ @Schema(name = "postalCode", description = "Postal Code / Zip Code of the address.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("postalCode")
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ public Address country(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * The country of the address following the ISO 3166-1 alpha-2 standard.
+ * @return country
+ */
+ @Size(max = 2)
+ @Schema(name = "country", description = "The country of the address following the ISO 3166-1 alpha-2 standard.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("country")
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Address address = (Address) o;
+ return Objects.equals(this.line1, address.line1) &&
+ Objects.equals(this.line2, address.line2) &&
+ Objects.equals(this.line3, address.line3) &&
+ Objects.equals(this.city, address.city) &&
+ Objects.equals(this.state, address.state) &&
+ Objects.equals(this.postalCode, address.postalCode) &&
+ Objects.equals(this.country, address.country);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(line1, line2, line3, city, state, postalCode, country);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Address {\n");
+ sb.append(" line1: ").append(toIndentedString(line1)).append("\n");
+ sb.append(" line2: ").append(toIndentedString(line2)).append("\n");
+ sb.append(" line3: ").append(toIndentedString(line3)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n");
+ sb.append(" country: ").append(toIndentedString(country)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/BasicErrorResponse.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/BasicErrorResponse.java
new file mode 100644
index 0000000..a4280ec
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/BasicErrorResponse.java
@@ -0,0 +1,120 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.net.URI;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The basic error response containing the error message and the help documentation link.
+ */
+
+@Schema(name = "BasicErrorResponse", description = "The basic error response containing the error message and the help documentation link.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class BasicErrorResponse {
+
+ private String message;
+
+ private URI helpUrl;
+
+ public BasicErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public BasicErrorResponse(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * The description of the error with details about it's cause.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Invalid Credentials", description = "The description of the error with details about it's cause.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse helpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+ @Valid
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Authentication", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public URI getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BasicErrorResponse basicErrorResponse = (BasicErrorResponse) o;
+ return Objects.equals(this.message, basicErrorResponse.message) &&
+ Objects.equals(this.helpUrl, basicErrorResponse.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BasicErrorResponse {\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialStatus.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialStatus.java
new file mode 100644
index 0000000..0ac1bb1
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialStatus.java
@@ -0,0 +1,56 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of the credentials used for authentication.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public enum CredentialStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID");
+
+ private String value;
+
+ CredentialStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static CredentialStatus fromValue(String value) {
+ for (CredentialStatus b : CredentialStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialValidationResponse.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialValidationResponse.java
new file mode 100644
index 0000000..3e67c73
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/CredentialValidationResponse.java
@@ -0,0 +1,96 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.CredentialStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * CredentialValidationResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class CredentialValidationResponse {
+
+ private CredentialStatus status;
+
+ public CredentialValidationResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CredentialValidationResponse(CredentialStatus status) {
+ this.status = status;
+ }
+
+ public CredentialValidationResponse status(CredentialStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public CredentialStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(CredentialStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CredentialValidationResponse credentialValidationResponse = (CredentialValidationResponse) o;
+ return Objects.equals(this.status, credentialValidationResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(status);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CredentialValidationResponse {\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/ErrorCode.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/ErrorCode.java
new file mode 100644
index 0000000..ef556d9
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/ErrorCode.java
@@ -0,0 +1,72 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The error codes classify the type of exception that occurred during processing the request.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public enum ErrorCode {
+
+ INVALID_OPERATION("INVALID_OPERATION"),
+
+ SERVICE_EXCEPTION("SERVICE_EXCEPTION"),
+
+ SERVICE_UNAVAILABLE("SERVICE_UNAVAILABLE"),
+
+ SERVICE_LIMIT_EXCEEDED("SERVICE_LIMIT_EXCEEDED"),
+
+ MISSING_REQUIRED_DATA("MISSING_REQUIRED_DATA"),
+
+ INVALID_DATA("INVALID_DATA"),
+
+ INVALID_TYPE("INVALID_TYPE"),
+
+ INVALID_FORMAT("INVALID_FORMAT"),
+
+ INVALID_RANGE("INVALID_RANGE"),
+
+ LOCATION_VALIDATION_FAILED("LOCATION_VALIDATION_FAILED");
+
+ private String value;
+
+ ErrorCode(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static ErrorCode fromValue(String value) {
+ for (ErrorCode b : ErrorCode.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/EvidenceOrigin.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/EvidenceOrigin.java
new file mode 100644
index 0000000..17ce432
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/EvidenceOrigin.java
@@ -0,0 +1,204 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Source country identified from each evidence
+ */
+
+@Schema(name = "EvidenceOrigin", description = "Source country identified from each evidence")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class EvidenceOrigin {
+
+ private String taxRegistrationNumber;
+
+ private String ip;
+
+ private String bin;
+
+ private String phone;
+
+ private String address;
+
+ private String taxIdentifiers;
+
+ public EvidenceOrigin taxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ return this;
+ }
+
+ /**
+ * Source country from Tax registration number of the customer.
+ * @return taxRegistrationNumber
+ */
+ @Size(max = 10)
+ @Schema(name = "taxRegistrationNumber", description = "Source country from Tax registration number of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxRegistrationNumber")
+ public String getTaxRegistrationNumber() {
+ return taxRegistrationNumber;
+ }
+
+ public void setTaxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ }
+
+ public EvidenceOrigin ip(String ip) {
+ this.ip = ip;
+ return this;
+ }
+
+ /**
+ * Source country from IP address of the customer.
+ * @return ip
+ */
+ @Size(max = 10)
+ @Schema(name = "ip", description = "Source country from IP address of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("ip")
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public EvidenceOrigin bin(String bin) {
+ this.bin = bin;
+ return this;
+ }
+
+ /**
+ * Source country from BIN of primary card.
+ * @return bin
+ */
+ @Size(max = 10)
+ @Schema(name = "bin", description = "Source country from BIN of primary card.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("bin")
+ public String getBin() {
+ return bin;
+ }
+
+ public void setBin(String bin) {
+ this.bin = bin;
+ }
+
+ public EvidenceOrigin phone(String phone) {
+ this.phone = phone;
+ return this;
+ }
+
+ /**
+ * Source country from Phone number of customer.
+ * @return phone
+ */
+ @Size(max = 10)
+ @Schema(name = "phone", description = "Source country from Phone number of customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("phone")
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public EvidenceOrigin address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Source country from address of customer.
+ * @return address
+ */
+ @Size(max = 10)
+ @Schema(name = "address", description = "Source country from address of customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("address")
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public EvidenceOrigin taxIdentifiers(String taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ return this;
+ }
+
+ /**
+ * Source country from Tax Identifiers of customer.
+ * @return taxIdentifiers
+ */
+ @Size(max = 10)
+ @Schema(name = "taxIdentifiers", description = "Source country from Tax Identifiers of customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxIdentifiers")
+ public String getTaxIdentifiers() {
+ return taxIdentifiers;
+ }
+
+ public void setTaxIdentifiers(String taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ EvidenceOrigin evidenceOrigin = (EvidenceOrigin) o;
+ return Objects.equals(this.taxRegistrationNumber, evidenceOrigin.taxRegistrationNumber) &&
+ Objects.equals(this.ip, evidenceOrigin.ip) &&
+ Objects.equals(this.bin, evidenceOrigin.bin) &&
+ Objects.equals(this.phone, evidenceOrigin.phone) &&
+ Objects.equals(this.address, evidenceOrigin.address) &&
+ Objects.equals(this.taxIdentifiers, evidenceOrigin.taxIdentifiers);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(taxRegistrationNumber, ip, bin, phone, address, taxIdentifiers);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class EvidenceOrigin {\n");
+ sb.append(" taxRegistrationNumber: ").append(toIndentedString(taxRegistrationNumber)).append("\n");
+ sb.append(" ip: ").append(toIndentedString(ip)).append("\n");
+ sb.append(" bin: ").append(toIndentedString(bin)).append("\n");
+ sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" taxIdentifiers: ").append(toIndentedString(taxIdentifiers)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/FieldItem.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/FieldItem.java
new file mode 100644
index 0000000..eb7e308
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/FieldItem.java
@@ -0,0 +1,119 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * FieldItem
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class FieldItem {
+
+ private String id;
+
+ private String value;
+
+ public FieldItem() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public FieldItem(String id, String value) {
+ this.id = id;
+ this.value = value;
+ }
+
+ public FieldItem id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The id of the field.
+ * @return id
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "id", description = "The id of the field.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public FieldItem value(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * The value of the field.
+ * @return value
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "value", description = "The value of the field.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("value")
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FieldItem fieldItem = (FieldItem) o;
+ return Objects.equals(this.id, fieldItem.id) &&
+ Objects.equals(this.value, fieldItem.value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, value);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FieldItem {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" value: ").append(toIndentedString(value)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckComponent.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckComponent.java
new file mode 100644
index 0000000..5e77bea
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckComponent.java
@@ -0,0 +1,273 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The health status details of a specific component reported by the Service Adapter.
+ */
+
+@Schema(name = "HealthCheckComponent", description = "The health status details of a specific component reported by the Service Adapter.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class HealthCheckComponent {
+
+ private String id;
+
+ private String name;
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ */
+ public enum TypeEnum {
+ OTHER("OTHER"),
+
+ SYSTEM("SYSTEM"),
+
+ API("API"),
+
+ ADAPTER("ADAPTER"),
+
+ DATABASE("DATABASE");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ private TypeEnum type;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List endpoints;
+
+ public HealthCheckComponent() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckComponent(String id, String name, TypeEnum type, HealthStatus status) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.status = status;
+ }
+
+ public HealthCheckComponent id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The id of the component.
+ * @return id
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "id", description = "The id of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public HealthCheckComponent name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the component.
+ * @return name
+ */
+ @NotNull @Size(max = 150)
+ @Schema(name = "name", description = "The name of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public HealthCheckComponent type(TypeEnum type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ * @return type
+ */
+ @NotNull
+ @Schema(name = "type", description = "The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown. ", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("type")
+ public TypeEnum getType() {
+ return type;
+ }
+
+ public void setType(TypeEnum type) {
+ this.type = type;
+ }
+
+ public HealthCheckComponent description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The detailed status of the component.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The detailed status of the component.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckComponent status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckComponent endpoints(List endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ public HealthCheckComponent addEndpointsItem(String endpointsItem) {
+ if (this.endpoints == null) {
+ this.endpoints = new ArrayList<>();
+ }
+ this.endpoints.add(endpointsItem);
+ return this;
+ }
+
+ /**
+ * When the `status` of the component is not `UP`, then the list of endpoints affected.
+ * @return endpoints
+ */
+
+ @Schema(name = "endpoints", description = "When the `status` of the component is not `UP`, then the list of endpoints affected.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("endpoints")
+ public List getEndpoints() {
+ return endpoints;
+ }
+
+ public void setEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckComponent healthCheckComponent = (HealthCheckComponent) o;
+ return Objects.equals(this.id, healthCheckComponent.id) &&
+ Objects.equals(this.name, healthCheckComponent.name) &&
+ Objects.equals(this.type, healthCheckComponent.type) &&
+ Objects.equals(this.description, healthCheckComponent.description) &&
+ Objects.equals(this.status, healthCheckComponent.status) &&
+ Objects.equals(this.endpoints, healthCheckComponent.endpoints);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, type, description, status, endpoints);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckComponent {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" endpoints: ").append(toIndentedString(endpoints)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckResponse.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckResponse.java
new file mode 100644
index 0000000..24c7e3b
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthCheckResponse.java
@@ -0,0 +1,210 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.HealthCheckComponent;
+import com.example.model.openapilocationvalidationyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * HealthCheckResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class HealthCheckResponse {
+
+ private String version;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List<@Valid HealthCheckComponent> components = new ArrayList<>();
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime time;
+
+ public HealthCheckResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckResponse(HealthStatus status, List<@Valid HealthCheckComponent> components, OffsetDateTime time) {
+ this.status = status;
+ this.components = components;
+ this.time = time;
+ }
+
+ public HealthCheckResponse version(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get version
+ * @return version
+ */
+ @Size(min = 1)
+ @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public HealthCheckResponse description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the health status returned by the Service Adapter.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The description of the health status returned by the Service Adapter.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckResponse status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckResponse components(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ return this;
+ }
+
+ public HealthCheckResponse addComponentsItem(HealthCheckComponent componentsItem) {
+ if (this.components == null) {
+ this.components = new ArrayList<>();
+ }
+ this.components.add(componentsItem);
+ return this;
+ }
+
+ /**
+ * List of health status details for each component reported by the Service Adapter.
+ * @return components
+ */
+ @NotNull @Valid
+ @Schema(name = "components", description = "List of health status details for each component reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("components")
+ public List<@Valid HealthCheckComponent> getComponents() {
+ return components;
+ }
+
+ public void setComponents(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ }
+
+ public HealthCheckResponse time(OffsetDateTime time) {
+ this.time = time;
+ return this;
+ }
+
+ /**
+ * The timestamp of the health status reported by the Service Adapter.
+ * @return time
+ */
+ @NotNull @Valid
+ @Schema(name = "time", description = "The timestamp of the health status reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("time")
+ public OffsetDateTime getTime() {
+ return time;
+ }
+
+ public void setTime(OffsetDateTime time) {
+ this.time = time;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckResponse healthCheckResponse = (HealthCheckResponse) o;
+ return Objects.equals(this.version, healthCheckResponse.version) &&
+ Objects.equals(this.description, healthCheckResponse.description) &&
+ Objects.equals(this.status, healthCheckResponse.status) &&
+ Objects.equals(this.components, healthCheckResponse.components) &&
+ Objects.equals(this.time, healthCheckResponse.time);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(version, description, status, components, time);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckResponse {\n");
+ sb.append(" version: ").append(toIndentedString(version)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" components: ").append(toIndentedString(components)).append("\n");
+ sb.append(" time: ").append(toIndentedString(time)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthStatus.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthStatus.java
new file mode 100644
index 0000000..09b35b3
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/HealthStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of a specific component reported by the Service Adapter.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public enum HealthStatus {
+
+ UP("UP"),
+
+ DOWN("DOWN"),
+
+ WARN("WARN");
+
+ private String value;
+
+ HealthStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static HealthStatus fromValue(String value) {
+ for (HealthStatus b : HealthStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponse.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponse.java
new file mode 100644
index 0000000..edd961e
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponse.java
@@ -0,0 +1,108 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.LocationValidateErrorResponseErrorsInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Defined the structure for validation error of location validation.
+ */
+
+@Schema(name = "LocationValidateErrorResponse", description = "Defined the structure for validation error of location validation.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class LocationValidateErrorResponse {
+
+ @Valid
+ private List<@Valid LocationValidateErrorResponseErrorsInner> errors = new ArrayList<>();
+
+ public LocationValidateErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public LocationValidateErrorResponse(List<@Valid LocationValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ public LocationValidateErrorResponse errors(List<@Valid LocationValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public LocationValidateErrorResponse addErrorsItem(LocationValidateErrorResponseErrorsInner errorsItem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<>();
+ }
+ this.errors.add(errorsItem);
+ return this;
+ }
+
+ /**
+ * Get errors
+ * @return errors
+ */
+ @NotNull @Valid
+ @Schema(name = "errors", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("errors")
+ public List<@Valid LocationValidateErrorResponseErrorsInner> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<@Valid LocationValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LocationValidateErrorResponse locationValidateErrorResponse = (LocationValidateErrorResponse) o;
+ return Objects.equals(this.errors, locationValidateErrorResponse.errors);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(errors);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LocationValidateErrorResponse {\n");
+ sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponseErrorsInner.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponseErrorsInner.java
new file mode 100644
index 0000000..8366e4e
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateErrorResponseErrorsInner.java
@@ -0,0 +1,195 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.ErrorCode;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * LocationValidateErrorResponseErrorsInner
+ */
+
+@JsonTypeName("LocationValidateErrorResponse_errors_inner")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class LocationValidateErrorResponseErrorsInner {
+
+ private String entity;
+
+ private String entityField;
+
+ private ErrorCode code;
+
+ private String message;
+
+ private String helpUrl;
+
+ public LocationValidateErrorResponseErrorsInner() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public LocationValidateErrorResponseErrorsInner(ErrorCode code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+
+ public LocationValidateErrorResponseErrorsInner entity(String entity) {
+ this.entity = entity;
+ return this;
+ }
+
+ /**
+ * The target entity that has the invalid field or value.
+ * @return entity
+ */
+ @Size(max = 250)
+ @Schema(name = "entity", example = "Evidence", description = "The target entity that has the invalid field or value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("entity")
+ public String getEntity() {
+ return entity;
+ }
+
+ public void setEntity(String entity) {
+ this.entity = entity;
+ }
+
+ public LocationValidateErrorResponseErrorsInner entityField(String entityField) {
+ this.entityField = entityField;
+ return this;
+ }
+
+ /**
+ * The field of an entity that has the invalid value.
+ * @return entityField
+ */
+ @Size(max = 250)
+ @Schema(name = "entityField", example = "Evidence", description = "The field of an entity that has the invalid value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("entityField")
+ public String getEntityField() {
+ return entityField;
+ }
+
+ public void setEntityField(String entityField) {
+ this.entityField = entityField;
+ }
+
+ public LocationValidateErrorResponseErrorsInner code(ErrorCode code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ * @return code
+ */
+ @NotNull @Valid
+ @Schema(name = "code", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("code")
+ public ErrorCode getCode() {
+ return code;
+ }
+
+ public void setCode(ErrorCode code) {
+ this.code = code;
+ }
+
+ public LocationValidateErrorResponseErrorsInner message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * A short message describing the reason for the error.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Could not resolve location from the given evidences. Address is in FR, IP is in US, phone is in India.", description = "A short message describing the reason for the error.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public LocationValidateErrorResponseErrorsInner helpUrl(String helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Location", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public String getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(String helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LocationValidateErrorResponseErrorsInner locationValidateErrorResponseErrorsInner = (LocationValidateErrorResponseErrorsInner) o;
+ return Objects.equals(this.entity, locationValidateErrorResponseErrorsInner.entity) &&
+ Objects.equals(this.entityField, locationValidateErrorResponseErrorsInner.entityField) &&
+ Objects.equals(this.code, locationValidateErrorResponseErrorsInner.code) &&
+ Objects.equals(this.message, locationValidateErrorResponseErrorsInner.message) &&
+ Objects.equals(this.helpUrl, locationValidateErrorResponseErrorsInner.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(entity, entityField, code, message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LocationValidateErrorResponseErrorsInner {\n");
+ sb.append(" entity: ").append(toIndentedString(entity)).append("\n");
+ sb.append(" entityField: ").append(toIndentedString(entityField)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateResponse.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateResponse.java
new file mode 100644
index 0000000..d88fdee
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidateResponse.java
@@ -0,0 +1,147 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.EvidenceOrigin;
+import com.example.model.openapilocationvalidationyml.LocationValidationStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains the required properties for location validation response
+ */
+
+@Schema(name = "LocationValidateResponse", description = "Contains the required properties for location validation response")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class LocationValidateResponse {
+
+ private LocationValidationStatus status;
+
+ private String sourceCountry;
+
+ private EvidenceOrigin evidenceOrigin;
+
+ public LocationValidateResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public LocationValidateResponse(LocationValidationStatus status, EvidenceOrigin evidenceOrigin) {
+ this.status = status;
+ this.evidenceOrigin = evidenceOrigin;
+ }
+
+ public LocationValidateResponse status(LocationValidationStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public LocationValidationStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(LocationValidationStatus status) {
+ this.status = status;
+ }
+
+ public LocationValidateResponse sourceCountry(String sourceCountry) {
+ this.sourceCountry = sourceCountry;
+ return this;
+ }
+
+ /**
+ * SIngle country identified as location of Customer
+ * @return sourceCountry
+ */
+
+ @Schema(name = "sourceCountry", description = "SIngle country identified as location of Customer", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("sourceCountry")
+ public String getSourceCountry() {
+ return sourceCountry;
+ }
+
+ public void setSourceCountry(String sourceCountry) {
+ this.sourceCountry = sourceCountry;
+ }
+
+ public LocationValidateResponse evidenceOrigin(EvidenceOrigin evidenceOrigin) {
+ this.evidenceOrigin = evidenceOrigin;
+ return this;
+ }
+
+ /**
+ * Get evidenceOrigin
+ * @return evidenceOrigin
+ */
+ @NotNull @Valid
+ @Schema(name = "evidenceOrigin", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("evidenceOrigin")
+ public EvidenceOrigin getEvidenceOrigin() {
+ return evidenceOrigin;
+ }
+
+ public void setEvidenceOrigin(EvidenceOrigin evidenceOrigin) {
+ this.evidenceOrigin = evidenceOrigin;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LocationValidateResponse locationValidateResponse = (LocationValidateResponse) o;
+ return Objects.equals(this.status, locationValidateResponse.status) &&
+ Objects.equals(this.sourceCountry, locationValidateResponse.sourceCountry) &&
+ Objects.equals(this.evidenceOrigin, locationValidateResponse.evidenceOrigin);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(status, sourceCountry, evidenceOrigin);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LocationValidateResponse {\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" sourceCountry: ").append(toIndentedString(sourceCountry)).append("\n");
+ sb.append(" evidenceOrigin: ").append(toIndentedString(evidenceOrigin)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationEvidence.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationEvidence.java
new file mode 100644
index 0000000..297d861
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationEvidence.java
@@ -0,0 +1,278 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapilocationvalidationyml.Address;
+import com.example.model.openapilocationvalidationyml.FieldItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains the required properties for location validation response
+ */
+
+@Schema(name = "LocationValidationEvidence", description = "Contains the required properties for location validation response")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public class LocationValidationEvidence {
+
+ private String name;
+
+ private String customerCode;
+
+ private String taxRegistrationNumber;
+
+ private String ip;
+
+ private String bin;
+
+ private String phone;
+
+ private Address address;
+
+ @Valid
+ private List<@Valid FieldItem> taxIdentifiers;
+
+ public LocationValidationEvidence() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public LocationValidationEvidence(String customerCode, Address address) {
+ this.customerCode = customerCode;
+ this.address = address;
+ }
+
+ public LocationValidationEvidence name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the customer.
+ * @return name
+ */
+ @Size(max = 50)
+ @Schema(name = "name", description = "Name of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public LocationValidationEvidence customerCode(String customerCode) {
+ this.customerCode = customerCode;
+ return this;
+ }
+
+ /**
+ * Chargebee customer code.
+ * @return customerCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "customerCode", description = "Chargebee customer code.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customerCode")
+ public String getCustomerCode() {
+ return customerCode;
+ }
+
+ public void setCustomerCode(String customerCode) {
+ this.customerCode = customerCode;
+ }
+
+ public LocationValidationEvidence taxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ return this;
+ }
+
+ /**
+ * Tax registration number of the customer.
+ * @return taxRegistrationNumber
+ */
+ @Size(max = 50)
+ @Schema(name = "taxRegistrationNumber", description = "Tax registration number of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxRegistrationNumber")
+ public String getTaxRegistrationNumber() {
+ return taxRegistrationNumber;
+ }
+
+ public void setTaxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ }
+
+ public LocationValidationEvidence ip(String ip) {
+ this.ip = ip;
+ return this;
+ }
+
+ /**
+ * IP address of the customer.
+ * @return ip
+ */
+ @Size(max = 10)
+ @Schema(name = "ip", description = "IP address of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("ip")
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public LocationValidationEvidence bin(String bin) {
+ this.bin = bin;
+ return this;
+ }
+
+ /**
+ * BIN of primary card.
+ * @return bin
+ */
+ @Size(max = 6)
+ @Schema(name = "bin", description = "BIN of primary card.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("bin")
+ public String getBin() {
+ return bin;
+ }
+
+ public void setBin(String bin) {
+ this.bin = bin;
+ }
+
+ public LocationValidationEvidence phone(String phone) {
+ this.phone = phone;
+ return this;
+ }
+
+ /**
+ * Phone number of the customer.
+ * @return phone
+ */
+ @Size(max = 15)
+ @Schema(name = "phone", description = "Phone number of the customer.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("phone")
+ public String getPhone() {
+ return phone;
+ }
+
+ public void setPhone(String phone) {
+ this.phone = phone;
+ }
+
+ public LocationValidationEvidence address(Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Get address
+ * @return address
+ */
+ @NotNull @Valid
+ @Schema(name = "address", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("address")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ public LocationValidationEvidence taxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ return this;
+ }
+
+ public LocationValidationEvidence addTaxIdentifiersItem(FieldItem taxIdentifiersItem) {
+ if (this.taxIdentifiers == null) {
+ this.taxIdentifiers = new ArrayList<>();
+ }
+ this.taxIdentifiers.add(taxIdentifiersItem);
+ return this;
+ }
+
+ /**
+ * The tax code fields of the product used for tax calculation.
+ * @return taxIdentifiers
+ */
+ @Valid
+ @Schema(name = "taxIdentifiers", description = "The tax code fields of the product used for tax calculation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxIdentifiers")
+ public List<@Valid FieldItem> getTaxIdentifiers() {
+ return taxIdentifiers;
+ }
+
+ public void setTaxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ LocationValidationEvidence locationValidationEvidence = (LocationValidationEvidence) o;
+ return Objects.equals(this.name, locationValidationEvidence.name) &&
+ Objects.equals(this.customerCode, locationValidationEvidence.customerCode) &&
+ Objects.equals(this.taxRegistrationNumber, locationValidationEvidence.taxRegistrationNumber) &&
+ Objects.equals(this.ip, locationValidationEvidence.ip) &&
+ Objects.equals(this.bin, locationValidationEvidence.bin) &&
+ Objects.equals(this.phone, locationValidationEvidence.phone) &&
+ Objects.equals(this.address, locationValidationEvidence.address) &&
+ Objects.equals(this.taxIdentifiers, locationValidationEvidence.taxIdentifiers);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, customerCode, taxRegistrationNumber, ip, bin, phone, address, taxIdentifiers);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class LocationValidationEvidence {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" customerCode: ").append(toIndentedString(customerCode)).append("\n");
+ sb.append(" taxRegistrationNumber: ").append(toIndentedString(taxRegistrationNumber)).append("\n");
+ sb.append(" ip: ").append(toIndentedString(ip)).append("\n");
+ sb.append(" bin: ").append(toIndentedString(bin)).append("\n");
+ sb.append(" phone: ").append(toIndentedString(phone)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" taxIdentifiers: ").append(toIndentedString(taxIdentifiers)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationStatus.java b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationStatus.java
new file mode 100644
index 0000000..d0a1c22
--- /dev/null
+++ b/springproject/generated-openapi_location_validation.yml/src/main/java/com/example/model/openapilocationvalidationyml/LocationValidationStatus.java
@@ -0,0 +1,56 @@
+package com.example.model.openapilocationvalidationyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The validation status of the location if a single country is identifiable.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:38.152028+05:30[Asia/Kolkata]")
+public enum LocationValidationStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID");
+
+ private String value;
+
+ LocationValidationStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static LocationValidationStatus fromValue(String value) {
+ for (LocationValidationStatus b : LocationValidationStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/.openapi-generator-ignore b/springproject/generated-openapi_tax.yml/.openapi-generator-ignore
new file mode 100644
index 0000000..7484ee5
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/springproject/generated-openapi_tax.yml/.openapi-generator/FILES b/springproject/generated-openapi_tax.yml/.openapi-generator/FILES
new file mode 100644
index 0000000..35c600e
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/.openapi-generator/FILES
@@ -0,0 +1,43 @@
+.openapi-generator-ignore
+README.md
+pom.xml
+src/main/java/com/example/api/openapitaxyml/AddressApi.java
+src/main/java/com/example/api/openapitaxyml/ApiUtil.java
+src/main/java/com/example/api/openapitaxyml/CredentialsApi.java
+src/main/java/com/example/api/openapitaxyml/CreditNotesApi.java
+src/main/java/com/example/api/openapitaxyml/HealthApi.java
+src/main/java/com/example/api/openapitaxyml/InvoicesApi.java
+src/main/java/com/example/api/openapitaxyml/TaxEstimateApi.java
+src/main/java/com/example/model/openapitaxyml/Address.java
+src/main/java/com/example/model/openapitaxyml/AddressValidationRequest.java
+src/main/java/com/example/model/openapitaxyml/AddressValidationResponse.java
+src/main/java/com/example/model/openapitaxyml/AddressValidationStatus.java
+src/main/java/com/example/model/openapitaxyml/BasicErrorResponse.java
+src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityRequest.java
+src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityResponse.java
+src/main/java/com/example/model/openapitaxyml/CredentialStatus.java
+src/main/java/com/example/model/openapitaxyml/CredentialValidationResponse.java
+src/main/java/com/example/model/openapitaxyml/CreditNote.java
+src/main/java/com/example/model/openapitaxyml/CreditNoteRequest.java
+src/main/java/com/example/model/openapitaxyml/CreditNoteType.java
+src/main/java/com/example/model/openapitaxyml/Customer.java
+src/main/java/com/example/model/openapitaxyml/CustomerLocationEvidence.java
+src/main/java/com/example/model/openapitaxyml/DocumentStatus.java
+src/main/java/com/example/model/openapitaxyml/ErrorCode.java
+src/main/java/com/example/model/openapitaxyml/FieldItem.java
+src/main/java/com/example/model/openapitaxyml/HealthCheckComponent.java
+src/main/java/com/example/model/openapitaxyml/HealthCheckResponse.java
+src/main/java/com/example/model/openapitaxyml/HealthStatus.java
+src/main/java/com/example/model/openapitaxyml/Invoice.java
+src/main/java/com/example/model/openapitaxyml/InvoiceLineItem.java
+src/main/java/com/example/model/openapitaxyml/InvoiceRequest.java
+src/main/java/com/example/model/openapitaxyml/Seller.java
+src/main/java/com/example/model/openapitaxyml/TaxEstimationLineItemRequest.java
+src/main/java/com/example/model/openapitaxyml/TaxEstimationRequest.java
+src/main/java/com/example/model/openapitaxyml/TaxEstimationResponse.java
+src/main/java/com/example/model/openapitaxyml/TaxExemptType.java
+src/main/java/com/example/model/openapitaxyml/TaxJurisdiction.java
+src/main/java/com/example/model/openapitaxyml/TaxJurisdictionType.java
+src/main/java/com/example/model/openapitaxyml/TaxLineItem.java
+src/main/java/com/example/model/openapitaxyml/ValidationErrorResponse.java
+src/main/java/com/example/model/openapitaxyml/ValidationErrorResponseErrorsInner.java
diff --git a/springproject/generated-openapi_tax.yml/.openapi-generator/VERSION b/springproject/generated-openapi_tax.yml/.openapi-generator/VERSION
new file mode 100644
index 0000000..73a86b1
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
\ No newline at end of file
diff --git a/springproject/generated-openapi_tax.yml/README.md b/springproject/generated-openapi_tax.yml/README.md
new file mode 100644
index 0000000..d43a1de
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/README.md
@@ -0,0 +1,27 @@
+
+# OpenAPI generated API stub
+
+Spring Framework stub
+
+
+## Overview
+This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
+By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
+This is an example of building API stub interfaces in Java using the Spring framework.
+
+The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
+by adding ```@Controller``` classes that implement the interface. Eg:
+```java
+@Controller
+public class PetController implements PetApi {
+// implement all PetApi methods
+}
+```
+
+You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
+```java
+@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
+public interface PetClient extends PetApi {
+
+}
+```
diff --git a/springproject/generated-openapi_tax.yml/pom.xml b/springproject/generated-openapi_tax.yml/pom.xml
new file mode 100644
index 0000000..26e6db2
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/pom.xml
@@ -0,0 +1,74 @@
+
+ 4.0.0
+ org.openapitools
+ openapi-spring
+ jar
+ openapi-spring
+ 0.3.7
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ UTF-8
+ 1.6.14
+ 4.15.5
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.6
+
+
+
+ src/main/java
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.data
+ spring-data-commons
+
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.6
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/AddressApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/AddressApi.java
new file mode 100644
index 0000000..8449944
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/AddressApi.java
@@ -0,0 +1,147 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.AddressValidationRequest;
+import com.example.model.openapitaxyml.AddressValidationResponse;
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.CheckAddressTaxabilityRequest;
+import com.example.model.openapitaxyml.CheckAddressTaxabilityResponse;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import com.example.model.openapitaxyml.ValidationErrorResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Address", description = "Endpoints to validate an address and check its taxability.")
+public interface AddressApi {
+
+ /**
+ * POST /address/check-taxability : Check taxability
+ * Checks whether the tax address is valid in terms of tax calculation. This endpoint checks whether the address information of the customer is sufficient for the tax provider to return a tax rate. It does not consider the nexus status of the merchant and is mandatory to integrate for the tax provider.
+ *
+ * @param checkAddressTaxabilityRequest (optional)
+ * @return Tax can be calculated for the address provided. (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "checkAddressTaxability",
+ summary = "Check taxability",
+ description = "Checks whether the tax address is valid in terms of tax calculation. This endpoint checks whether the address information of the customer is sufficient for the tax provider to return a tax rate. It does not consider the nexus status of the merchant and is mandatory to integrate for the tax provider.",
+ tags = { "Address" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Tax can be calculated for the address provided.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CheckAddressTaxabilityResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ValidationErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/address/check-taxability",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity checkAddressTaxability(
+ @Parameter(name = "CheckAddressTaxabilityRequest", description = "") @Valid @RequestBody(required = false) CheckAddressTaxabilityRequest checkAddressTaxabilityRequest
+ );
+
+
+ /**
+ * POST /address/validate : Address validation
+ * Checks whether a given address is a valid delivery address for shipping purposes. The tax provider can decide whether to mention the full or valid address depending on their requirement.
+ *
+ * @param addressValidationRequest (optional)
+ * @return Address is validated successfully (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "validateAddress",
+ summary = "Address validation",
+ description = "Checks whether a given address is a valid delivery address for shipping purposes. The tax provider can decide whether to mention the full or valid address depending on their requirement.",
+ tags = { "Address" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Address is validated successfully", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = AddressValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ValidationErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/address/validate",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity validateAddress(
+ @Parameter(name = "AddressValidationRequest", description = "") @Valid @RequestBody(required = false) AddressValidationRequest addressValidationRequest
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/ApiUtil.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/ApiUtil.java
new file mode 100644
index 0000000..2383e51
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/ApiUtil.java
@@ -0,0 +1,19 @@
+package com.example.api.openapitaxyml;
+
+import org.springframework.web.context.request.NativeWebRequest;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiUtil {
+ public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
+ try {
+ HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
+ res.setCharacterEncoding("UTF-8");
+ res.addHeader("Content-Type", contentType);
+ res.getWriter().print(example);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CredentialsApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CredentialsApi.java
new file mode 100644
index 0000000..e7c5a1e
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CredentialsApi.java
@@ -0,0 +1,86 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.CredentialValidationResponse;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Authentication", description = "Endpoints to validate the credentials used for calling the Tax Service Adapter.")
+public interface CredentialsApi {
+
+ /**
+ * POST /credentials/validate : Validate credentials
+ * This endpoint is used to validate the credentials used to call the Service Provider.
+ *
+ * @return Authentication succeeded. (status code 200)
+ * or Authentication failed. (status code 401)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "validateCredentials",
+ summary = "Validate credentials",
+ description = "This endpoint is used to validate the credentials used to call the Service Provider.",
+ tags = { "Authentication" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Authentication succeeded.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Authentication failed.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credentials/validate",
+ produces = { "application/json" }
+ )
+ ResponseEntity validateCredentials(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CreditNotesApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CreditNotesApi.java
new file mode 100644
index 0000000..0d6ad1d
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/CreditNotesApi.java
@@ -0,0 +1,240 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.CreditNote;
+import com.example.model.openapitaxyml.CreditNoteRequest;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import com.example.model.openapitaxyml.ValidationErrorResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "CreditNote", description = "Endpoints to manage credit notes sent to the Tax Service Provider.")
+public interface CreditNotesApi {
+
+ /**
+ * POST /credit-notes/{creditNoteId}/commit : Commit credit note
+ * This endpoint is used to mark a credit note as committed. Once committed, the credit note is considered as finalized.
+ *
+ * @param creditNoteId The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider. (required)
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (optional)
+ * @return Credit note committed successfully. (status code 204)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "commitCreditNote",
+ summary = "Commit credit note",
+ description = "This endpoint is used to mark a credit note as committed. Once committed, the credit note is considered as finalized.",
+ tags = { "CreditNote" },
+ responses = {
+ @ApiResponse(responseCode = "204", description = "Credit note committed successfully."),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credit-notes/{creditNoteId}/commit",
+ produces = { "application/json" }
+ )
+ ResponseEntity commitCreditNote(
+ @Parameter(name = "creditNoteId", description = "The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("creditNoteId") String creditNoteId,
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", in = ParameterIn.QUERY) @Valid @RequestParam(value = "invoiceId", required = false) String invoiceId
+ );
+
+
+ /**
+ * POST /credit-notes : Create credit note
+ * This endpoint is used to send a credit note to the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
+ *
+ * @param creditNoteRequest (optional)
+ * @return Credit note created successfully. (status code 201)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "createCreditNote",
+ summary = "Create credit note",
+ description = "This endpoint is used to send a credit note to the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.",
+ tags = { "CreditNote" },
+ responses = {
+ @ApiResponse(responseCode = "201", description = "Credit note created successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CreditNote.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ValidationErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credit-notes",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity createCreditNote(
+ @Parameter(name = "CreditNoteRequest", description = "") @Valid @RequestBody(required = false) CreditNoteRequest creditNoteRequest
+ );
+
+
+ /**
+ * GET /credit-notes/{creditNoteId} : Retrieve credit note
+ * This endpoint is used to retrieve a specific credit note using the unique credit note id.
+ *
+ * @param creditNoteId The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider. (required)
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (optional)
+ * @return Credit note retrieved successfully. (status code 200)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchCreditNote",
+ summary = "Retrieve credit note",
+ description = "This endpoint is used to retrieve a specific credit note using the unique credit note id.",
+ tags = { "CreditNote" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Credit note retrieved successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CreditNote.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/credit-notes/{creditNoteId}",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchCreditNote(
+ @Parameter(name = "creditNoteId", description = "The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("creditNoteId") String creditNoteId,
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", in = ParameterIn.QUERY) @Valid @RequestParam(value = "invoiceId", required = false) String invoiceId
+ );
+
+
+ /**
+ * POST /credit-notes/{creditNoteId}/void : Void credit note
+ * This endpoint is used to void the credit note for a specific credit note id. Voiding reverses the credit note, thereby restoring the amount due on the invoice.
+ *
+ * @param creditNoteId The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider. (required)
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (optional)
+ * @return Credit note voided successfully. (status code 204)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "voidCreditNote",
+ summary = "Void credit note",
+ description = "This endpoint is used to void the credit note for a specific credit note id. Voiding reverses the credit note, thereby restoring the amount due on the invoice.",
+ tags = { "CreditNote" },
+ responses = {
+ @ApiResponse(responseCode = "204", description = "Credit note voided successfully."),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credit-notes/{creditNoteId}/void",
+ produces = { "application/json" }
+ )
+ ResponseEntity voidCreditNote(
+ @Parameter(name = "creditNoteId", description = "The unique identifier of the credit note at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("creditNoteId") String creditNoteId,
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", in = ParameterIn.QUERY) @Valid @RequestParam(value = "invoiceId", required = false) String invoiceId
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/HealthApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/HealthApi.java
new file mode 100644
index 0000000..4f22068
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/HealthApi.java
@@ -0,0 +1,81 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Health", description = "Endpoints to monitor the health of the Tax Service Provider and the Tax Service Adapter.")
+public interface HealthApi {
+
+ /**
+ * GET /health : Fetch the health status of the Service Provider.
+ * This endpoint is used to fetch the health status of the Service Provider.
+ *
+ * @return Service is healthy. (status code 200)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchHealth",
+ summary = "Fetch the health status of the Service Provider.",
+ description = "This endpoint is used to fetch the health status of the Service Provider.",
+ tags = { "Health" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Service is healthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/health",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchHealth(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/InvoicesApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/InvoicesApi.java
new file mode 100644
index 0000000..c3d74c7
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/InvoicesApi.java
@@ -0,0 +1,234 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import com.example.model.openapitaxyml.Invoice;
+import com.example.model.openapitaxyml.InvoiceRequest;
+import com.example.model.openapitaxyml.ValidationErrorResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Invoice", description = "Endpoints to manage invoices sent to the Tax Service Provider.")
+public interface InvoicesApi {
+
+ /**
+ * POST /invoices/{invoiceId}/commit : Commit Invoice
+ * This endpoint is used to commit an invoice for a given invoice id. Once committed, the invoice is considered to be finalized.
+ *
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (required)
+ * @return Invoice committed successfully. (status code 204)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "commitInvoice",
+ summary = "Commit Invoice",
+ description = "This endpoint is used to commit an invoice for a given invoice id. Once committed, the invoice is considered to be finalized.",
+ tags = { "Invoice" },
+ responses = {
+ @ApiResponse(responseCode = "204", description = "Invoice committed successfully."),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/invoices/{invoiceId}/commit",
+ produces = { "application/json" }
+ )
+ ResponseEntity commitInvoice(
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("invoiceId") String invoiceId
+ );
+
+
+ /**
+ * POST /invoices : Create Invoice
+ * This endpoint is used to send an invoice to the Tax Service Provider. Invoices created in Chargebee are statements of amounts owed by the Customer to the Merchant for a specific purchase.
+ *
+ * @param invoiceRequest (optional)
+ * @return Invoice created successfully. (status code 201)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "createInvoice",
+ summary = "Create Invoice",
+ description = "This endpoint is used to send an invoice to the Tax Service Provider. Invoices created in Chargebee are statements of amounts owed by the Customer to the Merchant for a specific purchase.",
+ tags = { "Invoice" },
+ responses = {
+ @ApiResponse(responseCode = "201", description = "Invoice created successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Invoice.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ValidationErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/invoices",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity createInvoice(
+ @Parameter(name = "InvoiceRequest", description = "") @Valid @RequestBody(required = false) InvoiceRequest invoiceRequest
+ );
+
+
+ /**
+ * GET /invoices/{invoiceId} : Retrieve Invoice
+ * This endpoint is used to retrieve an invoice for a given invoice id.
+ *
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (required)
+ * @return Invoice retrieved successfully. (status code 200)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchInvoice",
+ summary = "Retrieve Invoice",
+ description = "This endpoint is used to retrieve an invoice for a given invoice id.",
+ tags = { "Invoice" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Invoice retrieved successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = Invoice.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/invoices/{invoiceId}",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchInvoice(
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("invoiceId") String invoiceId
+ );
+
+
+ /**
+ * POST /invoices/{invoiceId}/void : Void Invoice
+ * This endpoint is used to mark a specific invoice as void. Voiding cancels the invoice without deleting it.
+ *
+ * @param invoiceId The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider. (required)
+ * @return Invoice voided successfully. (status code 204)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "voidInvoice",
+ summary = "Void Invoice",
+ description = "This endpoint is used to mark a specific invoice as void. Voiding cancels the invoice without deleting it.",
+ tags = { "Invoice" },
+ responses = {
+ @ApiResponse(responseCode = "204", description = "Invoice voided successfully."),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/invoices/{invoiceId}/void",
+ produces = { "application/json" }
+ )
+ ResponseEntity voidInvoice(
+ @Parameter(name = "invoiceId", description = "The unique identifier of the invoice at the Tax Service Adapter or Tax Service Provider.", required = true, in = ParameterIn.PATH) @PathVariable("invoiceId") String invoiceId
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/TaxEstimateApi.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/TaxEstimateApi.java
new file mode 100644
index 0000000..4a0d052
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/api/openapitaxyml/TaxEstimateApi.java
@@ -0,0 +1,96 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitaxyml;
+
+import com.example.model.openapitaxyml.BasicErrorResponse;
+import com.example.model.openapitaxyml.HealthCheckResponse;
+import com.example.model.openapitaxyml.TaxEstimationRequest;
+import com.example.model.openapitaxyml.TaxEstimationResponse;
+import com.example.model.openapitaxyml.ValidationErrorResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "TaxEstimate", description = "Endpoints to estimate taxes.")
+public interface TaxEstimateApi {
+
+ /**
+ * POST /tax-estimate : Estimate tax
+ * This endpoint is used to estimate taxes for a set of line items being sold by the Merchant to a Customer.
+ *
+ * @param taxEstimationRequest (optional)
+ * @return Tax estimated successfully for given line items. (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "estimateTaxes",
+ summary = "Estimate tax",
+ description = "This endpoint is used to estimate taxes for a set of line items being sold by the Merchant to a Customer.",
+ tags = { "TaxEstimate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Tax estimated successfully for given line items.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TaxEstimationResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = ValidationErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/tax-estimate",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity estimateTaxes(
+ @Parameter(name = "TaxEstimationRequest", description = "") @Valid @RequestBody(required = false) TaxEstimationRequest taxEstimationRequest
+ );
+
+}
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Address.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Address.java
new file mode 100644
index 0000000..026ba40
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Address.java
@@ -0,0 +1,228 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Represents the address used for validation.
+ */
+
+@Schema(name = "Address", description = "Represents the address used for validation.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class Address {
+
+ private String line1;
+
+ private String line2;
+
+ private String line3;
+
+ private String city;
+
+ private String state;
+
+ private String postalCode;
+
+ private String country;
+
+ public Address line1(String line1) {
+ this.line1 = line1;
+ return this;
+ }
+
+ /**
+ * First line of the street address
+ * @return line1
+ */
+ @Size(max = 180)
+ @Schema(name = "line1", description = "First line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line1")
+ public String getLine1() {
+ return line1;
+ }
+
+ public void setLine1(String line1) {
+ this.line1 = line1;
+ }
+
+ public Address line2(String line2) {
+ this.line2 = line2;
+ return this;
+ }
+
+ /**
+ * Second line of the street address
+ * @return line2
+ */
+ @Size(max = 150)
+ @Schema(name = "line2", description = "Second line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line2")
+ public String getLine2() {
+ return line2;
+ }
+
+ public void setLine2(String line2) {
+ this.line2 = line2;
+ }
+
+ public Address line3(String line3) {
+ this.line3 = line3;
+ return this;
+ }
+
+ /**
+ * Third line of the street address
+ * @return line3
+ */
+ @Size(max = 150)
+ @Schema(name = "line3", description = "Third line of the street address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("line3")
+ public String getLine3() {
+ return line3;
+ }
+
+ public void setLine3(String line3) {
+ this.line3 = line3;
+ }
+
+ public Address city(String city) {
+ this.city = city;
+ return this;
+ }
+
+ /**
+ * The city of the address
+ * @return city
+ */
+ @Size(max = 50)
+ @Schema(name = "city", description = "The city of the address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("city")
+ public String getCity() {
+ return city;
+ }
+
+ public void setCity(String city) {
+ this.city = city;
+ }
+
+ public Address state(String state) {
+ this.state = state;
+ return this;
+ }
+
+ /**
+ * The state of the address following the ISO 3166-2 state/province code without the country prefix.
+ * @return state
+ */
+ @Size(max = 50)
+ @Schema(name = "state", description = "The state of the address following the ISO 3166-2 state/province code without the country prefix.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("state")
+ public String getState() {
+ return state;
+ }
+
+ public void setState(String state) {
+ this.state = state;
+ }
+
+ public Address postalCode(String postalCode) {
+ this.postalCode = postalCode;
+ return this;
+ }
+
+ /**
+ * Postal Code / Zip Code of the address.
+ * @return postalCode
+ */
+ @Size(max = 20)
+ @Schema(name = "postalCode", description = "Postal Code / Zip Code of the address.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("postalCode")
+ public String getPostalCode() {
+ return postalCode;
+ }
+
+ public void setPostalCode(String postalCode) {
+ this.postalCode = postalCode;
+ }
+
+ public Address country(String country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * The country of the address following the ISO 3166-1 alpha-2 standard.
+ * @return country
+ */
+ @Size(max = 2)
+ @Schema(name = "country", description = "The country of the address following the ISO 3166-1 alpha-2 standard.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("country")
+ public String getCountry() {
+ return country;
+ }
+
+ public void setCountry(String country) {
+ this.country = country;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Address address = (Address) o;
+ return Objects.equals(this.line1, address.line1) &&
+ Objects.equals(this.line2, address.line2) &&
+ Objects.equals(this.line3, address.line3) &&
+ Objects.equals(this.city, address.city) &&
+ Objects.equals(this.state, address.state) &&
+ Objects.equals(this.postalCode, address.postalCode) &&
+ Objects.equals(this.country, address.country);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(line1, line2, line3, city, state, postalCode, country);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Address {\n");
+ sb.append(" line1: ").append(toIndentedString(line1)).append("\n");
+ sb.append(" line2: ").append(toIndentedString(line2)).append("\n");
+ sb.append(" line3: ").append(toIndentedString(line3)).append("\n");
+ sb.append(" city: ").append(toIndentedString(city)).append("\n");
+ sb.append(" state: ").append(toIndentedString(state)).append("\n");
+ sb.append(" postalCode: ").append(toIndentedString(postalCode)).append("\n");
+ sb.append(" country: ").append(toIndentedString(country)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationRequest.java
new file mode 100644
index 0000000..f7ebf31
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationRequest.java
@@ -0,0 +1,85 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Address;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The verification request containing the address. The following fields are mandatory - - line1 - city - postalCode - state - country
+ */
+
+@Schema(name = "AddressValidationRequest", description = "The verification request containing the address. The following fields are mandatory - - line1 - city - postalCode - state - country")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class AddressValidationRequest {
+
+ private Address address;
+
+ public AddressValidationRequest address(Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Get address
+ * @return address
+ */
+ @Valid
+ @Schema(name = "address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("address")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AddressValidationRequest addressValidationRequest = (AddressValidationRequest) o;
+ return Objects.equals(this.address, addressValidationRequest.address);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(address);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AddressValidationRequest {\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationResponse.java
new file mode 100644
index 0000000..b13399e
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationResponse.java
@@ -0,0 +1,96 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.AddressValidationStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * AddressValidationResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class AddressValidationResponse {
+
+ private AddressValidationStatus status;
+
+ public AddressValidationResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public AddressValidationResponse(AddressValidationStatus status) {
+ this.status = status;
+ }
+
+ public AddressValidationResponse status(AddressValidationStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public AddressValidationStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(AddressValidationStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ AddressValidationResponse addressValidationResponse = (AddressValidationResponse) o;
+ return Objects.equals(this.status, addressValidationResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(status);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class AddressValidationResponse {\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationStatus.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationStatus.java
new file mode 100644
index 0000000..49f533e
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/AddressValidationStatus.java
@@ -0,0 +1,56 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The validation status of an address.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum AddressValidationStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID");
+
+ private String value;
+
+ AddressValidationStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static AddressValidationStatus fromValue(String value) {
+ for (AddressValidationStatus b : AddressValidationStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/BasicErrorResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/BasicErrorResponse.java
new file mode 100644
index 0000000..cdeb909
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/BasicErrorResponse.java
@@ -0,0 +1,120 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.net.URI;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The basic error response containing the error message and the help documentation link.
+ */
+
+@Schema(name = "BasicErrorResponse", description = "The basic error response containing the error message and the help documentation link.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class BasicErrorResponse {
+
+ private String message;
+
+ private URI helpUrl;
+
+ public BasicErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public BasicErrorResponse(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * The description of the error with details about it's cause.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Invalid Credentials", description = "The description of the error with details about it's cause.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse helpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+ @Valid
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Authentication", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public URI getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BasicErrorResponse basicErrorResponse = (BasicErrorResponse) o;
+ return Objects.equals(this.message, basicErrorResponse.message) &&
+ Objects.equals(this.helpUrl, basicErrorResponse.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BasicErrorResponse {\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityRequest.java
new file mode 100644
index 0000000..1bd288a
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityRequest.java
@@ -0,0 +1,85 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Address;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The taxability request containing the address. Postal code & Country is mandatory.
+ */
+
+@Schema(name = "CheckAddressTaxabilityRequest", description = "The taxability request containing the address. Postal code & Country is mandatory.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CheckAddressTaxabilityRequest {
+
+ private Address address;
+
+ public CheckAddressTaxabilityRequest address(Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Get address
+ * @return address
+ */
+ @Valid
+ @Schema(name = "address", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("address")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CheckAddressTaxabilityRequest checkAddressTaxabilityRequest = (CheckAddressTaxabilityRequest) o;
+ return Objects.equals(this.address, checkAddressTaxabilityRequest.address);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(address);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CheckAddressTaxabilityRequest {\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityResponse.java
new file mode 100644
index 0000000..e7f3cc7
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CheckAddressTaxabilityResponse.java
@@ -0,0 +1,94 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * CheckAddressTaxabilityResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CheckAddressTaxabilityResponse {
+
+ private Boolean isTaxable;
+
+ public CheckAddressTaxabilityResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CheckAddressTaxabilityResponse(Boolean isTaxable) {
+ this.isTaxable = isTaxable;
+ }
+
+ public CheckAddressTaxabilityResponse isTaxable(Boolean isTaxable) {
+ this.isTaxable = isTaxable;
+ return this;
+ }
+
+ /**
+ * The taxability of the address.
+ * @return isTaxable
+ */
+ @NotNull
+ @Schema(name = "isTaxable", description = "The taxability of the address.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("isTaxable")
+ public Boolean getIsTaxable() {
+ return isTaxable;
+ }
+
+ public void setIsTaxable(Boolean isTaxable) {
+ this.isTaxable = isTaxable;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CheckAddressTaxabilityResponse checkAddressTaxabilityResponse = (CheckAddressTaxabilityResponse) o;
+ return Objects.equals(this.isTaxable, checkAddressTaxabilityResponse.isTaxable);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(isTaxable);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CheckAddressTaxabilityResponse {\n");
+ sb.append(" isTaxable: ").append(toIndentedString(isTaxable)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialStatus.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialStatus.java
new file mode 100644
index 0000000..f3609bd
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialStatus.java
@@ -0,0 +1,56 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of the credentials used for authentication.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum CredentialStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID");
+
+ private String value;
+
+ CredentialStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static CredentialStatus fromValue(String value) {
+ for (CredentialStatus b : CredentialStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialValidationResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialValidationResponse.java
new file mode 100644
index 0000000..75c48e9
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CredentialValidationResponse.java
@@ -0,0 +1,96 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.CredentialStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * CredentialValidationResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CredentialValidationResponse {
+
+ private CredentialStatus status;
+
+ public CredentialValidationResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CredentialValidationResponse(CredentialStatus status) {
+ this.status = status;
+ }
+
+ public CredentialValidationResponse status(CredentialStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public CredentialStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(CredentialStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CredentialValidationResponse credentialValidationResponse = (CredentialValidationResponse) o;
+ return Objects.equals(this.status, credentialValidationResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(status);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CredentialValidationResponse {\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNote.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNote.java
new file mode 100644
index 0000000..ce0692f
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNote.java
@@ -0,0 +1,562 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.CreditNoteType;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.DocumentStatus;
+import com.example.model.openapitaxyml.InvoiceLineItem;
+import com.example.model.openapitaxyml.Seller;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of a credit note returned by the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
+ */
+
+@Schema(name = "CreditNote", description = "The details of a credit note returned by the Tax Service Adapter. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CreditNote {
+
+ private String creditNoteId;
+
+ private String creditNoteCode;
+
+ private String invoiceCode;
+
+ private String invoiceId;
+
+ private CreditNoteType creditNoteType;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime documentDateTime;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime taxDateTime;
+
+ private DocumentStatus status;
+
+ private String currency;
+
+ private Seller seller;
+
+ private Customer customer;
+
+ private Double discountAmount;
+
+ private Double subtotal;
+
+ private Double exemptAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double total;
+
+ private Double roundingAmount;
+
+ @Valid
+ private List<@Valid InvoiceLineItem> lineItems = new ArrayList<>();
+
+ public CreditNote() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CreditNote(String creditNoteId, String creditNoteCode, CreditNoteType creditNoteType, OffsetDateTime documentDateTime, DocumentStatus status, String currency, Seller seller, Customer customer, Double discountAmount, Double exemptAmount, Double taxableAmount, Double taxAmount, Double total, List<@Valid InvoiceLineItem> lineItems) {
+ this.creditNoteId = creditNoteId;
+ this.creditNoteCode = creditNoteCode;
+ this.creditNoteType = creditNoteType;
+ this.documentDateTime = documentDateTime;
+ this.status = status;
+ this.currency = currency;
+ this.seller = seller;
+ this.customer = customer;
+ this.discountAmount = discountAmount;
+ this.exemptAmount = exemptAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ this.total = total;
+ this.lineItems = lineItems;
+ }
+
+ public CreditNote creditNoteId(String creditNoteId) {
+ this.creditNoteId = creditNoteId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the credit note at the Tax Service Provider or Tax Service Adapter.
+ * @return creditNoteId
+ */
+ @NotNull
+ @Schema(name = "creditNoteId", description = "The unique identifier of the credit note at the Tax Service Provider or Tax Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("creditNoteId")
+ public String getCreditNoteId() {
+ return creditNoteId;
+ }
+
+ public void setCreditNoteId(String creditNoteId) {
+ this.creditNoteId = creditNoteId;
+ }
+
+ public CreditNote creditNoteCode(String creditNoteCode) {
+ this.creditNoteCode = creditNoteCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the credit note in Chargebee.
+ * @return creditNoteCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "creditNoteCode", description = "The unique identifier of the credit note in Chargebee.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("creditNoteCode")
+ public String getCreditNoteCode() {
+ return creditNoteCode;
+ }
+
+ public void setCreditNoteCode(String creditNoteCode) {
+ this.creditNoteCode = creditNoteCode;
+ }
+
+ public CreditNote invoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in Chargebee to which this credit note belongs.
+ * @return invoiceCode
+ */
+ @Size(max = 50)
+ @Schema(name = "invoiceCode", description = "The unique identifier of the invoice in Chargebee to which this credit note belongs.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("invoiceCode")
+ public String getInvoiceCode() {
+ return invoiceCode;
+ }
+
+ public void setInvoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ }
+
+ public CreditNote invoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.
+ * @return invoiceId
+ */
+
+ @Schema(name = "invoiceId", description = "The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("invoiceId")
+ public String getInvoiceId() {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+
+ public CreditNote creditNoteType(CreditNoteType creditNoteType) {
+ this.creditNoteType = creditNoteType;
+ return this;
+ }
+
+ /**
+ * Get creditNoteType
+ * @return creditNoteType
+ */
+ @NotNull @Valid
+ @Schema(name = "creditNoteType", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("creditNoteType")
+ public CreditNoteType getCreditNoteType() {
+ return creditNoteType;
+ }
+
+ public void setCreditNoteType(CreditNoteType creditNoteType) {
+ this.creditNoteType = creditNoteType;
+ }
+
+ public CreditNote documentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the credit note was created in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT. In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return documentDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "documentDateTime", description = "The date and time at which the credit note was created in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT. In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("documentDateTime")
+ public OffsetDateTime getDocumentDateTime() {
+ return documentDateTime;
+ }
+
+ public void setDocumentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ }
+
+ public CreditNote taxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return taxDateTime
+ */
+ @Valid
+ @Schema(name = "taxDateTime", description = "The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxDateTime")
+ public OffsetDateTime getTaxDateTime() {
+ return taxDateTime;
+ }
+
+ public void setTaxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ }
+
+ public CreditNote status(DocumentStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public DocumentStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(DocumentStatus status) {
+ this.status = status;
+ }
+
+ public CreditNote currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public CreditNote seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public CreditNote customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public CreditNote discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The total discount applied. This is the sum of all `lineItems.discount`.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The total discount applied. This is the sum of all `lineItems.discount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public CreditNote subtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ return this;
+ }
+
+ /**
+ * The amount after discounts. This is the sum of all `lineItems.subtotal`.
+ * @return subtotal
+ */
+
+ @Schema(name = "subtotal", description = "The amount after discounts. This is the sum of all `lineItems.subtotal`.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("subtotal")
+ public Double getSubtotal() {
+ return subtotal;
+ }
+
+ public void setSubtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ }
+
+ public CreditNote exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The amount exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The amount exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public CreditNote taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The amount upon which the tax is calculated.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The amount upon which the tax is calculated.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public CreditNote taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The total tax payable. This is the sum of all `lineItems.taxAmount`.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The total tax payable. This is the sum of all `lineItems.taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public CreditNote total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total amount of the credit note. `total` can be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total amount of the credit note. `total` can be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public CreditNote roundingAmount(Double roundingAmount) {
+ this.roundingAmount = roundingAmount;
+ return this;
+ }
+
+ /**
+ * The rounding amount added to the total amount to account for fractional correction.
+ * @return roundingAmount
+ */
+
+ @Schema(name = "roundingAmount", description = "The rounding amount added to the total amount to account for fractional correction.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("roundingAmount")
+ public Double getRoundingAmount() {
+ return roundingAmount;
+ }
+
+ public void setRoundingAmount(Double roundingAmount) {
+ this.roundingAmount = roundingAmount;
+ }
+
+ public CreditNote lineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public CreditNote addLineItemsItem(InvoiceLineItem lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * Get lineItems
+ * @return lineItems
+ */
+ @NotNull @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid InvoiceLineItem> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreditNote creditNote = (CreditNote) o;
+ return Objects.equals(this.creditNoteId, creditNote.creditNoteId) &&
+ Objects.equals(this.creditNoteCode, creditNote.creditNoteCode) &&
+ Objects.equals(this.invoiceCode, creditNote.invoiceCode) &&
+ Objects.equals(this.invoiceId, creditNote.invoiceId) &&
+ Objects.equals(this.creditNoteType, creditNote.creditNoteType) &&
+ Objects.equals(this.documentDateTime, creditNote.documentDateTime) &&
+ Objects.equals(this.taxDateTime, creditNote.taxDateTime) &&
+ Objects.equals(this.status, creditNote.status) &&
+ Objects.equals(this.currency, creditNote.currency) &&
+ Objects.equals(this.seller, creditNote.seller) &&
+ Objects.equals(this.customer, creditNote.customer) &&
+ Objects.equals(this.discountAmount, creditNote.discountAmount) &&
+ Objects.equals(this.subtotal, creditNote.subtotal) &&
+ Objects.equals(this.exemptAmount, creditNote.exemptAmount) &&
+ Objects.equals(this.taxableAmount, creditNote.taxableAmount) &&
+ Objects.equals(this.taxAmount, creditNote.taxAmount) &&
+ Objects.equals(this.total, creditNote.total) &&
+ Objects.equals(this.roundingAmount, creditNote.roundingAmount) &&
+ Objects.equals(this.lineItems, creditNote.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(creditNoteId, creditNoteCode, invoiceCode, invoiceId, creditNoteType, documentDateTime, taxDateTime, status, currency, seller, customer, discountAmount, subtotal, exemptAmount, taxableAmount, taxAmount, total, roundingAmount, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreditNote {\n");
+ sb.append(" creditNoteId: ").append(toIndentedString(creditNoteId)).append("\n");
+ sb.append(" creditNoteCode: ").append(toIndentedString(creditNoteCode)).append("\n");
+ sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
+ sb.append(" invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
+ sb.append(" creditNoteType: ").append(toIndentedString(creditNoteType)).append("\n");
+ sb.append(" documentDateTime: ").append(toIndentedString(documentDateTime)).append("\n");
+ sb.append(" taxDateTime: ").append(toIndentedString(taxDateTime)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" roundingAmount: ").append(toIndentedString(roundingAmount)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteRequest.java
new file mode 100644
index 0000000..a37415e
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteRequest.java
@@ -0,0 +1,486 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.CreditNoteType;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.InvoiceLineItem;
+import com.example.model.openapitaxyml.Seller;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of a credit note sent to the Tax Service Adapter by Chargebee. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.
+ */
+
+@Schema(name = "CreditNoteRequest", description = "The details of a credit note sent to the Tax Service Adapter by Chargebee. A credit note is used to reduce the amount due on an invoice. If the credit note is issued after payments have been made for the invoice, refunds can be issued to the Customer.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CreditNoteRequest {
+
+ private String creditNoteCode;
+
+ private String invoiceCode;
+
+ private String invoiceId;
+
+ private CreditNoteType creditNoteType;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime documentDateTime;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime taxDateTime;
+
+ private String currency;
+
+ private Seller seller;
+
+ private Customer customer;
+
+ private Double total;
+
+ private Double exemptAmount;
+
+ private Double discountAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double roundingAmount;
+
+ @Valid
+ private List<@Valid InvoiceLineItem> lineItems;
+
+ public CreditNoteRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CreditNoteRequest(String creditNoteCode, CreditNoteType creditNoteType, OffsetDateTime documentDateTime, String currency, Seller seller, Customer customer, Double total, Double exemptAmount, Double discountAmount, Double taxableAmount, Double taxAmount) {
+ this.creditNoteCode = creditNoteCode;
+ this.creditNoteType = creditNoteType;
+ this.documentDateTime = documentDateTime;
+ this.currency = currency;
+ this.seller = seller;
+ this.customer = customer;
+ this.total = total;
+ this.exemptAmount = exemptAmount;
+ this.discountAmount = discountAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ }
+
+ public CreditNoteRequest creditNoteCode(String creditNoteCode) {
+ this.creditNoteCode = creditNoteCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the credit note in Chargebee.
+ * @return creditNoteCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "creditNoteCode", description = "The unique identifier of the credit note in Chargebee.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("creditNoteCode")
+ public String getCreditNoteCode() {
+ return creditNoteCode;
+ }
+
+ public void setCreditNoteCode(String creditNoteCode) {
+ this.creditNoteCode = creditNoteCode;
+ }
+
+ public CreditNoteRequest invoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in Chargebee to which this credit note belongs.
+ * @return invoiceCode
+ */
+ @Size(max = 50)
+ @Schema(name = "invoiceCode", description = "The unique identifier of the invoice in Chargebee to which this credit note belongs.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("invoiceCode")
+ public String getInvoiceCode() {
+ return invoiceCode;
+ }
+
+ public void setInvoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ }
+
+ public CreditNoteRequest invoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.
+ * @return invoiceId
+ */
+
+ @Schema(name = "invoiceId", description = "The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("invoiceId")
+ public String getInvoiceId() {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+
+ public CreditNoteRequest creditNoteType(CreditNoteType creditNoteType) {
+ this.creditNoteType = creditNoteType;
+ return this;
+ }
+
+ /**
+ * Get creditNoteType
+ * @return creditNoteType
+ */
+ @NotNull @Valid
+ @Schema(name = "creditNoteType", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("creditNoteType")
+ public CreditNoteType getCreditNoteType() {
+ return creditNoteType;
+ }
+
+ public void setCreditNoteType(CreditNoteType creditNoteType) {
+ this.creditNoteType = creditNoteType;
+ }
+
+ public CreditNoteRequest documentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the credit note was created in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT. In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return documentDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "documentDateTime", description = "The date and time at which the credit note was created in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT. In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("documentDateTime")
+ public OffsetDateTime getDocumentDateTime() {
+ return documentDateTime;
+ }
+
+ public void setDocumentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ }
+
+ public CreditNoteRequest taxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return taxDateTime
+ */
+ @Valid
+ @Schema(name = "taxDateTime", description = "The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxDateTime")
+ public OffsetDateTime getTaxDateTime() {
+ return taxDateTime;
+ }
+
+ public void setTaxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ }
+
+ public CreditNoteRequest currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public CreditNoteRequest seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public CreditNoteRequest customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public CreditNoteRequest total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total amount of the credit note. `total` can be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total amount of the credit note. `total` can be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public CreditNoteRequest exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The amount exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The amount exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public CreditNoteRequest discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The total discount applied. This is the sum of all `lineItems.discount`.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The total discount applied. This is the sum of all `lineItems.discount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public CreditNoteRequest taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The amount upon which the tax is calculated.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The amount upon which the tax is calculated.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public CreditNoteRequest taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The total tax payable. This is the sum of all `lineItems.taxAmount`.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The total tax payable. This is the sum of all `lineItems.taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public CreditNoteRequest roundingAmount(Double roundingAmount) {
+ this.roundingAmount = roundingAmount;
+ return this;
+ }
+
+ /**
+ * The rounding amount added to the total amount to account for fractional correction.
+ * @return roundingAmount
+ */
+
+ @Schema(name = "roundingAmount", description = "The rounding amount added to the total amount to account for fractional correction.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("roundingAmount")
+ public Double getRoundingAmount() {
+ return roundingAmount;
+ }
+
+ public void setRoundingAmount(Double roundingAmount) {
+ this.roundingAmount = roundingAmount;
+ }
+
+ public CreditNoteRequest lineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public CreditNoteRequest addLineItemsItem(InvoiceLineItem lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * Get lineItems
+ * @return lineItems
+ */
+ @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid InvoiceLineItem> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CreditNoteRequest creditNoteRequest = (CreditNoteRequest) o;
+ return Objects.equals(this.creditNoteCode, creditNoteRequest.creditNoteCode) &&
+ Objects.equals(this.invoiceCode, creditNoteRequest.invoiceCode) &&
+ Objects.equals(this.invoiceId, creditNoteRequest.invoiceId) &&
+ Objects.equals(this.creditNoteType, creditNoteRequest.creditNoteType) &&
+ Objects.equals(this.documentDateTime, creditNoteRequest.documentDateTime) &&
+ Objects.equals(this.taxDateTime, creditNoteRequest.taxDateTime) &&
+ Objects.equals(this.currency, creditNoteRequest.currency) &&
+ Objects.equals(this.seller, creditNoteRequest.seller) &&
+ Objects.equals(this.customer, creditNoteRequest.customer) &&
+ Objects.equals(this.total, creditNoteRequest.total) &&
+ Objects.equals(this.exemptAmount, creditNoteRequest.exemptAmount) &&
+ Objects.equals(this.discountAmount, creditNoteRequest.discountAmount) &&
+ Objects.equals(this.taxableAmount, creditNoteRequest.taxableAmount) &&
+ Objects.equals(this.taxAmount, creditNoteRequest.taxAmount) &&
+ Objects.equals(this.roundingAmount, creditNoteRequest.roundingAmount) &&
+ Objects.equals(this.lineItems, creditNoteRequest.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(creditNoteCode, invoiceCode, invoiceId, creditNoteType, documentDateTime, taxDateTime, currency, seller, customer, total, exemptAmount, discountAmount, taxableAmount, taxAmount, roundingAmount, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CreditNoteRequest {\n");
+ sb.append(" creditNoteCode: ").append(toIndentedString(creditNoteCode)).append("\n");
+ sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
+ sb.append(" invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
+ sb.append(" creditNoteType: ").append(toIndentedString(creditNoteType)).append("\n");
+ sb.append(" documentDateTime: ").append(toIndentedString(documentDateTime)).append("\n");
+ sb.append(" taxDateTime: ").append(toIndentedString(taxDateTime)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" roundingAmount: ").append(toIndentedString(roundingAmount)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteType.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteType.java
new file mode 100644
index 0000000..4823c6c
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CreditNoteType.java
@@ -0,0 +1,56 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Whether the credit note was created for the full amount on the invoice or only for a part of the invoice amount.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum CreditNoteType {
+
+ FULL("FULL"),
+
+ PARTIAL("PARTIAL");
+
+ private String value;
+
+ CreditNoteType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static CreditNoteType fromValue(String value) {
+ for (CreditNoteType b : CreditNoteType.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Customer.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Customer.java
new file mode 100644
index 0000000..a4a3fe5
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Customer.java
@@ -0,0 +1,255 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Address;
+import com.example.model.openapitaxyml.CustomerLocationEvidence;
+import com.example.model.openapitaxyml.FieldItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of the Customer.
+ */
+
+@Schema(name = "Customer", description = "The details of the Customer.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class Customer {
+
+ private String name;
+
+ private String customerCode;
+
+ private Address address;
+
+ private String taxRegistrationNumber;
+
+ @Valid
+ private List<@Valid FieldItem> taxIdentifiers;
+
+ private Boolean hasNexus;
+
+ private CustomerLocationEvidence locationEvidence;
+
+ public Customer() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public Customer(String customerCode, Address address) {
+ this.customerCode = customerCode;
+ this.address = address;
+ }
+
+ public Customer name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the Customer in Chargebee.
+ * @return name
+ */
+ @Size(max = 50)
+ @Schema(name = "name", description = "The name of the Customer in Chargebee.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Customer customerCode(String customerCode) {
+ this.customerCode = customerCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier for the Customer in Chargebee.
+ * @return customerCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "customerCode", description = "The unique identifier for the Customer in Chargebee.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customerCode")
+ public String getCustomerCode() {
+ return customerCode;
+ }
+
+ public void setCustomerCode(String customerCode) {
+ this.customerCode = customerCode;
+ }
+
+ public Customer address(Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Get address
+ * @return address
+ */
+ @NotNull @Valid
+ @Schema(name = "address", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("address")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ public Customer taxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ return this;
+ }
+
+ /**
+ * The tax registration number of a business in a country. For example, this is the GSTIN for India or the VAT number for EU or Australia.
+ * @return taxRegistrationNumber
+ */
+ @Size(max = 30)
+ @Schema(name = "taxRegistrationNumber", description = "The tax registration number of a business in a country. For example, this is the GSTIN for India or the VAT number for EU or Australia.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxRegistrationNumber")
+ public String getTaxRegistrationNumber() {
+ return taxRegistrationNumber;
+ }
+
+ public void setTaxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ }
+
+ public Customer taxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ return this;
+ }
+
+ public Customer addTaxIdentifiersItem(FieldItem taxIdentifiersItem) {
+ if (this.taxIdentifiers == null) {
+ this.taxIdentifiers = new ArrayList<>();
+ }
+ this.taxIdentifiers.add(taxIdentifiersItem);
+ return this;
+ }
+
+ /**
+ * It represents the information related to the customer's tax identifiers. This includes details such as exemption status etc.
+ * @return taxIdentifiers
+ */
+ @Valid @Size(max = 10)
+ @Schema(name = "taxIdentifiers", description = "It represents the information related to the customer's tax identifiers. This includes details such as exemption status etc.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxIdentifiers")
+ public List<@Valid FieldItem> getTaxIdentifiers() {
+ return taxIdentifiers;
+ }
+
+ public void setTaxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ }
+
+ public Customer hasNexus(Boolean hasNexus) {
+ this.hasNexus = hasNexus;
+ return this;
+ }
+
+ /**
+ * Determines whether a tax nexus exists between the Seller and the tax authority at the address provided.
+ * @return hasNexus
+ */
+
+ @Schema(name = "hasNexus", description = "Determines whether a tax nexus exists between the Seller and the tax authority at the address provided.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("hasNexus")
+ public Boolean getHasNexus() {
+ return hasNexus;
+ }
+
+ public void setHasNexus(Boolean hasNexus) {
+ this.hasNexus = hasNexus;
+ }
+
+ public Customer locationEvidence(CustomerLocationEvidence locationEvidence) {
+ this.locationEvidence = locationEvidence;
+ return this;
+ }
+
+ /**
+ * Get locationEvidence
+ * @return locationEvidence
+ */
+ @Valid
+ @Schema(name = "locationEvidence", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("locationEvidence")
+ public CustomerLocationEvidence getLocationEvidence() {
+ return locationEvidence;
+ }
+
+ public void setLocationEvidence(CustomerLocationEvidence locationEvidence) {
+ this.locationEvidence = locationEvidence;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Customer customer = (Customer) o;
+ return Objects.equals(this.name, customer.name) &&
+ Objects.equals(this.customerCode, customer.customerCode) &&
+ Objects.equals(this.address, customer.address) &&
+ Objects.equals(this.taxRegistrationNumber, customer.taxRegistrationNumber) &&
+ Objects.equals(this.taxIdentifiers, customer.taxIdentifiers) &&
+ Objects.equals(this.hasNexus, customer.hasNexus) &&
+ Objects.equals(this.locationEvidence, customer.locationEvidence);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, customerCode, address, taxRegistrationNumber, taxIdentifiers, hasNexus, locationEvidence);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Customer {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" customerCode: ").append(toIndentedString(customerCode)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" taxRegistrationNumber: ").append(toIndentedString(taxRegistrationNumber)).append("\n");
+ sb.append(" taxIdentifiers: ").append(toIndentedString(taxIdentifiers)).append("\n");
+ sb.append(" hasNexus: ").append(toIndentedString(hasNexus)).append("\n");
+ sb.append(" locationEvidence: ").append(toIndentedString(locationEvidence)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CustomerLocationEvidence.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CustomerLocationEvidence.java
new file mode 100644
index 0000000..a5ee236
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/CustomerLocationEvidence.java
@@ -0,0 +1,132 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Represent the properties for customer location evidence.
+ */
+
+@Schema(name = "CustomerLocationEvidence", description = "Represent the properties for customer location evidence.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class CustomerLocationEvidence {
+
+ private String ip;
+
+ private String bin;
+
+ private String paymentCountryCode;
+
+ public CustomerLocationEvidence ip(String ip) {
+ this.ip = ip;
+ return this;
+ }
+
+ /**
+ * The customer's IP to determine which country the customer belongs to.
+ * @return ip
+ */
+ @Size(max = 50)
+ @Schema(name = "ip", description = "The customer's IP to determine which country the customer belongs to.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("ip")
+ public String getIp() {
+ return ip;
+ }
+
+ public void setIp(String ip) {
+ this.ip = ip;
+ }
+
+ public CustomerLocationEvidence bin(String bin) {
+ this.bin = bin;
+ return this;
+ }
+
+ /**
+ * The country associated with a card by using the first or last 6 digits of the Bank Identification Number.
+ * @return bin
+ */
+ @Size(max = 15)
+ @Schema(name = "bin", description = "The country associated with a card by using the first or last 6 digits of the Bank Identification Number.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("bin")
+ public String getBin() {
+ return bin;
+ }
+
+ public void setBin(String bin) {
+ this.bin = bin;
+ }
+
+ public CustomerLocationEvidence paymentCountryCode(String paymentCountryCode) {
+ this.paymentCountryCode = paymentCountryCode;
+ return this;
+ }
+
+ /**
+ * Identifies the country code associated with the payment method.
+ * @return paymentCountryCode
+ */
+ @Size(max = 5)
+ @Schema(name = "paymentCountryCode", description = "Identifies the country code associated with the payment method.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("paymentCountryCode")
+ public String getPaymentCountryCode() {
+ return paymentCountryCode;
+ }
+
+ public void setPaymentCountryCode(String paymentCountryCode) {
+ this.paymentCountryCode = paymentCountryCode;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CustomerLocationEvidence customerLocationEvidence = (CustomerLocationEvidence) o;
+ return Objects.equals(this.ip, customerLocationEvidence.ip) &&
+ Objects.equals(this.bin, customerLocationEvidence.bin) &&
+ Objects.equals(this.paymentCountryCode, customerLocationEvidence.paymentCountryCode);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(ip, bin, paymentCountryCode);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CustomerLocationEvidence {\n");
+ sb.append(" ip: ").append(toIndentedString(ip)).append("\n");
+ sb.append(" bin: ").append(toIndentedString(bin)).append("\n");
+ sb.append(" paymentCountryCode: ").append(toIndentedString(paymentCountryCode)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/DocumentStatus.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/DocumentStatus.java
new file mode 100644
index 0000000..2d854d8
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/DocumentStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Status of the invoice document.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum DocumentStatus {
+
+ PENDING("PENDING"),
+
+ COMMITTED("COMMITTED"),
+
+ VOIDED("VOIDED");
+
+ private String value;
+
+ DocumentStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static DocumentStatus fromValue(String value) {
+ for (DocumentStatus b : DocumentStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ErrorCode.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ErrorCode.java
new file mode 100644
index 0000000..683e3f4
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ErrorCode.java
@@ -0,0 +1,72 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The error codes classify the type of exception that occurred during processing the request.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum ErrorCode {
+
+ INVALID_OPERATION("INVALID_OPERATION"),
+
+ SERVICE_EXCEPTION("SERVICE_EXCEPTION"),
+
+ SERVICE_UNAVAILABLE("SERVICE_UNAVAILABLE"),
+
+ SERVICE_LIMIT_EXCEEDED("SERVICE_LIMIT_EXCEEDED"),
+
+ MISSING_REQUIRED_DATA("MISSING_REQUIRED_DATA"),
+
+ INVALID_DATA("INVALID_DATA"),
+
+ INVALID_TYPE("INVALID_TYPE"),
+
+ INVALID_FORMAT("INVALID_FORMAT"),
+
+ INVALID_RANGE("INVALID_RANGE"),
+
+ LOCATION_VALIDATION_FAILED("LOCATION_VALIDATION_FAILED");
+
+ private String value;
+
+ ErrorCode(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static ErrorCode fromValue(String value) {
+ for (ErrorCode b : ErrorCode.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/FieldItem.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/FieldItem.java
new file mode 100644
index 0000000..7120fce
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/FieldItem.java
@@ -0,0 +1,119 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * FieldItem
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class FieldItem {
+
+ private String id;
+
+ private String value;
+
+ public FieldItem() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public FieldItem(String id, String value) {
+ this.id = id;
+ this.value = value;
+ }
+
+ public FieldItem id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The id of the field.
+ * @return id
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "id", description = "The id of the field.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public FieldItem value(String value) {
+ this.value = value;
+ return this;
+ }
+
+ /**
+ * The value of the field.
+ * @return value
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "value", description = "The value of the field.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("value")
+ public String getValue() {
+ return value;
+ }
+
+ public void setValue(String value) {
+ this.value = value;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ FieldItem fieldItem = (FieldItem) o;
+ return Objects.equals(this.id, fieldItem.id) &&
+ Objects.equals(this.value, fieldItem.value);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, value);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class FieldItem {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" value: ").append(toIndentedString(value)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckComponent.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckComponent.java
new file mode 100644
index 0000000..d8134c3
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckComponent.java
@@ -0,0 +1,273 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The health status details of a specific component reported by the Service Adapter.
+ */
+
+@Schema(name = "HealthCheckComponent", description = "The health status details of a specific component reported by the Service Adapter.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class HealthCheckComponent {
+
+ private String id;
+
+ private String name;
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ */
+ public enum TypeEnum {
+ OTHER("OTHER"),
+
+ SYSTEM("SYSTEM"),
+
+ API("API"),
+
+ ADAPTER("ADAPTER"),
+
+ DATABASE("DATABASE");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ private TypeEnum type;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List endpoints;
+
+ public HealthCheckComponent() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckComponent(String id, String name, TypeEnum type, HealthStatus status) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.status = status;
+ }
+
+ public HealthCheckComponent id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The id of the component.
+ * @return id
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "id", description = "The id of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public HealthCheckComponent name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the component.
+ * @return name
+ */
+ @NotNull @Size(max = 150)
+ @Schema(name = "name", description = "The name of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public HealthCheckComponent type(TypeEnum type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ * @return type
+ */
+ @NotNull
+ @Schema(name = "type", description = "The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown. ", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("type")
+ public TypeEnum getType() {
+ return type;
+ }
+
+ public void setType(TypeEnum type) {
+ this.type = type;
+ }
+
+ public HealthCheckComponent description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The detailed status of the component.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The detailed status of the component.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckComponent status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckComponent endpoints(List endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ public HealthCheckComponent addEndpointsItem(String endpointsItem) {
+ if (this.endpoints == null) {
+ this.endpoints = new ArrayList<>();
+ }
+ this.endpoints.add(endpointsItem);
+ return this;
+ }
+
+ /**
+ * When the `status` of the component is not `UP`, then the list of endpoints affected.
+ * @return endpoints
+ */
+
+ @Schema(name = "endpoints", description = "When the `status` of the component is not `UP`, then the list of endpoints affected.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("endpoints")
+ public List getEndpoints() {
+ return endpoints;
+ }
+
+ public void setEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckComponent healthCheckComponent = (HealthCheckComponent) o;
+ return Objects.equals(this.id, healthCheckComponent.id) &&
+ Objects.equals(this.name, healthCheckComponent.name) &&
+ Objects.equals(this.type, healthCheckComponent.type) &&
+ Objects.equals(this.description, healthCheckComponent.description) &&
+ Objects.equals(this.status, healthCheckComponent.status) &&
+ Objects.equals(this.endpoints, healthCheckComponent.endpoints);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, type, description, status, endpoints);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckComponent {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" endpoints: ").append(toIndentedString(endpoints)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckResponse.java
new file mode 100644
index 0000000..734f782
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthCheckResponse.java
@@ -0,0 +1,210 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.HealthCheckComponent;
+import com.example.model.openapitaxyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * HealthCheckResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class HealthCheckResponse {
+
+ private String version;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List<@Valid HealthCheckComponent> components = new ArrayList<>();
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime time;
+
+ public HealthCheckResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckResponse(HealthStatus status, List<@Valid HealthCheckComponent> components, OffsetDateTime time) {
+ this.status = status;
+ this.components = components;
+ this.time = time;
+ }
+
+ public HealthCheckResponse version(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get version
+ * @return version
+ */
+ @Size(min = 1)
+ @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public HealthCheckResponse description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the health status returned by the Service Adapter.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The description of the health status returned by the Service Adapter.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckResponse status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckResponse components(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ return this;
+ }
+
+ public HealthCheckResponse addComponentsItem(HealthCheckComponent componentsItem) {
+ if (this.components == null) {
+ this.components = new ArrayList<>();
+ }
+ this.components.add(componentsItem);
+ return this;
+ }
+
+ /**
+ * List of health status details for each component reported by the Service Adapter.
+ * @return components
+ */
+ @NotNull @Valid
+ @Schema(name = "components", description = "List of health status details for each component reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("components")
+ public List<@Valid HealthCheckComponent> getComponents() {
+ return components;
+ }
+
+ public void setComponents(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ }
+
+ public HealthCheckResponse time(OffsetDateTime time) {
+ this.time = time;
+ return this;
+ }
+
+ /**
+ * The timestamp of the health status reported by the Service Adapter.
+ * @return time
+ */
+ @NotNull @Valid
+ @Schema(name = "time", description = "The timestamp of the health status reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("time")
+ public OffsetDateTime getTime() {
+ return time;
+ }
+
+ public void setTime(OffsetDateTime time) {
+ this.time = time;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckResponse healthCheckResponse = (HealthCheckResponse) o;
+ return Objects.equals(this.version, healthCheckResponse.version) &&
+ Objects.equals(this.description, healthCheckResponse.description) &&
+ Objects.equals(this.status, healthCheckResponse.status) &&
+ Objects.equals(this.components, healthCheckResponse.components) &&
+ Objects.equals(this.time, healthCheckResponse.time);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(version, description, status, components, time);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckResponse {\n");
+ sb.append(" version: ").append(toIndentedString(version)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" components: ").append(toIndentedString(components)).append("\n");
+ sb.append(" time: ").append(toIndentedString(time)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthStatus.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthStatus.java
new file mode 100644
index 0000000..be50e74
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/HealthStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of a specific component reported by the Service Adapter.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum HealthStatus {
+
+ UP("UP"),
+
+ DOWN("DOWN"),
+
+ WARN("WARN");
+
+ private String value;
+
+ HealthStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static HealthStatus fromValue(String value) {
+ for (HealthStatus b : HealthStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Invoice.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Invoice.java
new file mode 100644
index 0000000..9e7482f
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Invoice.java
@@ -0,0 +1,465 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.DocumentStatus;
+import com.example.model.openapitaxyml.InvoiceLineItem;
+import com.example.model.openapitaxyml.Seller;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of an invoice as returned by the Tax Service Adapter.
+ */
+
+@Schema(name = "Invoice", description = "The details of an invoice as returned by the Tax Service Adapter.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class Invoice {
+
+ private String invoiceId;
+
+ private String invoiceCode;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime documentDateTime;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime taxDateTime;
+
+ private DocumentStatus status;
+
+ private String currency;
+
+ private Seller seller;
+
+ private Customer customer;
+
+ private Double subtotal;
+
+ private Double exemptAmount;
+
+ private Double discountAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double total;
+
+ @Valid
+ private List<@Valid InvoiceLineItem> lineItems = new ArrayList<>();
+
+ public Invoice() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public Invoice(String invoiceId, String invoiceCode, OffsetDateTime documentDateTime, DocumentStatus status, String currency, Seller seller, Customer customer, Double subtotal, Double exemptAmount, Double discountAmount, Double taxableAmount, Double taxAmount, Double total, List<@Valid InvoiceLineItem> lineItems) {
+ this.invoiceId = invoiceId;
+ this.invoiceCode = invoiceCode;
+ this.documentDateTime = documentDateTime;
+ this.status = status;
+ this.currency = currency;
+ this.seller = seller;
+ this.customer = customer;
+ this.subtotal = subtotal;
+ this.exemptAmount = exemptAmount;
+ this.discountAmount = discountAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ this.total = total;
+ this.lineItems = lineItems;
+ }
+
+ public Invoice invoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.
+ * @return invoiceId
+ */
+ @NotNull
+ @Schema(name = "invoiceId", description = "The unique identifier of the invoice in the Tax Service Adapter or the Tax Service Provider.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("invoiceId")
+ public String getInvoiceId() {
+ return invoiceId;
+ }
+
+ public void setInvoiceId(String invoiceId) {
+ this.invoiceId = invoiceId;
+ }
+
+ public Invoice invoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in Chargebee.
+ * @return invoiceCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "invoiceCode", description = "The unique identifier of the invoice in Chargebee.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("invoiceCode")
+ public String getInvoiceCode() {
+ return invoiceCode;
+ }
+
+ public void setInvoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ }
+
+ public Invoice documentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return documentDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "documentDateTime", description = "The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("documentDateTime")
+ public OffsetDateTime getDocumentDateTime() {
+ return documentDateTime;
+ }
+
+ public void setDocumentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ }
+
+ public Invoice taxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return taxDateTime
+ */
+ @Valid
+ @Schema(name = "taxDateTime", description = "The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxDateTime")
+ public OffsetDateTime getTaxDateTime() {
+ return taxDateTime;
+ }
+
+ public void setTaxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ }
+
+ public Invoice status(DocumentStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public DocumentStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(DocumentStatus status) {
+ this.status = status;
+ }
+
+ public Invoice currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public Invoice seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public Invoice customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public Invoice subtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ return this;
+ }
+
+ /**
+ * The amount after discounts. This is the sum of all `lineItems.subtotal`.
+ * @return subtotal
+ */
+ @NotNull
+ @Schema(name = "subtotal", description = "The amount after discounts. This is the sum of all `lineItems.subtotal`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("subtotal")
+ public Double getSubtotal() {
+ return subtotal;
+ }
+
+ public void setSubtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ }
+
+ public Invoice exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The part of the `subtotal` that is exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public Invoice discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The total discount applied. This is the sum of all `lineItems.discount`.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The total discount applied. This is the sum of all `lineItems.discount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public Invoice taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is taxable.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The part of the `subtotal` that is taxable.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public Invoice taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The total tax payable. This is the sum of all `lineItems.taxAmount`.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The total tax payable. This is the sum of all `lineItems.taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public Invoice total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public Invoice lineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public Invoice addLineItemsItem(InvoiceLineItem lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * Get lineItems
+ * @return lineItems
+ */
+ @NotNull @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid InvoiceLineItem> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Invoice invoice = (Invoice) o;
+ return Objects.equals(this.invoiceId, invoice.invoiceId) &&
+ Objects.equals(this.invoiceCode, invoice.invoiceCode) &&
+ Objects.equals(this.documentDateTime, invoice.documentDateTime) &&
+ Objects.equals(this.taxDateTime, invoice.taxDateTime) &&
+ Objects.equals(this.status, invoice.status) &&
+ Objects.equals(this.currency, invoice.currency) &&
+ Objects.equals(this.seller, invoice.seller) &&
+ Objects.equals(this.customer, invoice.customer) &&
+ Objects.equals(this.subtotal, invoice.subtotal) &&
+ Objects.equals(this.exemptAmount, invoice.exemptAmount) &&
+ Objects.equals(this.discountAmount, invoice.discountAmount) &&
+ Objects.equals(this.taxableAmount, invoice.taxableAmount) &&
+ Objects.equals(this.taxAmount, invoice.taxAmount) &&
+ Objects.equals(this.total, invoice.total) &&
+ Objects.equals(this.lineItems, invoice.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(invoiceId, invoiceCode, documentDateTime, taxDateTime, status, currency, seller, customer, subtotal, exemptAmount, discountAmount, taxableAmount, taxAmount, total, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Invoice {\n");
+ sb.append(" invoiceId: ").append(toIndentedString(invoiceId)).append("\n");
+ sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
+ sb.append(" documentDateTime: ").append(toIndentedString(documentDateTime)).append("\n");
+ sb.append(" taxDateTime: ").append(toIndentedString(taxDateTime)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceLineItem.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceLineItem.java
new file mode 100644
index 0000000..5afaf55
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceLineItem.java
@@ -0,0 +1,565 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.FieldItem;
+import com.example.model.openapitaxyml.TaxExemptType;
+import com.example.model.openapitaxyml.TaxLineItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of a line item.
+ */
+
+@Schema(name = "InvoiceLineItem", description = "The details of a line item.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class InvoiceLineItem {
+
+ private Integer number;
+
+ private String itemCode;
+
+ private String description;
+
+ private Double quantity;
+
+ private Double unitPrice;
+
+ private Double amount;
+
+ private Double subtotal;
+
+ private Boolean isTaxInclusive;
+
+ private Boolean isTaxable;
+
+ @Valid
+ private List<@Valid FieldItem> taxIdentifiers;
+
+ private TaxExemptType taxExemptType;
+
+ private String taxExemptReason;
+
+ private Double exemptAmount;
+
+ private Double discountAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double total;
+
+ private Boolean isPartialTax;
+
+ @Valid
+ private List<@Valid TaxLineItem> taxes = new ArrayList<>();
+
+ public InvoiceLineItem() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public InvoiceLineItem(Integer number, Double amount, Double subtotal, Boolean isTaxInclusive, Boolean isTaxable, Double exemptAmount, Double discountAmount, Double taxableAmount, Double taxAmount, Double total, List<@Valid TaxLineItem> taxes) {
+ this.number = number;
+ this.amount = amount;
+ this.subtotal = subtotal;
+ this.isTaxInclusive = isTaxInclusive;
+ this.isTaxable = isTaxable;
+ this.exemptAmount = exemptAmount;
+ this.discountAmount = discountAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ this.total = total;
+ this.taxes = taxes;
+ }
+
+ public InvoiceLineItem number(Integer number) {
+ this.number = number;
+ return this;
+ }
+
+ /**
+ * Index or serial number of the line item.
+ * minimum: 1
+ * @return number
+ */
+ @NotNull @Min(1)
+ @Schema(name = "number", description = "Index or serial number of the line item.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("number")
+ public Integer getNumber() {
+ return number;
+ }
+
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ public InvoiceLineItem itemCode(String itemCode) {
+ this.itemCode = itemCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier (in Chargebee) of the product corresponding to the line item. If the line item corresponds to a one-off charge, then this identifier is not present.
+ * @return itemCode
+ */
+ @Size(max = 50)
+ @Schema(name = "itemCode", description = "The unique identifier (in Chargebee) of the product corresponding to the line item. If the line item corresponds to a one-off charge, then this identifier is not present.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("itemCode")
+ public String getItemCode() {
+ return itemCode;
+ }
+
+ public void setItemCode(String itemCode) {
+ this.itemCode = itemCode;
+ }
+
+ public InvoiceLineItem description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the line item.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The description of the line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public InvoiceLineItem quantity(Double quantity) {
+ this.quantity = quantity;
+ return this;
+ }
+
+ /**
+ * The quantity associated with this line item.
+ * minimum: 0
+ * @return quantity
+ */
+ @DecimalMin("0")
+ @Schema(name = "quantity", description = "The quantity associated with this line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("quantity")
+ public Double getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(Double quantity) {
+ this.quantity = quantity;
+ }
+
+ public InvoiceLineItem unitPrice(Double unitPrice) {
+ this.unitPrice = unitPrice;
+ return this;
+ }
+
+ /**
+ * The unit price for this line item. In case of [tiered pricing](https://www.chargebee.com/docs/1.0/plans.html#tiered-pricing) where the unit price varies for each quantity tier, this is the average unit price.
+ * minimum: 0
+ * @return unitPrice
+ */
+ @DecimalMin("0")
+ @Schema(name = "unitPrice", description = "The unit price for this line item. In case of [tiered pricing](https://www.chargebee.com/docs/1.0/plans.html#tiered-pricing) where the unit price varies for each quantity tier, this is the average unit price.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("unitPrice")
+ public Double getUnitPrice() {
+ return unitPrice;
+ }
+
+ public void setUnitPrice(Double unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+ public InvoiceLineItem amount(Double amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * The amount for this line item. This is `unitPrice` × `quantity`.
+ * @return amount
+ */
+ @NotNull
+ @Schema(name = "amount", description = "The amount for this line item. This is `unitPrice` × `quantity`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("amount")
+ public Double getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Double amount) {
+ this.amount = amount;
+ }
+
+ public InvoiceLineItem subtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ return this;
+ }
+
+ /**
+ * The amount after discounts for this line item. This is `amount` - `discountAmount`.
+ * @return subtotal
+ */
+ @NotNull
+ @Schema(name = "subtotal", description = "The amount after discounts for this line item. This is `amount` - `discountAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("subtotal")
+ public Double getSubtotal() {
+ return subtotal;
+ }
+
+ public void setSubtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ }
+
+ public InvoiceLineItem isTaxInclusive(Boolean isTaxInclusive) {
+ this.isTaxInclusive = isTaxInclusive;
+ return this;
+ }
+
+ /**
+ * Indicates whether the `subtotal` for this line item is inclusive of taxes.
+ * @return isTaxInclusive
+ */
+ @NotNull
+ @Schema(name = "isTaxInclusive", description = "Indicates whether the `subtotal` for this line item is inclusive of taxes.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("isTaxInclusive")
+ public Boolean getIsTaxInclusive() {
+ return isTaxInclusive;
+ }
+
+ public void setIsTaxInclusive(Boolean isTaxInclusive) {
+ this.isTaxInclusive = isTaxInclusive;
+ }
+
+ public InvoiceLineItem isTaxable(Boolean isTaxable) {
+ this.isTaxable = isTaxable;
+ return this;
+ }
+
+ /**
+ * Indicates whether this line item is taxable.
+ * @return isTaxable
+ */
+ @NotNull
+ @Schema(name = "isTaxable", description = "Indicates whether this line item is taxable.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("isTaxable")
+ public Boolean getIsTaxable() {
+ return isTaxable;
+ }
+
+ public void setIsTaxable(Boolean isTaxable) {
+ this.isTaxable = isTaxable;
+ }
+
+ public InvoiceLineItem taxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ return this;
+ }
+
+ public InvoiceLineItem addTaxIdentifiersItem(FieldItem taxIdentifiersItem) {
+ if (this.taxIdentifiers == null) {
+ this.taxIdentifiers = new ArrayList<>();
+ }
+ this.taxIdentifiers.add(taxIdentifiersItem);
+ return this;
+ }
+
+ /**
+ * The tax code fields of the product used for tax calculation.
+ * @return taxIdentifiers
+ */
+ @Valid @Size(max = 10)
+ @Schema(name = "taxIdentifiers", description = "The tax code fields of the product used for tax calculation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxIdentifiers")
+ public List<@Valid FieldItem> getTaxIdentifiers() {
+ return taxIdentifiers;
+ }
+
+ public void setTaxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ }
+
+ public InvoiceLineItem taxExemptType(TaxExemptType taxExemptType) {
+ this.taxExemptType = taxExemptType;
+ return this;
+ }
+
+ /**
+ * Get taxExemptType
+ * @return taxExemptType
+ */
+ @Valid
+ @Schema(name = "taxExemptType", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxExemptType")
+ public TaxExemptType getTaxExemptType() {
+ return taxExemptType;
+ }
+
+ public void setTaxExemptType(TaxExemptType taxExemptType) {
+ this.taxExemptType = taxExemptType;
+ }
+
+ public InvoiceLineItem taxExemptReason(String taxExemptReason) {
+ this.taxExemptReason = taxExemptReason;
+ return this;
+ }
+
+ /**
+ * The reason due to which a line item is exempted from tax. This is a mandatory parameter while applying tax exemption on any line-item.
+ * @return taxExemptReason
+ */
+ @Size(max = 250)
+ @Schema(name = "taxExemptReason", example = "The customer is exempt from taxes.", description = "The reason due to which a line item is exempted from tax. This is a mandatory parameter while applying tax exemption on any line-item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxExemptReason")
+ public String getTaxExemptReason() {
+ return taxExemptReason;
+ }
+
+ public void setTaxExemptReason(String taxExemptReason) {
+ this.taxExemptReason = taxExemptReason;
+ }
+
+ public InvoiceLineItem exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The part of this line item's `subtotal` that is exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The part of this line item's `subtotal` that is exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public InvoiceLineItem discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The discount applied to this line item.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The discount applied to this line item.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public InvoiceLineItem taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The part of this line item's `subtotal` that is taxable.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The part of this line item's `subtotal` that is taxable.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public InvoiceLineItem taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The tax payable for this line item. This is the sum of all `taxes.taxAmount` for this line item.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The tax payable for this line item. This is the sum of all `taxes.taxAmount` for this line item.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public InvoiceLineItem total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total for this line item after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total for this line item after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public InvoiceLineItem isPartialTax(Boolean isPartialTax) {
+ this.isPartialTax = isPartialTax;
+ return this;
+ }
+
+ /**
+ * Indicates if taxes were applied only partially for this line item.
+ * @return isPartialTax
+ */
+
+ @Schema(name = "isPartialTax", description = "Indicates if taxes were applied only partially for this line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("isPartialTax")
+ public Boolean getIsPartialTax() {
+ return isPartialTax;
+ }
+
+ public void setIsPartialTax(Boolean isPartialTax) {
+ this.isPartialTax = isPartialTax;
+ }
+
+ public InvoiceLineItem taxes(List<@Valid TaxLineItem> taxes) {
+ this.taxes = taxes;
+ return this;
+ }
+
+ public InvoiceLineItem addTaxesItem(TaxLineItem taxesItem) {
+ if (this.taxes == null) {
+ this.taxes = new ArrayList<>();
+ }
+ this.taxes.add(taxesItem);
+ return this;
+ }
+
+ /**
+ * List of taxes applied for this line item under each jurisdiction.
+ * @return taxes
+ */
+ @NotNull @Valid @Size(min = 0, max = 10)
+ @Schema(name = "taxes", description = "List of taxes applied for this line item under each jurisdiction.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxes")
+ public List<@Valid TaxLineItem> getTaxes() {
+ return taxes;
+ }
+
+ public void setTaxes(List<@Valid TaxLineItem> taxes) {
+ this.taxes = taxes;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ InvoiceLineItem invoiceLineItem = (InvoiceLineItem) o;
+ return Objects.equals(this.number, invoiceLineItem.number) &&
+ Objects.equals(this.itemCode, invoiceLineItem.itemCode) &&
+ Objects.equals(this.description, invoiceLineItem.description) &&
+ Objects.equals(this.quantity, invoiceLineItem.quantity) &&
+ Objects.equals(this.unitPrice, invoiceLineItem.unitPrice) &&
+ Objects.equals(this.amount, invoiceLineItem.amount) &&
+ Objects.equals(this.subtotal, invoiceLineItem.subtotal) &&
+ Objects.equals(this.isTaxInclusive, invoiceLineItem.isTaxInclusive) &&
+ Objects.equals(this.isTaxable, invoiceLineItem.isTaxable) &&
+ Objects.equals(this.taxIdentifiers, invoiceLineItem.taxIdentifiers) &&
+ Objects.equals(this.taxExemptType, invoiceLineItem.taxExemptType) &&
+ Objects.equals(this.taxExemptReason, invoiceLineItem.taxExemptReason) &&
+ Objects.equals(this.exemptAmount, invoiceLineItem.exemptAmount) &&
+ Objects.equals(this.discountAmount, invoiceLineItem.discountAmount) &&
+ Objects.equals(this.taxableAmount, invoiceLineItem.taxableAmount) &&
+ Objects.equals(this.taxAmount, invoiceLineItem.taxAmount) &&
+ Objects.equals(this.total, invoiceLineItem.total) &&
+ Objects.equals(this.isPartialTax, invoiceLineItem.isPartialTax) &&
+ Objects.equals(this.taxes, invoiceLineItem.taxes);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(number, itemCode, description, quantity, unitPrice, amount, subtotal, isTaxInclusive, isTaxable, taxIdentifiers, taxExemptType, taxExemptReason, exemptAmount, discountAmount, taxableAmount, taxAmount, total, isPartialTax, taxes);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class InvoiceLineItem {\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" itemCode: ").append(toIndentedString(itemCode)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
+ sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n");
+ sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
+ sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
+ sb.append(" isTaxInclusive: ").append(toIndentedString(isTaxInclusive)).append("\n");
+ sb.append(" isTaxable: ").append(toIndentedString(isTaxable)).append("\n");
+ sb.append(" taxIdentifiers: ").append(toIndentedString(taxIdentifiers)).append("\n");
+ sb.append(" taxExemptType: ").append(toIndentedString(taxExemptType)).append("\n");
+ sb.append(" taxExemptReason: ").append(toIndentedString(taxExemptReason)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" isPartialTax: ").append(toIndentedString(isPartialTax)).append("\n");
+ sb.append(" taxes: ").append(toIndentedString(taxes)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceRequest.java
new file mode 100644
index 0000000..ee701a7
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/InvoiceRequest.java
@@ -0,0 +1,413 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.InvoiceLineItem;
+import com.example.model.openapitaxyml.Seller;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of an invoice sent to the Tax Service Adapter by Chargebee.
+ */
+
+@Schema(name = "InvoiceRequest", description = "The details of an invoice sent to the Tax Service Adapter by Chargebee.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class InvoiceRequest {
+
+ private String invoiceCode;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime documentDateTime;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime taxDateTime;
+
+ private String currency;
+
+ private Seller seller;
+
+ private Customer customer;
+
+ private Double subtotal;
+
+ private Double exemptAmount;
+
+ private Double discountAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double total;
+
+ @Valid
+ private List<@Valid InvoiceLineItem> lineItems = new ArrayList<>();
+
+ public InvoiceRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public InvoiceRequest(String invoiceCode, OffsetDateTime documentDateTime, String currency, Seller seller, Customer customer, Double subtotal, Double exemptAmount, Double discountAmount, Double taxableAmount, Double taxAmount, Double total, List<@Valid InvoiceLineItem> lineItems) {
+ this.invoiceCode = invoiceCode;
+ this.documentDateTime = documentDateTime;
+ this.currency = currency;
+ this.seller = seller;
+ this.customer = customer;
+ this.subtotal = subtotal;
+ this.exemptAmount = exemptAmount;
+ this.discountAmount = discountAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ this.total = total;
+ this.lineItems = lineItems;
+ }
+
+ public InvoiceRequest invoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier of the invoice in Chargebee.
+ * @return invoiceCode
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "invoiceCode", description = "The unique identifier of the invoice in Chargebee.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("invoiceCode")
+ public String getInvoiceCode() {
+ return invoiceCode;
+ }
+
+ public void setInvoiceCode(String invoiceCode) {
+ this.invoiceCode = invoiceCode;
+ }
+
+ public InvoiceRequest documentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return documentDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "documentDateTime", description = "The date and time at which the invoice was generated in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("documentDateTime")
+ public OffsetDateTime getDocumentDateTime() {
+ return documentDateTime;
+ }
+
+ public void setDocumentDateTime(OffsetDateTime documentDateTime) {
+ this.documentDateTime = documentDateTime;
+ }
+
+ public InvoiceRequest taxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ return this;
+ }
+
+ /**
+ * The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.
+ * @return taxDateTime
+ */
+ @Valid
+ @Schema(name = "taxDateTime", description = "The date and time at which the tax was applicable in Chargebee. For example, if the value is 2022-10-28T15:36:28.129+05:30, then the timestamp represents October 28, 2022, at 15:36:28.129, with an offset of +05:30. This means that the time represented is 5 hours and 30 minutes ahead of UTC/GMT.In the case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxDateTime")
+ public OffsetDateTime getTaxDateTime() {
+ return taxDateTime;
+ }
+
+ public void setTaxDateTime(OffsetDateTime taxDateTime) {
+ this.taxDateTime = taxDateTime;
+ }
+
+ public InvoiceRequest currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public InvoiceRequest seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public InvoiceRequest customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public InvoiceRequest subtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ return this;
+ }
+
+ /**
+ * The amount after discounts. This is the sum of all `lineItems.subtotal`.
+ * @return subtotal
+ */
+ @NotNull
+ @Schema(name = "subtotal", description = "The amount after discounts. This is the sum of all `lineItems.subtotal`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("subtotal")
+ public Double getSubtotal() {
+ return subtotal;
+ }
+
+ public void setSubtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ }
+
+ public InvoiceRequest exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The part of the `subtotal` that is exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public InvoiceRequest discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The total discount applied. This is the sum of all `lineItems.discount`.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The total discount applied. This is the sum of all `lineItems.discount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public InvoiceRequest taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is taxable.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The part of the `subtotal` that is taxable.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public InvoiceRequest taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The total tax payable. This is the sum of all `lineItems.taxAmount`.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The total tax payable. This is the sum of all `lineItems.taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public InvoiceRequest total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public InvoiceRequest lineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public InvoiceRequest addLineItemsItem(InvoiceLineItem lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * Get lineItems
+ * @return lineItems
+ */
+ @NotNull @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid InvoiceLineItem> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ InvoiceRequest invoiceRequest = (InvoiceRequest) o;
+ return Objects.equals(this.invoiceCode, invoiceRequest.invoiceCode) &&
+ Objects.equals(this.documentDateTime, invoiceRequest.documentDateTime) &&
+ Objects.equals(this.taxDateTime, invoiceRequest.taxDateTime) &&
+ Objects.equals(this.currency, invoiceRequest.currency) &&
+ Objects.equals(this.seller, invoiceRequest.seller) &&
+ Objects.equals(this.customer, invoiceRequest.customer) &&
+ Objects.equals(this.subtotal, invoiceRequest.subtotal) &&
+ Objects.equals(this.exemptAmount, invoiceRequest.exemptAmount) &&
+ Objects.equals(this.discountAmount, invoiceRequest.discountAmount) &&
+ Objects.equals(this.taxableAmount, invoiceRequest.taxableAmount) &&
+ Objects.equals(this.taxAmount, invoiceRequest.taxAmount) &&
+ Objects.equals(this.total, invoiceRequest.total) &&
+ Objects.equals(this.lineItems, invoiceRequest.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(invoiceCode, documentDateTime, taxDateTime, currency, seller, customer, subtotal, exemptAmount, discountAmount, taxableAmount, taxAmount, total, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class InvoiceRequest {\n");
+ sb.append(" invoiceCode: ").append(toIndentedString(invoiceCode)).append("\n");
+ sb.append(" documentDateTime: ").append(toIndentedString(documentDateTime)).append("\n");
+ sb.append(" taxDateTime: ").append(toIndentedString(taxDateTime)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Seller.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Seller.java
new file mode 100644
index 0000000..5bdf2de
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/Seller.java
@@ -0,0 +1,144 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Address;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of the seller involved in the transaction including company code and address.
+ */
+
+@Schema(name = "Seller", description = "The details of the seller involved in the transaction including company code and address.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class Seller {
+
+ private String taxRegistrationNumber;
+
+ private Address address;
+
+ private Boolean hasNexus;
+
+ public Seller() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public Seller(Address address) {
+ this.address = address;
+ }
+
+ public Seller taxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ return this;
+ }
+
+ /**
+ * The tax registration number of a business in a country. For example, this is the GSTIN for India or the VAT number for EU or Australia.
+ * @return taxRegistrationNumber
+ */
+ @Size(max = 30)
+ @Schema(name = "taxRegistrationNumber", description = "The tax registration number of a business in a country. For example, this is the GSTIN for India or the VAT number for EU or Australia.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxRegistrationNumber")
+ public String getTaxRegistrationNumber() {
+ return taxRegistrationNumber;
+ }
+
+ public void setTaxRegistrationNumber(String taxRegistrationNumber) {
+ this.taxRegistrationNumber = taxRegistrationNumber;
+ }
+
+ public Seller address(Address address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Get address
+ * @return address
+ */
+ @NotNull @Valid
+ @Schema(name = "address", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("address")
+ public Address getAddress() {
+ return address;
+ }
+
+ public void setAddress(Address address) {
+ this.address = address;
+ }
+
+ public Seller hasNexus(Boolean hasNexus) {
+ this.hasNexus = hasNexus;
+ return this;
+ }
+
+ /**
+ * Determines whether a tax nexus exists between the Seller and the tax authority at the address provided.
+ * @return hasNexus
+ */
+
+ @Schema(name = "hasNexus", description = "Determines whether a tax nexus exists between the Seller and the tax authority at the address provided.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("hasNexus")
+ public Boolean getHasNexus() {
+ return hasNexus;
+ }
+
+ public void setHasNexus(Boolean hasNexus) {
+ this.hasNexus = hasNexus;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Seller seller = (Seller) o;
+ return Objects.equals(this.taxRegistrationNumber, seller.taxRegistrationNumber) &&
+ Objects.equals(this.address, seller.address) &&
+ Objects.equals(this.hasNexus, seller.hasNexus);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(taxRegistrationNumber, address, hasNexus);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Seller {\n");
+ sb.append(" taxRegistrationNumber: ").append(toIndentedString(taxRegistrationNumber)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" hasNexus: ").append(toIndentedString(hasNexus)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationLineItemRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationLineItemRequest.java
new file mode 100644
index 0000000..266ca77
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationLineItemRequest.java
@@ -0,0 +1,305 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.FieldItem;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Represents the details of a line item in a tax estimation request.
+ */
+
+@Schema(name = "TaxEstimationLineItemRequest", description = "Represents the details of a line item in a tax estimation request.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class TaxEstimationLineItemRequest {
+
+ private Integer number;
+
+ private String itemCode;
+
+ private String description;
+
+ private Double quantity;
+
+ private Double unitPrice;
+
+ private Double amount;
+
+ private Double discountAmount;
+
+ private Boolean isTaxInclusive;
+
+ @Valid
+ private List<@Valid FieldItem> taxIdentifiers;
+
+ public TaxEstimationLineItemRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TaxEstimationLineItemRequest(Integer number, Double amount, Boolean isTaxInclusive) {
+ this.number = number;
+ this.amount = amount;
+ this.isTaxInclusive = isTaxInclusive;
+ }
+
+ public TaxEstimationLineItemRequest number(Integer number) {
+ this.number = number;
+ return this;
+ }
+
+ /**
+ * Index or serial number of the line item.
+ * minimum: 1
+ * @return number
+ */
+ @NotNull @Min(1)
+ @Schema(name = "number", description = "Index or serial number of the line item.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("number")
+ public Integer getNumber() {
+ return number;
+ }
+
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ public TaxEstimationLineItemRequest itemCode(String itemCode) {
+ this.itemCode = itemCode;
+ return this;
+ }
+
+ /**
+ * The unique identifier (in Chargebee) of the product corresponding to the line item. If the line item corresponds to a one-off charge, then this identifier is not provided.
+ * @return itemCode
+ */
+ @Size(max = 50)
+ @Schema(name = "itemCode", description = "The unique identifier (in Chargebee) of the product corresponding to the line item. If the line item corresponds to a one-off charge, then this identifier is not provided.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("itemCode")
+ public String getItemCode() {
+ return itemCode;
+ }
+
+ public void setItemCode(String itemCode) {
+ this.itemCode = itemCode;
+ }
+
+ public TaxEstimationLineItemRequest description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the line item.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The description of the line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public TaxEstimationLineItemRequest quantity(Double quantity) {
+ this.quantity = quantity;
+ return this;
+ }
+
+ /**
+ * The quantity associated with this line item.
+ * minimum: 0
+ * @return quantity
+ */
+ @DecimalMin("0")
+ @Schema(name = "quantity", description = "The quantity associated with this line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("quantity")
+ public Double getQuantity() {
+ return quantity;
+ }
+
+ public void setQuantity(Double quantity) {
+ this.quantity = quantity;
+ }
+
+ public TaxEstimationLineItemRequest unitPrice(Double unitPrice) {
+ this.unitPrice = unitPrice;
+ return this;
+ }
+
+ /**
+ * The unit price for this line item. In case of [tiered pricing](https://www.chargebee.com/docs/1.0/plans.html#tiered-pricing) where the unit price varies for each quantity tier, this is the average unit price.
+ * minimum: 0
+ * @return unitPrice
+ */
+ @DecimalMin("0")
+ @Schema(name = "unitPrice", description = "The unit price for this line item. In case of [tiered pricing](https://www.chargebee.com/docs/1.0/plans.html#tiered-pricing) where the unit price varies for each quantity tier, this is the average unit price.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("unitPrice")
+ public Double getUnitPrice() {
+ return unitPrice;
+ }
+
+ public void setUnitPrice(Double unitPrice) {
+ this.unitPrice = unitPrice;
+ }
+
+ public TaxEstimationLineItemRequest amount(Double amount) {
+ this.amount = amount;
+ return this;
+ }
+
+ /**
+ * The amount for this line item. This is `unitPrice` × `quantity`.
+ * @return amount
+ */
+ @NotNull
+ @Schema(name = "amount", description = "The amount for this line item. This is `unitPrice` × `quantity`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("amount")
+ public Double getAmount() {
+ return amount;
+ }
+
+ public void setAmount(Double amount) {
+ this.amount = amount;
+ }
+
+ public TaxEstimationLineItemRequest discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The discount applied to this line item.
+ * @return discountAmount
+ */
+
+ @Schema(name = "discountAmount", description = "The discount applied to this line item.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public TaxEstimationLineItemRequest isTaxInclusive(Boolean isTaxInclusive) {
+ this.isTaxInclusive = isTaxInclusive;
+ return this;
+ }
+
+ /**
+ * Indicates whether (`amount` - `discountAmount`) is inclusive of taxes.
+ * @return isTaxInclusive
+ */
+ @NotNull
+ @Schema(name = "isTaxInclusive", description = "Indicates whether (`amount` - `discountAmount`) is inclusive of taxes.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("isTaxInclusive")
+ public Boolean getIsTaxInclusive() {
+ return isTaxInclusive;
+ }
+
+ public void setIsTaxInclusive(Boolean isTaxInclusive) {
+ this.isTaxInclusive = isTaxInclusive;
+ }
+
+ public TaxEstimationLineItemRequest taxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ return this;
+ }
+
+ public TaxEstimationLineItemRequest addTaxIdentifiersItem(FieldItem taxIdentifiersItem) {
+ if (this.taxIdentifiers == null) {
+ this.taxIdentifiers = new ArrayList<>();
+ }
+ this.taxIdentifiers.add(taxIdentifiersItem);
+ return this;
+ }
+
+ /**
+ * The tax code fields of the product used for tax calculation.
+ * @return taxIdentifiers
+ */
+ @Valid @Size(max = 10)
+ @Schema(name = "taxIdentifiers", description = "The tax code fields of the product used for tax calculation.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxIdentifiers")
+ public List<@Valid FieldItem> getTaxIdentifiers() {
+ return taxIdentifiers;
+ }
+
+ public void setTaxIdentifiers(List<@Valid FieldItem> taxIdentifiers) {
+ this.taxIdentifiers = taxIdentifiers;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaxEstimationLineItemRequest taxEstimationLineItemRequest = (TaxEstimationLineItemRequest) o;
+ return Objects.equals(this.number, taxEstimationLineItemRequest.number) &&
+ Objects.equals(this.itemCode, taxEstimationLineItemRequest.itemCode) &&
+ Objects.equals(this.description, taxEstimationLineItemRequest.description) &&
+ Objects.equals(this.quantity, taxEstimationLineItemRequest.quantity) &&
+ Objects.equals(this.unitPrice, taxEstimationLineItemRequest.unitPrice) &&
+ Objects.equals(this.amount, taxEstimationLineItemRequest.amount) &&
+ Objects.equals(this.discountAmount, taxEstimationLineItemRequest.discountAmount) &&
+ Objects.equals(this.isTaxInclusive, taxEstimationLineItemRequest.isTaxInclusive) &&
+ Objects.equals(this.taxIdentifiers, taxEstimationLineItemRequest.taxIdentifiers);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(number, itemCode, description, quantity, unitPrice, amount, discountAmount, isTaxInclusive, taxIdentifiers);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaxEstimationLineItemRequest {\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" itemCode: ").append(toIndentedString(itemCode)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" quantity: ").append(toIndentedString(quantity)).append("\n");
+ sb.append(" unitPrice: ").append(toIndentedString(unitPrice)).append("\n");
+ sb.append(" amount: ").append(toIndentedString(amount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" isTaxInclusive: ").append(toIndentedString(isTaxInclusive)).append("\n");
+ sb.append(" taxIdentifiers: ").append(toIndentedString(taxIdentifiers)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationRequest.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationRequest.java
new file mode 100644
index 0000000..873bc8f
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationRequest.java
@@ -0,0 +1,213 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.Seller;
+import com.example.model.openapitaxyml.TaxEstimationLineItemRequest;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Defines the parameters of a tax estimation request. This is sent to the Tax Service Adapter by Chargebee to estimate taxes for one or more line items.
+ */
+
+@Schema(name = "TaxEstimationRequest", description = "Defines the parameters of a tax estimation request. This is sent to the Tax Service Adapter by Chargebee to estimate taxes for one or more line items.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class TaxEstimationRequest {
+
+ private Seller seller;
+
+ private Customer customer;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime estimateDateTime;
+
+ private String currency;
+
+ @Valid
+ private List<@Valid TaxEstimationLineItemRequest> lineItems = new ArrayList<>();
+
+ public TaxEstimationRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TaxEstimationRequest(Seller seller, Customer customer, OffsetDateTime estimateDateTime, String currency, List<@Valid TaxEstimationLineItemRequest> lineItems) {
+ this.seller = seller;
+ this.customer = customer;
+ this.estimateDateTime = estimateDateTime;
+ this.currency = currency;
+ this.lineItems = lineItems;
+ }
+
+ public TaxEstimationRequest seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public TaxEstimationRequest customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public TaxEstimationRequest estimateDateTime(OffsetDateTime estimateDateTime) {
+ this.estimateDateTime = estimateDateTime;
+ return this;
+ }
+
+ /**
+ * The time as of which the tax estimation is to be calculated. This can be a value in the past. For example, if the value is provided as 2022-10-28T15:36:28.129+05:30, then the tax rates applicable on October 28, 2022, at 15:36:28.129, with an offset of +05:30 ahead of UTC/GMT are used for calculations. In case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC
+ * @return estimateDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "estimateDateTime", description = "The time as of which the tax estimation is to be calculated. This can be a value in the past. For example, if the value is provided as 2022-10-28T15:36:28.129+05:30, then the tax rates applicable on October 28, 2022, at 15:36:28.129, with an offset of +05:30 ahead of UTC/GMT are used for calculations. In case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("estimateDateTime")
+ public OffsetDateTime getEstimateDateTime() {
+ return estimateDateTime;
+ }
+
+ public void setEstimateDateTime(OffsetDateTime estimateDateTime) {
+ this.estimateDateTime = estimateDateTime;
+ }
+
+ public TaxEstimationRequest currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public TaxEstimationRequest lineItems(List<@Valid TaxEstimationLineItemRequest> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public TaxEstimationRequest addLineItemsItem(TaxEstimationLineItemRequest lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * Contains the details of each line item in the tax estimation request.
+ * @return lineItems
+ */
+ @NotNull @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", description = "Contains the details of each line item in the tax estimation request.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid TaxEstimationLineItemRequest> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid TaxEstimationLineItemRequest> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaxEstimationRequest taxEstimationRequest = (TaxEstimationRequest) o;
+ return Objects.equals(this.seller, taxEstimationRequest.seller) &&
+ Objects.equals(this.customer, taxEstimationRequest.customer) &&
+ Objects.equals(this.estimateDateTime, taxEstimationRequest.estimateDateTime) &&
+ Objects.equals(this.currency, taxEstimationRequest.currency) &&
+ Objects.equals(this.lineItems, taxEstimationRequest.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(seller, customer, estimateDateTime, currency, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaxEstimationRequest {\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" estimateDateTime: ").append(toIndentedString(estimateDateTime)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationResponse.java
new file mode 100644
index 0000000..88b01e9
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxEstimationResponse.java
@@ -0,0 +1,363 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.Customer;
+import com.example.model.openapitaxyml.InvoiceLineItem;
+import com.example.model.openapitaxyml.Seller;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The response sent by the Tax Service Adapter to Chargebee for a tax estimation request.
+ */
+
+@Schema(name = "TaxEstimationResponse", description = "The response sent by the Tax Service Adapter to Chargebee for a tax estimation request.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class TaxEstimationResponse {
+
+ private Seller seller;
+
+ private Customer customer;
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime estimateDateTime;
+
+ private String currency;
+
+ private Double subtotal;
+
+ private Double exemptAmount;
+
+ private Double discountAmount;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ private Double total;
+
+ @Valid
+ private List<@Valid InvoiceLineItem> lineItems = new ArrayList<>();
+
+ public TaxEstimationResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TaxEstimationResponse(Seller seller, Customer customer, OffsetDateTime estimateDateTime, String currency, Double subtotal, Double exemptAmount, Double discountAmount, Double taxableAmount, Double taxAmount, Double total, List<@Valid InvoiceLineItem> lineItems) {
+ this.seller = seller;
+ this.customer = customer;
+ this.estimateDateTime = estimateDateTime;
+ this.currency = currency;
+ this.subtotal = subtotal;
+ this.exemptAmount = exemptAmount;
+ this.discountAmount = discountAmount;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ this.total = total;
+ this.lineItems = lineItems;
+ }
+
+ public TaxEstimationResponse seller(Seller seller) {
+ this.seller = seller;
+ return this;
+ }
+
+ /**
+ * Get seller
+ * @return seller
+ */
+ @NotNull @Valid
+ @Schema(name = "seller", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("seller")
+ public Seller getSeller() {
+ return seller;
+ }
+
+ public void setSeller(Seller seller) {
+ this.seller = seller;
+ }
+
+ public TaxEstimationResponse customer(Customer customer) {
+ this.customer = customer;
+ return this;
+ }
+
+ /**
+ * Get customer
+ * @return customer
+ */
+ @NotNull @Valid
+ @Schema(name = "customer", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("customer")
+ public Customer getCustomer() {
+ return customer;
+ }
+
+ public void setCustomer(Customer customer) {
+ this.customer = customer;
+ }
+
+ public TaxEstimationResponse estimateDateTime(OffsetDateTime estimateDateTime) {
+ this.estimateDateTime = estimateDateTime;
+ return this;
+ }
+
+ /**
+ * The time as of which the tax estimation is to be calculated. This can be a value in the past. For example, if the value is provided as 2022-10-28T15:36:28.129+05:30, then the tax rates applicable on October 28, 2022, at 15:36:28.129, with an offset of +05:30 ahead of UTC/GMT are used for calculations. In case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC
+ * @return estimateDateTime
+ */
+ @NotNull @Valid
+ @Schema(name = "estimateDateTime", description = "The time as of which the tax estimation is to be calculated. This can be a value in the past. For example, if the value is provided as 2022-10-28T15:36:28.129+05:30, then the tax rates applicable on October 28, 2022, at 15:36:28.129, with an offset of +05:30 ahead of UTC/GMT are used for calculations. In case of a merchant site located in UTC, these data types would send a timestamp in the format 2022-11-11T15:40:44.65Z. This timestamp represents November 11, 2022, at 15:40:44.65, with the 'Z' indicating that the time is in UTC", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("estimateDateTime")
+ public OffsetDateTime getEstimateDateTime() {
+ return estimateDateTime;
+ }
+
+ public void setEstimateDateTime(OffsetDateTime estimateDateTime) {
+ this.estimateDateTime = estimateDateTime;
+ }
+
+ public TaxEstimationResponse currency(String currency) {
+ this.currency = currency;
+ return this;
+ }
+
+ /**
+ * The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).
+ * @return currency
+ */
+ @NotNull @Size(min = 3, max = 3)
+ @Schema(name = "currency", description = "The [currency](https://en.wikipedia.org/wiki/Currency) in the [ISO-4217 format](https://www.iso.org/iso-4217-currency-codes.html).", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("currency")
+ public String getCurrency() {
+ return currency;
+ }
+
+ public void setCurrency(String currency) {
+ this.currency = currency;
+ }
+
+ public TaxEstimationResponse subtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ return this;
+ }
+
+ /**
+ * The amount after discounts. This is the sum of all `lineItems.subtotal`.
+ * @return subtotal
+ */
+ @NotNull
+ @Schema(name = "subtotal", description = "The amount after discounts. This is the sum of all `lineItems.subtotal`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("subtotal")
+ public Double getSubtotal() {
+ return subtotal;
+ }
+
+ public void setSubtotal(Double subtotal) {
+ this.subtotal = subtotal;
+ }
+
+ public TaxEstimationResponse exemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is exempted from tax.
+ * @return exemptAmount
+ */
+ @NotNull
+ @Schema(name = "exemptAmount", description = "The part of the `subtotal` that is exempted from tax.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("exemptAmount")
+ public Double getExemptAmount() {
+ return exemptAmount;
+ }
+
+ public void setExemptAmount(Double exemptAmount) {
+ this.exemptAmount = exemptAmount;
+ }
+
+ public TaxEstimationResponse discountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ return this;
+ }
+
+ /**
+ * The total discount applied. This is the sum of all `lineItems.discount`.
+ * @return discountAmount
+ */
+ @NotNull
+ @Schema(name = "discountAmount", description = "The total discount applied. This is the sum of all `lineItems.discount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("discountAmount")
+ public Double getDiscountAmount() {
+ return discountAmount;
+ }
+
+ public void setDiscountAmount(Double discountAmount) {
+ this.discountAmount = discountAmount;
+ }
+
+ public TaxEstimationResponse taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The part of the `subtotal` that is taxable.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The part of the `subtotal` that is taxable.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public TaxEstimationResponse taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The total tax payable. This is the sum of all `lineItems.taxAmount`.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The total tax payable. This is the sum of all `lineItems.taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ public TaxEstimationResponse total(Double total) {
+ this.total = total;
+ return this;
+ }
+
+ /**
+ * The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.
+ * @return total
+ */
+ @NotNull
+ @Schema(name = "total", description = "The total after discounts and taxes. This is the same as `subtotal` if it is tax inclusive; otherwise it is `subtotal` + `taxAmount`. `total` can also be expressed as `exemptAmount` + `taxableAmount` + `taxAmount`.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("total")
+ public Double getTotal() {
+ return total;
+ }
+
+ public void setTotal(Double total) {
+ this.total = total;
+ }
+
+ public TaxEstimationResponse lineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ return this;
+ }
+
+ public TaxEstimationResponse addLineItemsItem(InvoiceLineItem lineItemsItem) {
+ if (this.lineItems == null) {
+ this.lineItems = new ArrayList<>();
+ }
+ this.lineItems.add(lineItemsItem);
+ return this;
+ }
+
+ /**
+ * List of line item details for the tax estimation response.
+ * @return lineItems
+ */
+ @NotNull @Valid @Size(min = 1, max = 1250)
+ @Schema(name = "lineItems", description = "List of line item details for the tax estimation response.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("lineItems")
+ public List<@Valid InvoiceLineItem> getLineItems() {
+ return lineItems;
+ }
+
+ public void setLineItems(List<@Valid InvoiceLineItem> lineItems) {
+ this.lineItems = lineItems;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaxEstimationResponse taxEstimationResponse = (TaxEstimationResponse) o;
+ return Objects.equals(this.seller, taxEstimationResponse.seller) &&
+ Objects.equals(this.customer, taxEstimationResponse.customer) &&
+ Objects.equals(this.estimateDateTime, taxEstimationResponse.estimateDateTime) &&
+ Objects.equals(this.currency, taxEstimationResponse.currency) &&
+ Objects.equals(this.subtotal, taxEstimationResponse.subtotal) &&
+ Objects.equals(this.exemptAmount, taxEstimationResponse.exemptAmount) &&
+ Objects.equals(this.discountAmount, taxEstimationResponse.discountAmount) &&
+ Objects.equals(this.taxableAmount, taxEstimationResponse.taxableAmount) &&
+ Objects.equals(this.taxAmount, taxEstimationResponse.taxAmount) &&
+ Objects.equals(this.total, taxEstimationResponse.total) &&
+ Objects.equals(this.lineItems, taxEstimationResponse.lineItems);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(seller, customer, estimateDateTime, currency, subtotal, exemptAmount, discountAmount, taxableAmount, taxAmount, total, lineItems);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaxEstimationResponse {\n");
+ sb.append(" seller: ").append(toIndentedString(seller)).append("\n");
+ sb.append(" customer: ").append(toIndentedString(customer)).append("\n");
+ sb.append(" estimateDateTime: ").append(toIndentedString(estimateDateTime)).append("\n");
+ sb.append(" currency: ").append(toIndentedString(currency)).append("\n");
+ sb.append(" subtotal: ").append(toIndentedString(subtotal)).append("\n");
+ sb.append(" exemptAmount: ").append(toIndentedString(exemptAmount)).append("\n");
+ sb.append(" discountAmount: ").append(toIndentedString(discountAmount)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append(" total: ").append(toIndentedString(total)).append("\n");
+ sb.append(" lineItems: ").append(toIndentedString(lineItems)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxExemptType.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxExemptType.java
new file mode 100644
index 0000000..5519610
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxExemptType.java
@@ -0,0 +1,70 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The tax exemption type for a line item. This is a mandatory parameter while applying tax exemption on any line-item.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum TaxExemptType {
+
+ PRODUCT_EXEMPT("PRODUCT_EXEMPT"),
+
+ CUSTOMER_EXEMPT("CUSTOMER_EXEMPT"),
+
+ REGION_EXEMPT("REGION_EXEMPT"),
+
+ REVERSE_CHARGE("REVERSE_CHARGE"),
+
+ ZERO_RATE_TAX("ZERO_RATE_TAX"),
+
+ HIGH_VALUE_PHYSICAL_GOODS("HIGH_VALUE_PHYSICAL_GOODS"),
+
+ EXPORT("EXPORT"),
+
+ ZERO_VALUE_ITEM("ZERO_VALUE_ITEM"),
+
+ TAX_NOT_CONFIGURED("TAX_NOT_CONFIGURED");
+
+ private String value;
+
+ TaxExemptType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TaxExemptType fromValue(String value) {
+ for (TaxExemptType b : TaxExemptType.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdiction.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdiction.java
new file mode 100644
index 0000000..9f8dbc7
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdiction.java
@@ -0,0 +1,147 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.TaxJurisdictionType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The tax jurisdiction details.
+ */
+
+@Schema(name = "TaxJurisdiction", description = "The tax jurisdiction details.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class TaxJurisdiction {
+
+ private String code;
+
+ private TaxJurisdictionType type;
+
+ private String name;
+
+ public TaxJurisdiction() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TaxJurisdiction(String code, TaxJurisdictionType type, String name) {
+ this.code = code;
+ this.type = type;
+ this.name = name;
+ }
+
+ public TaxJurisdiction code(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * The jurisdiction code.
+ * @return code
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "code", description = "The jurisdiction code.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("code")
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ public TaxJurisdiction type(TaxJurisdictionType type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * Get type
+ * @return type
+ */
+ @NotNull @Valid
+ @Schema(name = "type", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("type")
+ public TaxJurisdictionType getType() {
+ return type;
+ }
+
+ public void setType(TaxJurisdictionType type) {
+ this.type = type;
+ }
+
+ public TaxJurisdiction name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The jurisdiction name.
+ * @return name
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "name", description = "The jurisdiction name.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaxJurisdiction taxJurisdiction = (TaxJurisdiction) o;
+ return Objects.equals(this.code, taxJurisdiction.code) &&
+ Objects.equals(this.type, taxJurisdiction.type) &&
+ Objects.equals(this.name, taxJurisdiction.name);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(code, type, name);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaxJurisdiction {\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdictionType.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdictionType.java
new file mode 100644
index 0000000..abebce1
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxJurisdictionType.java
@@ -0,0 +1,66 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The type of tax jurisdiction.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public enum TaxJurisdictionType {
+
+ COUNTRY("COUNTRY"),
+
+ FEDERAL("FEDERAL"),
+
+ STATE("STATE"),
+
+ COUNTY("COUNTY"),
+
+ CITY("CITY"),
+
+ SPECIAL("SPECIAL"),
+
+ OTHER("OTHER");
+
+ private String value;
+
+ TaxJurisdictionType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TaxJurisdictionType fromValue(String value) {
+ for (TaxJurisdictionType b : TaxJurisdictionType.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxLineItem.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxLineItem.java
new file mode 100644
index 0000000..303c67b
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/TaxLineItem.java
@@ -0,0 +1,223 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.TaxJurisdiction;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The details of tax applied under a specific jurisdiction.
+ */
+
+@Schema(name = "TaxLineItem", description = "The details of tax applied under a specific jurisdiction.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class TaxLineItem {
+
+ private Integer number;
+
+ private TaxJurisdiction jurisdiction;
+
+ private String name;
+
+ private Double rate;
+
+ private Double taxableAmount;
+
+ private Double taxAmount;
+
+ public TaxLineItem() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TaxLineItem(Integer number, TaxJurisdiction jurisdiction, String name, Double rate, Double taxableAmount, Double taxAmount) {
+ this.number = number;
+ this.jurisdiction = jurisdiction;
+ this.name = name;
+ this.rate = rate;
+ this.taxableAmount = taxableAmount;
+ this.taxAmount = taxAmount;
+ }
+
+ public TaxLineItem number(Integer number) {
+ this.number = number;
+ return this;
+ }
+
+ /**
+ * Index or serial number of this tax line item.
+ * minimum: 1
+ * @return number
+ */
+ @NotNull @Min(1)
+ @Schema(name = "number", description = "Index or serial number of this tax line item.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("number")
+ public Integer getNumber() {
+ return number;
+ }
+
+ public void setNumber(Integer number) {
+ this.number = number;
+ }
+
+ public TaxLineItem jurisdiction(TaxJurisdiction jurisdiction) {
+ this.jurisdiction = jurisdiction;
+ return this;
+ }
+
+ /**
+ * Get jurisdiction
+ * @return jurisdiction
+ */
+ @NotNull @Valid
+ @Schema(name = "jurisdiction", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("jurisdiction")
+ public TaxJurisdiction getJurisdiction() {
+ return jurisdiction;
+ }
+
+ public void setJurisdiction(TaxJurisdiction jurisdiction) {
+ this.jurisdiction = jurisdiction;
+ }
+
+ public TaxLineItem name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the tax applied.
+ * @return name
+ */
+ @NotNull
+ @Schema(name = "name", example = "GST", description = "The name of the tax applied.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public TaxLineItem rate(Double rate) {
+ this.rate = rate;
+ return this;
+ }
+
+ /**
+ * The tax rate expressed in percentage.
+ * maximum: 100
+ * @return rate
+ */
+ @NotNull @DecimalMax("100")
+ @Schema(name = "rate", description = "The tax rate expressed in percentage.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("rate")
+ public Double getRate() {
+ return rate;
+ }
+
+ public void setRate(Double rate) {
+ this.rate = rate;
+ }
+
+ public TaxLineItem taxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ return this;
+ }
+
+ /**
+ * The part of the line item's `subtotal` that is taxable under this jurisdiction.
+ * @return taxableAmount
+ */
+ @NotNull
+ @Schema(name = "taxableAmount", description = "The part of the line item's `subtotal` that is taxable under this jurisdiction.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxableAmount")
+ public Double getTaxableAmount() {
+ return taxableAmount;
+ }
+
+ public void setTaxableAmount(Double taxableAmount) {
+ this.taxableAmount = taxableAmount;
+ }
+
+ public TaxLineItem taxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ return this;
+ }
+
+ /**
+ * The tax payable for the line item under this jurisdiction.
+ * @return taxAmount
+ */
+ @NotNull
+ @Schema(name = "taxAmount", description = "The tax payable for the line item under this jurisdiction.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("taxAmount")
+ public Double getTaxAmount() {
+ return taxAmount;
+ }
+
+ public void setTaxAmount(Double taxAmount) {
+ this.taxAmount = taxAmount;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TaxLineItem taxLineItem = (TaxLineItem) o;
+ return Objects.equals(this.number, taxLineItem.number) &&
+ Objects.equals(this.jurisdiction, taxLineItem.jurisdiction) &&
+ Objects.equals(this.name, taxLineItem.name) &&
+ Objects.equals(this.rate, taxLineItem.rate) &&
+ Objects.equals(this.taxableAmount, taxLineItem.taxableAmount) &&
+ Objects.equals(this.taxAmount, taxLineItem.taxAmount);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(number, jurisdiction, name, rate, taxableAmount, taxAmount);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TaxLineItem {\n");
+ sb.append(" number: ").append(toIndentedString(number)).append("\n");
+ sb.append(" jurisdiction: ").append(toIndentedString(jurisdiction)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" rate: ").append(toIndentedString(rate)).append("\n");
+ sb.append(" taxableAmount: ").append(toIndentedString(taxableAmount)).append("\n");
+ sb.append(" taxAmount: ").append(toIndentedString(taxAmount)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponse.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponse.java
new file mode 100644
index 0000000..ce3a5c2
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponse.java
@@ -0,0 +1,108 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.ValidationErrorResponseErrorsInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The error response for validation errors with the respective entity and its field information.
+ */
+
+@Schema(name = "ValidationErrorResponse", description = "The error response for validation errors with the respective entity and its field information.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class ValidationErrorResponse {
+
+ @Valid
+ private List<@Valid ValidationErrorResponseErrorsInner> errors = new ArrayList<>();
+
+ public ValidationErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public ValidationErrorResponse(List<@Valid ValidationErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ public ValidationErrorResponse errors(List<@Valid ValidationErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public ValidationErrorResponse addErrorsItem(ValidationErrorResponseErrorsInner errorsItem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<>();
+ }
+ this.errors.add(errorsItem);
+ return this;
+ }
+
+ /**
+ * Get errors
+ * @return errors
+ */
+ @NotNull @Valid
+ @Schema(name = "errors", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("errors")
+ public List<@Valid ValidationErrorResponseErrorsInner> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<@Valid ValidationErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ValidationErrorResponse validationErrorResponse = (ValidationErrorResponse) o;
+ return Objects.equals(this.errors, validationErrorResponse.errors);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(errors);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ValidationErrorResponse {\n");
+ sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponseErrorsInner.java b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponseErrorsInner.java
new file mode 100644
index 0000000..781ff5f
--- /dev/null
+++ b/springproject/generated-openapi_tax.yml/src/main/java/com/example/model/openapitaxyml/ValidationErrorResponseErrorsInner.java
@@ -0,0 +1,196 @@
+package com.example.model.openapitaxyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitaxyml.ErrorCode;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.net.URI;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * ValidationErrorResponseErrorsInner
+ */
+
+@JsonTypeName("ValidationErrorResponse_errors_inner")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:39.362065+05:30[Asia/Kolkata]")
+public class ValidationErrorResponseErrorsInner {
+
+ private String entity;
+
+ private String entityField;
+
+ private ErrorCode code;
+
+ private String message;
+
+ private URI helpUrl;
+
+ public ValidationErrorResponseErrorsInner() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public ValidationErrorResponseErrorsInner(ErrorCode code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+
+ public ValidationErrorResponseErrorsInner entity(String entity) {
+ this.entity = entity;
+ return this;
+ }
+
+ /**
+ * The target entity that has the invalid field or value.
+ * @return entity
+ */
+ @Size(max = 20)
+ @Schema(name = "entity", example = "customer", description = "The target entity that has the invalid field or value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("entity")
+ public String getEntity() {
+ return entity;
+ }
+
+ public void setEntity(String entity) {
+ this.entity = entity;
+ }
+
+ public ValidationErrorResponseErrorsInner entityField(String entityField) {
+ this.entityField = entityField;
+ return this;
+ }
+
+ /**
+ * The field of an entity that has the invalid value.
+ * @return entityField
+ */
+ @Size(max = 250)
+ @Schema(name = "entityField", example = "lineItems[0].taxIdentifiers[0].value", description = "The field of an entity that has the invalid value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("entityField")
+ public String getEntityField() {
+ return entityField;
+ }
+
+ public void setEntityField(String entityField) {
+ this.entityField = entityField;
+ }
+
+ public ValidationErrorResponseErrorsInner code(ErrorCode code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ * @return code
+ */
+ @NotNull @Valid
+ @Schema(name = "code", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("code")
+ public ErrorCode getCode() {
+ return code;
+ }
+
+ public void setCode(ErrorCode code) {
+ this.code = code;
+ }
+
+ public ValidationErrorResponseErrorsInner message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * A short message describing the reason for the error.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Invalid tax code provided.", description = "A short message describing the reason for the error.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public ValidationErrorResponseErrorsInner helpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+ @Valid
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Authentication", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public URI getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ ValidationErrorResponseErrorsInner validationErrorResponseErrorsInner = (ValidationErrorResponseErrorsInner) o;
+ return Objects.equals(this.entity, validationErrorResponseErrorsInner.entity) &&
+ Objects.equals(this.entityField, validationErrorResponseErrorsInner.entityField) &&
+ Objects.equals(this.code, validationErrorResponseErrorsInner.code) &&
+ Objects.equals(this.message, validationErrorResponseErrorsInner.message) &&
+ Objects.equals(this.helpUrl, validationErrorResponseErrorsInner.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(entity, entityField, code, message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class ValidationErrorResponseErrorsInner {\n");
+ sb.append(" entity: ").append(toIndentedString(entity)).append("\n");
+ sb.append(" entityField: ").append(toIndentedString(entityField)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/.openapi-generator-ignore b/springproject/generated-openapi_trn.yml/.openapi-generator-ignore
new file mode 100644
index 0000000..7484ee5
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/springproject/generated-openapi_trn.yml/.openapi-generator/FILES b/springproject/generated-openapi_trn.yml/.openapi-generator/FILES
new file mode 100644
index 0000000..f66d0cf
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/.openapi-generator/FILES
@@ -0,0 +1,29 @@
+.openapi-generator-ignore
+README.md
+pom.xml
+src/main/java/com/example/api/openapitrnyml/ApiUtil.java
+src/main/java/com/example/api/openapitrnyml/CredentialsApi.java
+src/main/java/com/example/api/openapitrnyml/HealthApi.java
+src/main/java/com/example/api/openapitrnyml/TrnApi.java
+src/main/java/com/example/model/openapitrnyml/BasicErrorResponse.java
+src/main/java/com/example/model/openapitrnyml/BatchDeleteResponse.java
+src/main/java/com/example/model/openapitrnyml/BatchRequest.java
+src/main/java/com/example/model/openapitrnyml/BatchResponse.java
+src/main/java/com/example/model/openapitrnyml/BusinessStatus.java
+src/main/java/com/example/model/openapitrnyml/Country.java
+src/main/java/com/example/model/openapitrnyml/CredentialStatus.java
+src/main/java/com/example/model/openapitrnyml/CredentialValidationResponse.java
+src/main/java/com/example/model/openapitrnyml/ErrorCode.java
+src/main/java/com/example/model/openapitrnyml/HealthCheckComponent.java
+src/main/java/com/example/model/openapitrnyml/HealthCheckResponse.java
+src/main/java/com/example/model/openapitrnyml/HealthStatus.java
+src/main/java/com/example/model/openapitrnyml/Status.java
+src/main/java/com/example/model/openapitrnyml/TrnStatus.java
+src/main/java/com/example/model/openapitrnyml/TrnType.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateBatchDeleteResponse.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateBatchRequest.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateBatchResponse.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponse.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponseErrorsInner.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateRequest.java
+src/main/java/com/example/model/openapitrnyml/TrnValidateResponse.java
diff --git a/springproject/generated-openapi_trn.yml/.openapi-generator/VERSION b/springproject/generated-openapi_trn.yml/.openapi-generator/VERSION
new file mode 100644
index 0000000..73a86b1
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/.openapi-generator/VERSION
@@ -0,0 +1 @@
+7.0.1
\ No newline at end of file
diff --git a/springproject/generated-openapi_trn.yml/README.md b/springproject/generated-openapi_trn.yml/README.md
new file mode 100644
index 0000000..d43a1de
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/README.md
@@ -0,0 +1,27 @@
+
+# OpenAPI generated API stub
+
+Spring Framework stub
+
+
+## Overview
+This code was generated by the [OpenAPI Generator](https://openapi-generator.tech) project.
+By using the [OpenAPI-Spec](https://openapis.org), you can easily generate an API stub.
+This is an example of building API stub interfaces in Java using the Spring framework.
+
+The stubs generated can be used in your existing Spring-MVC or Spring-Boot application to create controller endpoints
+by adding ```@Controller``` classes that implement the interface. Eg:
+```java
+@Controller
+public class PetController implements PetApi {
+// implement all PetApi methods
+}
+```
+
+You can also use the interface to create [Spring-Cloud Feign clients](http://projects.spring.io/spring-cloud/spring-cloud.html#spring-cloud-feign-inheritance).Eg:
+```java
+@FeignClient(name="pet", url="http://petstore.swagger.io/v2")
+public interface PetClient extends PetApi {
+
+}
+```
diff --git a/springproject/generated-openapi_trn.yml/pom.xml b/springproject/generated-openapi_trn.yml/pom.xml
new file mode 100644
index 0000000..4cbf265
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/pom.xml
@@ -0,0 +1,74 @@
+
+ 4.0.0
+ org.openapitools
+ openapi-spring
+ jar
+ openapi-spring
+ 0.0.1
+
+ 1.8
+ ${java.version}
+ ${java.version}
+ UTF-8
+ 1.6.14
+ 4.15.5
+
+
+ org.springframework.boot
+ spring-boot-starter-parent
+ 2.7.6
+
+
+
+ src/main/java
+
+
+
+ org.springframework.boot
+ spring-boot-starter-web
+
+
+ org.springframework.data
+ spring-data-commons
+
+
+
+ org.springdoc
+ springdoc-openapi-ui
+ ${springdoc.version}
+
+
+
+ com.google.code.findbugs
+ jsr305
+ 3.0.2
+
+
+ com.fasterxml.jackson.dataformat
+ jackson-dataformat-yaml
+
+
+ com.fasterxml.jackson.datatype
+ jackson-datatype-jsr310
+
+
+ org.openapitools
+ jackson-databind-nullable
+ 0.2.6
+
+
+
+ org.springframework.boot
+ spring-boot-starter-validation
+
+
+ com.fasterxml.jackson.core
+ jackson-databind
+
+
+ org.springframework.boot
+ spring-boot-starter-test
+ test
+
+
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/ApiUtil.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/ApiUtil.java
new file mode 100644
index 0000000..78f66b3
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/ApiUtil.java
@@ -0,0 +1,19 @@
+package com.example.api.openapitrnyml;
+
+import org.springframework.web.context.request.NativeWebRequest;
+
+import javax.servlet.http.HttpServletResponse;
+import java.io.IOException;
+
+public class ApiUtil {
+ public static void setExampleResponse(NativeWebRequest req, String contentType, String example) {
+ try {
+ HttpServletResponse res = req.getNativeResponse(HttpServletResponse.class);
+ res.setCharacterEncoding("UTF-8");
+ res.addHeader("Content-Type", contentType);
+ res.getWriter().print(example);
+ } catch (IOException e) {
+ throw new RuntimeException(e);
+ }
+ }
+}
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/CredentialsApi.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/CredentialsApi.java
new file mode 100644
index 0000000..f838e3e
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/CredentialsApi.java
@@ -0,0 +1,86 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitrnyml;
+
+import com.example.model.openapitrnyml.BasicErrorResponse;
+import com.example.model.openapitrnyml.CredentialValidationResponse;
+import com.example.model.openapitrnyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Authentication", description = "Endpoints to validate the credentials used for calling the Service Provider.")
+public interface CredentialsApi {
+
+ /**
+ * POST /credentials/validate : Validate credentials
+ * This endpoint is used to validate the credentials used to call the Service Provider.
+ *
+ * @return Authentication succeeded. (status code 200)
+ * or Authentication failed. (status code 401)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "validateCredentials",
+ summary = "Validate credentials",
+ description = "This endpoint is used to validate the credentials used to call the Service Provider.",
+ tags = { "Authentication" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Authentication succeeded.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Authentication failed.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = CredentialValidationResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/credentials/validate",
+ produces = { "application/json" }
+ )
+ ResponseEntity validateCredentials(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/HealthApi.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/HealthApi.java
new file mode 100644
index 0000000..3553c7a
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/HealthApi.java
@@ -0,0 +1,81 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitrnyml;
+
+import com.example.model.openapitrnyml.BasicErrorResponse;
+import com.example.model.openapitrnyml.HealthCheckResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "Health", description = "Endpoints to monitor the health of the Service Provider and the Service Adapter.")
+public interface HealthApi {
+
+ /**
+ * GET /health : Fetch the health status of the Service Provider.
+ * This endpoint is used to fetch the health status of the Service Provider.
+ *
+ * @return Service is healthy. (status code 200)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchHealth",
+ summary = "Fetch the health status of the Service Provider.",
+ description = "This endpoint is used to fetch the health status of the Service Provider.",
+ tags = { "Health" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Service is healthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ }),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/health",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchHealth(
+
+ );
+
+}
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/TrnApi.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/TrnApi.java
new file mode 100644
index 0000000..70c62b1
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/api/openapitrnyml/TrnApi.java
@@ -0,0 +1,296 @@
+/**
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (7.0.1).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
+ */
+package com.example.api.openapitrnyml;
+
+import com.example.model.openapitrnyml.BasicErrorResponse;
+import com.example.model.openapitrnyml.HealthCheckResponse;
+import com.example.model.openapitrnyml.TrnValidateBatchDeleteResponse;
+import com.example.model.openapitrnyml.TrnValidateBatchRequest;
+import com.example.model.openapitrnyml.TrnValidateBatchResponse;
+import com.example.model.openapitrnyml.TrnValidateErrorResponse;
+import com.example.model.openapitrnyml.TrnValidateRequest;
+import com.example.model.openapitrnyml.TrnValidateResponse;
+import io.swagger.v3.oas.annotations.ExternalDocumentation;
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.Parameters;
+import io.swagger.v3.oas.annotations.media.ArraySchema;
+import io.swagger.v3.oas.annotations.media.Content;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import org.springframework.http.HttpStatus;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.*;
+import org.springframework.web.context.request.NativeWebRequest;
+import org.springframework.web.multipart.MultipartFile;
+
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import java.util.List;
+import java.util.Map;
+import java.util.Optional;
+import javax.annotation.Generated;
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+@Validated
+@Tag(name = "TrnValidate", description = "Endpoints to validate the tax registration number(s).")
+public interface TrnApi {
+
+ /**
+ * DELETE /trn/validate/batch/{batchId} : Delete the request of batch of tax registration numbers validation
+ * This endpoint takes the batch id and delete the running batch of tax registration numbers validation request at server side.
+ *
+ * @param batchId The unique batch request identifier. (required)
+ * @return Successfully deleted the request of batch of tax registration numbers validation. (status code 200)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "deleteTrnValidateBatch",
+ summary = "Delete the request of batch of tax registration numbers validation",
+ description = "This endpoint takes the batch id and delete the running batch of tax registration numbers validation request at server side.",
+ tags = { "TrnValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Successfully deleted the request of batch of tax registration numbers validation.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateBatchDeleteResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.DELETE,
+ value = "/trn/validate/batch/{batchId}",
+ produces = { "application/json" }
+ )
+ ResponseEntity deleteTrnValidateBatch(
+ @Parameter(name = "batchId", description = "The unique batch request identifier.", required = true, in = ParameterIn.PATH) @PathVariable("batchId") String batchId
+ );
+
+
+ /**
+ * GET /trn/validate/{requestId} : Get the response of tax registration number validate request
+ * This endpoint takes the request id and returns the response of the tax registration number
+ *
+ * @param requestId The unique request identifier. (required)
+ * @return Response of tax registration number validation. (status code 200)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchTrnValidate",
+ summary = "Get the response of tax registration number validate request",
+ description = "This endpoint takes the request id and returns the response of the tax registration number",
+ tags = { "TrnValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Response of tax registration number validation.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/trn/validate/{requestId}",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchTrnValidate(
+ @Parameter(name = "requestId", description = "The unique request identifier.", required = true, in = ParameterIn.PATH) @PathVariable("requestId") String requestId
+ );
+
+
+ /**
+ * GET /trn/validate/batch/{batchId} : Get the response of batch of tax registration numbers
+ * This endpoint takes the batch id and returns the response of batch of tax registration numbers.
+ *
+ * @param batchId The unique batch request identifier. (required)
+ * @param offset The starting index of records to be returned. (required)
+ * @param limit The limit number of records to be returned. (required)
+ * @return Response of the batch of tax registration numbers validation. (status code 200)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Not found. (status code 404)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "fetchTrnValidateBatch",
+ summary = "Get the response of batch of tax registration numbers",
+ description = "This endpoint takes the batch id and returns the response of batch of tax registration numbers.",
+ tags = { "TrnValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Response of the batch of tax registration numbers validation.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateBatchResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "404", description = "Not found."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.GET,
+ value = "/trn/validate/batch/{batchId}",
+ produces = { "application/json" }
+ )
+ ResponseEntity fetchTrnValidateBatch(
+ @Parameter(name = "batchId", description = "The unique batch request identifier.", required = true, in = ParameterIn.PATH) @PathVariable("batchId") String batchId,
+ @NotNull @Parameter(name = "offset", description = "The starting index of records to be returned.", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "offset", required = true, defaultValue = "0") Integer offset,
+ @NotNull @Parameter(name = "limit", description = "The limit number of records to be returned.", required = true, in = ParameterIn.QUERY) @Valid @RequestParam(value = "limit", required = true, defaultValue = "100") Integer limit
+ );
+
+
+ /**
+ * POST /trn/validate : Validate the tax registration number
+ * This endpoint takes the details of tax registration number and validate.
+ *
+ * @param trnValidateRequest (optional)
+ * @return Request to validate the tax registration number submitted successfully. (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "trnValidate",
+ summary = "Validate the tax registration number",
+ description = "This endpoint takes the details of tax registration number and validate.",
+ tags = { "TrnValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Request to validate the tax registration number submitted successfully.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/trn/validate",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity trnValidate(
+ @Parameter(name = "TrnValidateRequest", description = "") @Valid @RequestBody(required = false) TrnValidateRequest trnValidateRequest
+ );
+
+
+ /**
+ * POST /trn/validate/batch : Validate the tax registration numbers in batch
+ * This endpoint takes the batch of tax registration numbers and validate.
+ *
+ * @param trnValidateBatchRequest (optional)
+ * @return Request to validate the batch of tax registration numbers being processed. (status code 200)
+ * or Bad request. (status code 400)
+ * or Unauthenticated request. (status code 401)
+ * or Unauthorized request. (status code 403)
+ * or Too many requests. (status code 429)
+ * or Unexpected error while processing request. (status code 500)
+ * or Service is unhealthy. (status code 503)
+ */
+ @Operation(
+ operationId = "trnValidateBatch",
+ summary = "Validate the tax registration numbers in batch",
+ description = "This endpoint takes the batch of tax registration numbers and validate.",
+ tags = { "TrnValidate" },
+ responses = {
+ @ApiResponse(responseCode = "200", description = "Request to validate the batch of tax registration numbers being processed.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateBatchResponse.class))
+ }),
+ @ApiResponse(responseCode = "400", description = "Bad request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = TrnValidateErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "401", description = "Unauthenticated request."),
+ @ApiResponse(responseCode = "403", description = "Unauthorized request."),
+ @ApiResponse(responseCode = "429", description = "Too many requests."),
+ @ApiResponse(responseCode = "500", description = "Unexpected error while processing request.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = BasicErrorResponse.class))
+ }),
+ @ApiResponse(responseCode = "503", description = "Service is unhealthy.", content = {
+ @Content(mediaType = "application/json", schema = @Schema(implementation = HealthCheckResponse.class))
+ })
+ },
+ security = {
+ @SecurityRequirement(name = "apiKey"),
+ @SecurityRequirement(name = "bearerAuth")
+ }
+ )
+ @RequestMapping(
+ method = RequestMethod.POST,
+ value = "/trn/validate/batch",
+ produces = { "application/json" },
+ consumes = { "application/json" }
+ )
+ ResponseEntity trnValidateBatch(
+ @Parameter(name = "TrnValidateBatchRequest", description = "") @Valid @RequestBody(required = false) TrnValidateBatchRequest trnValidateBatchRequest
+ );
+
+}
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BasicErrorResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BasicErrorResponse.java
new file mode 100644
index 0000000..5bfeba0
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BasicErrorResponse.java
@@ -0,0 +1,120 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.net.URI;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The basic error response containing the error message and the help documentation link.
+ */
+
+@Schema(name = "BasicErrorResponse", description = "The basic error response containing the error message and the help documentation link.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class BasicErrorResponse {
+
+ private String message;
+
+ private URI helpUrl;
+
+ public BasicErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public BasicErrorResponse(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * The description of the error with details about it's cause.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Invalid Credentials", description = "The description of the error with details about it's cause.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public BasicErrorResponse helpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+ @Valid
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Authentication", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public URI getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(URI helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BasicErrorResponse basicErrorResponse = (BasicErrorResponse) o;
+ return Objects.equals(this.message, basicErrorResponse.message) &&
+ Objects.equals(this.helpUrl, basicErrorResponse.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BasicErrorResponse {\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchDeleteResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchDeleteResponse.java
new file mode 100644
index 0000000..8fb6be7
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchDeleteResponse.java
@@ -0,0 +1,119 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Response to delete the batch request
+ */
+
+@Schema(name = "BatchDeleteResponse", description = "Response to delete the batch request")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class BatchDeleteResponse {
+
+ private String batchId;
+
+ private String message;
+
+ public BatchDeleteResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public BatchDeleteResponse(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public BatchDeleteResponse batchId(String batchId) {
+ this.batchId = batchId;
+ return this;
+ }
+
+ /**
+ * Id of the batch request
+ * @return batchId
+ */
+ @NotNull
+ @Schema(name = "batchId", description = "Id of the batch request", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("batchId")
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public BatchDeleteResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Message about deleting of batch request
+ * @return message
+ */
+
+ @Schema(name = "message", description = "Message about deleting of batch request", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BatchDeleteResponse batchDeleteResponse = (BatchDeleteResponse) o;
+ return Objects.equals(this.batchId, batchDeleteResponse.batchId) &&
+ Objects.equals(this.message, batchDeleteResponse.message);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchId, message);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BatchDeleteResponse {\n");
+ sb.append(" batchId: ").append(toIndentedString(batchId)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchRequest.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchRequest.java
new file mode 100644
index 0000000..03f7d70
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchRequest.java
@@ -0,0 +1,108 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains required properties for batch request
+ */
+
+@Schema(name = "BatchRequest", description = "Contains required properties for batch request")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class BatchRequest {
+
+ private String batchName;
+
+ private String externalId;
+
+ public BatchRequest batchName(String batchName) {
+ this.batchName = batchName;
+ return this;
+ }
+
+ /**
+ * Name of the batch
+ * @return batchName
+ */
+
+ @Schema(name = "batchName", description = "Name of the batch", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("batchName")
+ public String getBatchName() {
+ return batchName;
+ }
+
+ public void setBatchName(String batchName) {
+ this.batchName = batchName;
+ }
+
+ public BatchRequest externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * Way to relate the request for future reference. Hold the reference value passed in request, expecting the same would be returned in response.
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "Way to relate the request for future reference. Hold the reference value passed in request, expecting the same would be returned in response.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BatchRequest batchRequest = (BatchRequest) o;
+ return Objects.equals(this.batchName, batchRequest.batchName) &&
+ Objects.equals(this.externalId, batchRequest.externalId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchName, externalId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BatchRequest {\n");
+ sb.append(" batchName: ").append(toIndentedString(batchName)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchResponse.java
new file mode 100644
index 0000000..efbd843
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BatchResponse.java
@@ -0,0 +1,244 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.Status;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains the required properties for response of batch request.
+ */
+
+@Schema(name = "BatchResponse", description = "Contains the required properties for response of batch request.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class BatchResponse {
+
+ private String batchId;
+
+ private String batchName;
+
+ private Status status;
+
+ private Integer limit;
+
+ private Integer offset;
+
+ private Integer completionPercentage;
+
+ private String externalId;
+
+ public BatchResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public BatchResponse(String batchId, Status status, Integer limit, Integer offset) {
+ this.batchId = batchId;
+ this.status = status;
+ this.limit = limit;
+ this.offset = offset;
+ }
+
+ public BatchResponse batchId(String batchId) {
+ this.batchId = batchId;
+ return this;
+ }
+
+ /**
+ * Id of the batch request.
+ * @return batchId
+ */
+ @NotNull
+ @Schema(name = "batchId", description = "Id of the batch request.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("batchId")
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public BatchResponse batchName(String batchName) {
+ this.batchName = batchName;
+ return this;
+ }
+
+ /**
+ * Name of the batch request.
+ * @return batchName
+ */
+
+ @Schema(name = "batchName", description = "Name of the batch request.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("batchName")
+ public String getBatchName() {
+ return batchName;
+ }
+
+ public void setBatchName(String batchName) {
+ this.batchName = batchName;
+ }
+
+ public BatchResponse status(Status status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public BatchResponse limit(Integer limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Use for the pagination for batch request, limit indicates the maximum number of records to be returned in the response.
+ * @return limit
+ */
+ @NotNull
+ @Schema(name = "limit", description = "Use for the pagination for batch request, limit indicates the maximum number of records to be returned in the response.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("limit")
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+
+ public BatchResponse offset(Integer offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ /**
+ * Use for the pagination for batch request, offset indicates the starting point of records to be returned in the response.
+ * @return offset
+ */
+ @NotNull
+ @Schema(name = "offset", description = "Use for the pagination for batch request, offset indicates the starting point of records to be returned in the response.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("offset")
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+
+ public BatchResponse completionPercentage(Integer completionPercentage) {
+ this.completionPercentage = completionPercentage;
+ return this;
+ }
+
+ /**
+ * Percentage of batch request processing.
+ * @return completionPercentage
+ */
+
+ @Schema(name = "completionPercentage", description = "Percentage of batch request processing.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("completionPercentage")
+ public Integer getCompletionPercentage() {
+ return completionPercentage;
+ }
+
+ public void setCompletionPercentage(Integer completionPercentage) {
+ this.completionPercentage = completionPercentage;
+ }
+
+ public BatchResponse externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * The externalId passed in request.
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "The externalId passed in request.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ BatchResponse batchResponse = (BatchResponse) o;
+ return Objects.equals(this.batchId, batchResponse.batchId) &&
+ Objects.equals(this.batchName, batchResponse.batchName) &&
+ Objects.equals(this.status, batchResponse.status) &&
+ Objects.equals(this.limit, batchResponse.limit) &&
+ Objects.equals(this.offset, batchResponse.offset) &&
+ Objects.equals(this.completionPercentage, batchResponse.completionPercentage) &&
+ Objects.equals(this.externalId, batchResponse.externalId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchId, batchName, status, limit, offset, completionPercentage, externalId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class BatchResponse {\n");
+ sb.append(" batchId: ").append(toIndentedString(batchId)).append("\n");
+ sb.append(" batchName: ").append(toIndentedString(batchName)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
+ sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
+ sb.append(" completionPercentage: ").append(toIndentedString(completionPercentage)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BusinessStatus.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BusinessStatus.java
new file mode 100644
index 0000000..0f14833
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/BusinessStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Indicate the status of the business of tax registration number.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum BusinessStatus {
+
+ ACTIVE("ACTIVE"),
+
+ INACTIVE("INACTIVE"),
+
+ UNKNOWN("UNKNOWN");
+
+ private String value;
+
+ BusinessStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static BusinessStatus fromValue(String value) {
+ for (BusinessStatus b : BusinessStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Country.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Country.java
new file mode 100644
index 0000000..5ab5037
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Country.java
@@ -0,0 +1,119 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Defines the required properties to hold information about Country
+ */
+
+@Schema(name = "Country", description = "Defines the required properties to hold information about Country")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class Country {
+
+ private String name;
+
+ private String code;
+
+ public Country() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public Country(String code) {
+ this.code = code;
+ }
+
+ public Country name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the country
+ * @return name
+ */
+
+ @Schema(name = "name", description = "Name of the country", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public Country code(String code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Code of the country
+ * @return code
+ */
+ @NotNull
+ @Schema(name = "code", description = "Code of the country", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("code")
+ public String getCode() {
+ return code;
+ }
+
+ public void setCode(String code) {
+ this.code = code;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ Country country = (Country) o;
+ return Objects.equals(this.name, country.name) &&
+ Objects.equals(this.code, country.code);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(name, code);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class Country {\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialStatus.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialStatus.java
new file mode 100644
index 0000000..886eb79
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialStatus.java
@@ -0,0 +1,56 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of the credentials used for authentication.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum CredentialStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID");
+
+ private String value;
+
+ CredentialStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static CredentialStatus fromValue(String value) {
+ for (CredentialStatus b : CredentialStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialValidationResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialValidationResponse.java
new file mode 100644
index 0000000..6221182
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/CredentialValidationResponse.java
@@ -0,0 +1,96 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.CredentialStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * CredentialValidationResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class CredentialValidationResponse {
+
+ private CredentialStatus status;
+
+ public CredentialValidationResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public CredentialValidationResponse(CredentialStatus status) {
+ this.status = status;
+ }
+
+ public CredentialValidationResponse status(CredentialStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public CredentialStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(CredentialStatus status) {
+ this.status = status;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ CredentialValidationResponse credentialValidationResponse = (CredentialValidationResponse) o;
+ return Objects.equals(this.status, credentialValidationResponse.status);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(status);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class CredentialValidationResponse {\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/ErrorCode.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/ErrorCode.java
new file mode 100644
index 0000000..430895e
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/ErrorCode.java
@@ -0,0 +1,72 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The error codes classify the type of exception that occurred during processing the request.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum ErrorCode {
+
+ INVALID_OPERATION("INVALID_OPERATION"),
+
+ SERVICE_EXCEPTION("SERVICE_EXCEPTION"),
+
+ SERVICE_UNAVAILABLE("SERVICE_UNAVAILABLE"),
+
+ SERVICE_LIMIT_EXCEEDED("SERVICE_LIMIT_EXCEEDED"),
+
+ MISSING_REQUIRED_DATA("MISSING_REQUIRED_DATA"),
+
+ INVALID_DATA("INVALID_DATA"),
+
+ INVALID_TYPE("INVALID_TYPE"),
+
+ INVALID_FORMAT("INVALID_FORMAT"),
+
+ INVALID_RANGE("INVALID_RANGE"),
+
+ LOCATION_VALIDATION_FAILED("LOCATION_VALIDATION_FAILED");
+
+ private String value;
+
+ ErrorCode(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static ErrorCode fromValue(String value) {
+ for (ErrorCode b : ErrorCode.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckComponent.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckComponent.java
new file mode 100644
index 0000000..a8fbeae
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckComponent.java
@@ -0,0 +1,273 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * The health status details of a specific component reported by the Service Adapter.
+ */
+
+@Schema(name = "HealthCheckComponent", description = "The health status details of a specific component reported by the Service Adapter.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class HealthCheckComponent {
+
+ private String id;
+
+ private String name;
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ */
+ public enum TypeEnum {
+ OTHER("OTHER"),
+
+ SYSTEM("SYSTEM"),
+
+ API("API"),
+
+ ADAPTER("ADAPTER"),
+
+ DATABASE("DATABASE");
+
+ private String value;
+
+ TypeEnum(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TypeEnum fromValue(String value) {
+ for (TypeEnum b : TypeEnum.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+ }
+
+ private TypeEnum type;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List endpoints;
+
+ public HealthCheckComponent() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckComponent(String id, String name, TypeEnum type, HealthStatus status) {
+ this.id = id;
+ this.name = name;
+ this.type = type;
+ this.status = status;
+ }
+
+ public HealthCheckComponent id(String id) {
+ this.id = id;
+ return this;
+ }
+
+ /**
+ * The id of the component.
+ * @return id
+ */
+ @NotNull @Size(max = 50)
+ @Schema(name = "id", description = "The id of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("id")
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
+
+ public HealthCheckComponent name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * The name of the component.
+ * @return name
+ */
+ @NotNull @Size(max = 150)
+ @Schema(name = "name", description = "The name of the component.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public HealthCheckComponent type(TypeEnum type) {
+ this.type = type;
+ return this;
+ }
+
+ /**
+ * The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown.
+ * @return type
+ */
+ @NotNull
+ @Schema(name = "type", description = "The type of component affected when `status` is `WARN` or `DOWN`. The possible values are: - `ADAPTER`: The reported status is for the Service Adapter. - `API`: The reported status is for the Service Provider. - `DATABASE`: The reported status is for a database dependency of the Service Provider. - `SYSTEM`: The reported status is for any other known system component such as cache or gateway. - `OTHER`: The reported status is either for a component that does not belong to the types described above or the source of the issue is unknown. ", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("type")
+ public TypeEnum getType() {
+ return type;
+ }
+
+ public void setType(TypeEnum type) {
+ this.type = type;
+ }
+
+ public HealthCheckComponent description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The detailed status of the component.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The detailed status of the component.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckComponent status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckComponent endpoints(List endpoints) {
+ this.endpoints = endpoints;
+ return this;
+ }
+
+ public HealthCheckComponent addEndpointsItem(String endpointsItem) {
+ if (this.endpoints == null) {
+ this.endpoints = new ArrayList<>();
+ }
+ this.endpoints.add(endpointsItem);
+ return this;
+ }
+
+ /**
+ * When the `status` of the component is not `UP`, then the list of endpoints affected.
+ * @return endpoints
+ */
+
+ @Schema(name = "endpoints", description = "When the `status` of the component is not `UP`, then the list of endpoints affected.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("endpoints")
+ public List getEndpoints() {
+ return endpoints;
+ }
+
+ public void setEndpoints(List endpoints) {
+ this.endpoints = endpoints;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckComponent healthCheckComponent = (HealthCheckComponent) o;
+ return Objects.equals(this.id, healthCheckComponent.id) &&
+ Objects.equals(this.name, healthCheckComponent.name) &&
+ Objects.equals(this.type, healthCheckComponent.type) &&
+ Objects.equals(this.description, healthCheckComponent.description) &&
+ Objects.equals(this.status, healthCheckComponent.status) &&
+ Objects.equals(this.endpoints, healthCheckComponent.endpoints);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(id, name, type, description, status, endpoints);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckComponent {\n");
+ sb.append(" id: ").append(toIndentedString(id)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" type: ").append(toIndentedString(type)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" endpoints: ").append(toIndentedString(endpoints)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckResponse.java
new file mode 100644
index 0000000..4ef274c
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthCheckResponse.java
@@ -0,0 +1,210 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.HealthCheckComponent;
+import com.example.model.openapitrnyml.HealthStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.time.OffsetDateTime;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.springframework.format.annotation.DateTimeFormat;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * HealthCheckResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class HealthCheckResponse {
+
+ private String version;
+
+ private String description;
+
+ private HealthStatus status;
+
+ @Valid
+ private List<@Valid HealthCheckComponent> components = new ArrayList<>();
+
+ @DateTimeFormat(iso = DateTimeFormat.ISO.DATE_TIME)
+ private OffsetDateTime time;
+
+ public HealthCheckResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public HealthCheckResponse(HealthStatus status, List<@Valid HealthCheckComponent> components, OffsetDateTime time) {
+ this.status = status;
+ this.components = components;
+ this.time = time;
+ }
+
+ public HealthCheckResponse version(String version) {
+ this.version = version;
+ return this;
+ }
+
+ /**
+ * Get version
+ * @return version
+ */
+ @Size(min = 1)
+ @Schema(name = "version", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("version")
+ public String getVersion() {
+ return version;
+ }
+
+ public void setVersion(String version) {
+ this.version = version;
+ }
+
+ public HealthCheckResponse description(String description) {
+ this.description = description;
+ return this;
+ }
+
+ /**
+ * The description of the health status returned by the Service Adapter.
+ * @return description
+ */
+ @Size(max = 250)
+ @Schema(name = "description", description = "The description of the health status returned by the Service Adapter.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("description")
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(String description) {
+ this.description = description;
+ }
+
+ public HealthCheckResponse status(HealthStatus status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public HealthStatus getStatus() {
+ return status;
+ }
+
+ public void setStatus(HealthStatus status) {
+ this.status = status;
+ }
+
+ public HealthCheckResponse components(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ return this;
+ }
+
+ public HealthCheckResponse addComponentsItem(HealthCheckComponent componentsItem) {
+ if (this.components == null) {
+ this.components = new ArrayList<>();
+ }
+ this.components.add(componentsItem);
+ return this;
+ }
+
+ /**
+ * List of health status details for each component reported by the Service Adapter.
+ * @return components
+ */
+ @NotNull @Valid
+ @Schema(name = "components", description = "List of health status details for each component reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("components")
+ public List<@Valid HealthCheckComponent> getComponents() {
+ return components;
+ }
+
+ public void setComponents(List<@Valid HealthCheckComponent> components) {
+ this.components = components;
+ }
+
+ public HealthCheckResponse time(OffsetDateTime time) {
+ this.time = time;
+ return this;
+ }
+
+ /**
+ * The timestamp of the health status reported by the Service Adapter.
+ * @return time
+ */
+ @NotNull @Valid
+ @Schema(name = "time", description = "The timestamp of the health status reported by the Service Adapter.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("time")
+ public OffsetDateTime getTime() {
+ return time;
+ }
+
+ public void setTime(OffsetDateTime time) {
+ this.time = time;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ HealthCheckResponse healthCheckResponse = (HealthCheckResponse) o;
+ return Objects.equals(this.version, healthCheckResponse.version) &&
+ Objects.equals(this.description, healthCheckResponse.description) &&
+ Objects.equals(this.status, healthCheckResponse.status) &&
+ Objects.equals(this.components, healthCheckResponse.components) &&
+ Objects.equals(this.time, healthCheckResponse.time);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(version, description, status, components, time);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class HealthCheckResponse {\n");
+ sb.append(" version: ").append(toIndentedString(version)).append("\n");
+ sb.append(" description: ").append(toIndentedString(description)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" components: ").append(toIndentedString(components)).append("\n");
+ sb.append(" time: ").append(toIndentedString(time)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthStatus.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthStatus.java
new file mode 100644
index 0000000..59d0c0d
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/HealthStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * The status of a specific component reported by the Service Adapter.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum HealthStatus {
+
+ UP("UP"),
+
+ DOWN("DOWN"),
+
+ WARN("WARN");
+
+ private String value;
+
+ HealthStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static HealthStatus fromValue(String value) {
+ for (HealthStatus b : HealthStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Status.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Status.java
new file mode 100644
index 0000000..5ed9960
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/Status.java
@@ -0,0 +1,60 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * This field indicates current status of the request at server side.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum Status {
+
+ COMPLETED("COMPLETED"),
+
+ FAILED("FAILED"),
+
+ RUNNING("RUNNING"),
+
+ CANCELED("CANCELED");
+
+ private String value;
+
+ Status(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static Status fromValue(String value) {
+ for (Status b : Status.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnStatus.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnStatus.java
new file mode 100644
index 0000000..a1345fe
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnStatus.java
@@ -0,0 +1,58 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Indicates status of the tax registration number.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum TrnStatus {
+
+ VALID("VALID"),
+
+ INVALID("INVALID"),
+
+ UNKNOWN("UNKNOWN");
+
+ private String value;
+
+ TrnStatus(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TrnStatus fromValue(String value) {
+ for (TrnStatus b : TrnStatus.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnType.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnType.java
new file mode 100644
index 0000000..a9125fb
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnType.java
@@ -0,0 +1,64 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+
+/**
+ * Indicates the type of the tax registration number.
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public enum TrnType {
+
+ INDIVIDUAL("INDIVIDUAL"),
+
+ BUSINESS("BUSINESS"),
+
+ GST("GST"),
+
+ VAT("VAT"),
+
+ ENTITY("ENTITY"),
+
+ UNKNOWN("UNKNOWN");
+
+ private String value;
+
+ TrnType(String value) {
+ this.value = value;
+ }
+
+ @JsonValue
+ public String getValue() {
+ return value;
+ }
+
+ @Override
+ public String toString() {
+ return String.valueOf(value);
+ }
+
+ @JsonCreator
+ public static TrnType fromValue(String value) {
+ for (TrnType b : TrnType.values()) {
+ if (b.value.equals(value)) {
+ return b;
+ }
+ }
+ throw new IllegalArgumentException("Unexpected value '" + value + "'");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchDeleteResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchDeleteResponse.java
new file mode 100644
index 0000000..e982291
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchDeleteResponse.java
@@ -0,0 +1,118 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * TrnValidateBatchDeleteResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateBatchDeleteResponse {
+
+ private String batchId;
+
+ private String message;
+
+ public TrnValidateBatchDeleteResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateBatchDeleteResponse(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public TrnValidateBatchDeleteResponse batchId(String batchId) {
+ this.batchId = batchId;
+ return this;
+ }
+
+ /**
+ * Id of the batch request
+ * @return batchId
+ */
+ @NotNull
+ @Schema(name = "batchId", description = "Id of the batch request", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("batchId")
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public TrnValidateBatchDeleteResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Message about deleting of batch request
+ * @return message
+ */
+
+ @Schema(name = "message", description = "Message about deleting of batch request", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateBatchDeleteResponse trnValidateBatchDeleteResponse = (TrnValidateBatchDeleteResponse) o;
+ return Objects.equals(this.batchId, trnValidateBatchDeleteResponse.batchId) &&
+ Objects.equals(this.message, trnValidateBatchDeleteResponse.message);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchId, message);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateBatchDeleteResponse {\n");
+ sb.append(" batchId: ").append(toIndentedString(batchId)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchRequest.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchRequest.java
new file mode 100644
index 0000000..7d2a0fc
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchRequest.java
@@ -0,0 +1,155 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.TrnValidateRequest;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * TrnValidateBatchRequest
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateBatchRequest {
+
+ private String batchName;
+
+ private String externalId;
+
+ @Valid
+ private List<@Valid TrnValidateRequest> trns = new ArrayList<>();
+
+ public TrnValidateBatchRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateBatchRequest(List<@Valid TrnValidateRequest> trns) {
+ this.trns = trns;
+ }
+
+ public TrnValidateBatchRequest batchName(String batchName) {
+ this.batchName = batchName;
+ return this;
+ }
+
+ /**
+ * Name of the batch
+ * @return batchName
+ */
+
+ @Schema(name = "batchName", description = "Name of the batch", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("batchName")
+ public String getBatchName() {
+ return batchName;
+ }
+
+ public void setBatchName(String batchName) {
+ this.batchName = batchName;
+ }
+
+ public TrnValidateBatchRequest externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * Way to relate the request for future reference. Hold the reference value passed in request, expecting the same would be returned in response.
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "Way to relate the request for future reference. Hold the reference value passed in request, expecting the same would be returned in response.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ public TrnValidateBatchRequest trns(List<@Valid TrnValidateRequest> trns) {
+ this.trns = trns;
+ return this;
+ }
+
+ public TrnValidateBatchRequest addTrnsItem(TrnValidateRequest trnsItem) {
+ if (this.trns == null) {
+ this.trns = new ArrayList<>();
+ }
+ this.trns.add(trnsItem);
+ return this;
+ }
+
+ /**
+ * List of tax registration numbers
+ * @return trns
+ */
+ @NotNull @Valid
+ @Schema(name = "trns", description = "List of tax registration numbers", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("trns")
+ public List<@Valid TrnValidateRequest> getTrns() {
+ return trns;
+ }
+
+ public void setTrns(List<@Valid TrnValidateRequest> trns) {
+ this.trns = trns;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateBatchRequest trnValidateBatchRequest = (TrnValidateBatchRequest) o;
+ return Objects.equals(this.batchName, trnValidateBatchRequest.batchName) &&
+ Objects.equals(this.externalId, trnValidateBatchRequest.externalId) &&
+ Objects.equals(this.trns, trnValidateBatchRequest.trns);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchName, externalId, trns);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateBatchRequest {\n");
+ sb.append(" batchName: ").append(toIndentedString(batchName)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append(" trns: ").append(toIndentedString(trns)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchResponse.java
new file mode 100644
index 0000000..eabf105
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateBatchResponse.java
@@ -0,0 +1,281 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.Status;
+import com.example.model.openapitrnyml.TrnValidateResponse;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * TrnValidateBatchResponse
+ */
+
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateBatchResponse {
+
+ private String batchId;
+
+ private String batchName;
+
+ private Status status;
+
+ private Integer limit;
+
+ private Integer offset;
+
+ private Integer completionPercentage;
+
+ private String externalId;
+
+ @Valid
+ private List<@Valid TrnValidateResponse> trns = new ArrayList<>();
+
+ public TrnValidateBatchResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateBatchResponse(String batchId, Status status, Integer limit, Integer offset, List<@Valid TrnValidateResponse> trns) {
+ this.batchId = batchId;
+ this.status = status;
+ this.limit = limit;
+ this.offset = offset;
+ this.trns = trns;
+ }
+
+ public TrnValidateBatchResponse batchId(String batchId) {
+ this.batchId = batchId;
+ return this;
+ }
+
+ /**
+ * Id of the batch request.
+ * @return batchId
+ */
+ @NotNull
+ @Schema(name = "batchId", description = "Id of the batch request.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("batchId")
+ public String getBatchId() {
+ return batchId;
+ }
+
+ public void setBatchId(String batchId) {
+ this.batchId = batchId;
+ }
+
+ public TrnValidateBatchResponse batchName(String batchName) {
+ this.batchName = batchName;
+ return this;
+ }
+
+ /**
+ * Name of the batch request.
+ * @return batchName
+ */
+
+ @Schema(name = "batchName", description = "Name of the batch request.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("batchName")
+ public String getBatchName() {
+ return batchName;
+ }
+
+ public void setBatchName(String batchName) {
+ this.batchName = batchName;
+ }
+
+ public TrnValidateBatchResponse status(Status status) {
+ this.status = status;
+ return this;
+ }
+
+ /**
+ * Get status
+ * @return status
+ */
+ @NotNull @Valid
+ @Schema(name = "status", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("status")
+ public Status getStatus() {
+ return status;
+ }
+
+ public void setStatus(Status status) {
+ this.status = status;
+ }
+
+ public TrnValidateBatchResponse limit(Integer limit) {
+ this.limit = limit;
+ return this;
+ }
+
+ /**
+ * Use for the pagination for batch request, limit indicates the maximum number of records to be returned in the response.
+ * @return limit
+ */
+ @NotNull
+ @Schema(name = "limit", description = "Use for the pagination for batch request, limit indicates the maximum number of records to be returned in the response.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("limit")
+ public Integer getLimit() {
+ return limit;
+ }
+
+ public void setLimit(Integer limit) {
+ this.limit = limit;
+ }
+
+ public TrnValidateBatchResponse offset(Integer offset) {
+ this.offset = offset;
+ return this;
+ }
+
+ /**
+ * Use for the pagination for batch request, offset indicates the starting point of records to be returned in the response.
+ * @return offset
+ */
+ @NotNull
+ @Schema(name = "offset", description = "Use for the pagination for batch request, offset indicates the starting point of records to be returned in the response.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("offset")
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public void setOffset(Integer offset) {
+ this.offset = offset;
+ }
+
+ public TrnValidateBatchResponse completionPercentage(Integer completionPercentage) {
+ this.completionPercentage = completionPercentage;
+ return this;
+ }
+
+ /**
+ * Percentage of batch request processing.
+ * @return completionPercentage
+ */
+
+ @Schema(name = "completionPercentage", description = "Percentage of batch request processing.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("completionPercentage")
+ public Integer getCompletionPercentage() {
+ return completionPercentage;
+ }
+
+ public void setCompletionPercentage(Integer completionPercentage) {
+ this.completionPercentage = completionPercentage;
+ }
+
+ public TrnValidateBatchResponse externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * The externalId passed in request.
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "The externalId passed in request.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ public TrnValidateBatchResponse trns(List<@Valid TrnValidateResponse> trns) {
+ this.trns = trns;
+ return this;
+ }
+
+ public TrnValidateBatchResponse addTrnsItem(TrnValidateResponse trnsItem) {
+ if (this.trns == null) {
+ this.trns = new ArrayList<>();
+ }
+ this.trns.add(trnsItem);
+ return this;
+ }
+
+ /**
+ * List of tax registration numbers
+ * @return trns
+ */
+ @NotNull @Valid
+ @Schema(name = "trns", description = "List of tax registration numbers", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("trns")
+ public List<@Valid TrnValidateResponse> getTrns() {
+ return trns;
+ }
+
+ public void setTrns(List<@Valid TrnValidateResponse> trns) {
+ this.trns = trns;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateBatchResponse trnValidateBatchResponse = (TrnValidateBatchResponse) o;
+ return Objects.equals(this.batchId, trnValidateBatchResponse.batchId) &&
+ Objects.equals(this.batchName, trnValidateBatchResponse.batchName) &&
+ Objects.equals(this.status, trnValidateBatchResponse.status) &&
+ Objects.equals(this.limit, trnValidateBatchResponse.limit) &&
+ Objects.equals(this.offset, trnValidateBatchResponse.offset) &&
+ Objects.equals(this.completionPercentage, trnValidateBatchResponse.completionPercentage) &&
+ Objects.equals(this.externalId, trnValidateBatchResponse.externalId) &&
+ Objects.equals(this.trns, trnValidateBatchResponse.trns);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(batchId, batchName, status, limit, offset, completionPercentage, externalId, trns);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateBatchResponse {\n");
+ sb.append(" batchId: ").append(toIndentedString(batchId)).append("\n");
+ sb.append(" batchName: ").append(toIndentedString(batchName)).append("\n");
+ sb.append(" status: ").append(toIndentedString(status)).append("\n");
+ sb.append(" limit: ").append(toIndentedString(limit)).append("\n");
+ sb.append(" offset: ").append(toIndentedString(offset)).append("\n");
+ sb.append(" completionPercentage: ").append(toIndentedString(completionPercentage)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append(" trns: ").append(toIndentedString(trns)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponse.java
new file mode 100644
index 0000000..62dcf49
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponse.java
@@ -0,0 +1,108 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.TrnValidateErrorResponseErrorsInner;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import java.util.ArrayList;
+import java.util.Arrays;
+import java.util.List;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Defined the structure for validation error of tax registration number validation.
+ */
+
+@Schema(name = "TrnValidateErrorResponse", description = "Defined the structure for validation error of tax registration number validation.")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateErrorResponse {
+
+ @Valid
+ private List<@Valid TrnValidateErrorResponseErrorsInner> errors = new ArrayList<>();
+
+ public TrnValidateErrorResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateErrorResponse(List<@Valid TrnValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ public TrnValidateErrorResponse errors(List<@Valid TrnValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ return this;
+ }
+
+ public TrnValidateErrorResponse addErrorsItem(TrnValidateErrorResponseErrorsInner errorsItem) {
+ if (this.errors == null) {
+ this.errors = new ArrayList<>();
+ }
+ this.errors.add(errorsItem);
+ return this;
+ }
+
+ /**
+ * Get errors
+ * @return errors
+ */
+ @NotNull @Valid
+ @Schema(name = "errors", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("errors")
+ public List<@Valid TrnValidateErrorResponseErrorsInner> getErrors() {
+ return errors;
+ }
+
+ public void setErrors(List<@Valid TrnValidateErrorResponseErrorsInner> errors) {
+ this.errors = errors;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateErrorResponse trnValidateErrorResponse = (TrnValidateErrorResponse) o;
+ return Objects.equals(this.errors, trnValidateErrorResponse.errors);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(errors);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateErrorResponse {\n");
+ sb.append(" errors: ").append(toIndentedString(errors)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponseErrorsInner.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponseErrorsInner.java
new file mode 100644
index 0000000..a78a537
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateErrorResponseErrorsInner.java
@@ -0,0 +1,171 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.ErrorCode;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonTypeName;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * TrnValidateErrorResponseErrorsInner
+ */
+
+@JsonTypeName("TrnValidateErrorResponse_errors_inner")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateErrorResponseErrorsInner {
+
+ private String field;
+
+ private ErrorCode code;
+
+ private String message;
+
+ private String helpUrl;
+
+ public TrnValidateErrorResponseErrorsInner() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateErrorResponseErrorsInner(ErrorCode code, String message) {
+ this.code = code;
+ this.message = message;
+ }
+
+ public TrnValidateErrorResponseErrorsInner field(String field) {
+ this.field = field;
+ return this;
+ }
+
+ /**
+ * The field of an entity that has the invalid value.
+ * @return field
+ */
+ @Size(max = 250)
+ @Schema(name = "field", example = "trn", description = "The field of an entity that has the invalid value.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("field")
+ public String getField() {
+ return field;
+ }
+
+ public void setField(String field) {
+ this.field = field;
+ }
+
+ public TrnValidateErrorResponseErrorsInner code(ErrorCode code) {
+ this.code = code;
+ return this;
+ }
+
+ /**
+ * Get code
+ * @return code
+ */
+ @NotNull @Valid
+ @Schema(name = "code", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("code")
+ public ErrorCode getCode() {
+ return code;
+ }
+
+ public void setCode(ErrorCode code) {
+ this.code = code;
+ }
+
+ public TrnValidateErrorResponseErrorsInner message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * A short message describing the reason for the error.
+ * @return message
+ */
+ @NotNull @Size(max = 250)
+ @Schema(name = "message", example = "Tax registration number is missing.", description = "A short message describing the reason for the error.", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ public TrnValidateErrorResponseErrorsInner helpUrl(String helpUrl) {
+ this.helpUrl = helpUrl;
+ return this;
+ }
+
+ /**
+ * The link to the documentation for more information about the error and the corrective action.
+ * @return helpUrl
+ */
+
+ @Schema(name = "helpUrl", example = "https://apidocs.chargebee.com#Authentication", description = "The link to the documentation for more information about the error and the corrective action.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("helpUrl")
+ public String getHelpUrl() {
+ return helpUrl;
+ }
+
+ public void setHelpUrl(String helpUrl) {
+ this.helpUrl = helpUrl;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateErrorResponseErrorsInner trnValidateErrorResponseErrorsInner = (TrnValidateErrorResponseErrorsInner) o;
+ return Objects.equals(this.field, trnValidateErrorResponseErrorsInner.field) &&
+ Objects.equals(this.code, trnValidateErrorResponseErrorsInner.code) &&
+ Objects.equals(this.message, trnValidateErrorResponseErrorsInner.message) &&
+ Objects.equals(this.helpUrl, trnValidateErrorResponseErrorsInner.helpUrl);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(field, code, message, helpUrl);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateErrorResponseErrorsInner {\n");
+ sb.append(" field: ").append(toIndentedString(field)).append("\n");
+ sb.append(" code: ").append(toIndentedString(code)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append(" helpUrl: ").append(toIndentedString(helpUrl)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateRequest.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateRequest.java
new file mode 100644
index 0000000..62609ce
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateRequest.java
@@ -0,0 +1,267 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.Country;
+import com.example.model.openapitrnyml.TrnType;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains the required properties for tax registration number validation request
+ */
+
+@Schema(name = "TrnValidateRequest", description = "Contains the required properties for tax registration number validation request")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateRequest {
+
+ private String trn;
+
+ private Country country;
+
+ private TrnType trnType;
+
+ private String name;
+
+ private String validOn;
+
+ private String requesterTrn;
+
+ private String taxOfficeCode;
+
+ private String externalId;
+
+ public TrnValidateRequest() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateRequest(String trn, Country country) {
+ this.trn = trn;
+ this.country = country;
+ }
+
+ public TrnValidateRequest trn(String trn) {
+ this.trn = trn;
+ return this;
+ }
+
+ /**
+ * Tax registration number
+ * @return trn
+ */
+ @NotNull
+ @Schema(name = "trn", description = "Tax registration number", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("trn")
+ public String getTrn() {
+ return trn;
+ }
+
+ public void setTrn(String trn) {
+ this.trn = trn;
+ }
+
+ public TrnValidateRequest country(Country country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get country
+ * @return country
+ */
+ @NotNull @Valid
+ @Schema(name = "country", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("country")
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
+
+ public TrnValidateRequest trnType(TrnType trnType) {
+ this.trnType = trnType;
+ return this;
+ }
+
+ /**
+ * Get trnType
+ * @return trnType
+ */
+ @Valid
+ @Schema(name = "trnType", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("trnType")
+ public TrnType getTrnType() {
+ return trnType;
+ }
+
+ public void setTrnType(TrnType trnType) {
+ this.trnType = trnType;
+ }
+
+ public TrnValidateRequest name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the tag registration number owner
+ * @return name
+ */
+
+ @Schema(name = "name", description = "Name of the tag registration number owner", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public TrnValidateRequest validOn(String validOn) {
+ this.validOn = validOn;
+ return this;
+ }
+
+ /**
+ * Validate tax registration number on given date
+ * @return validOn
+ */
+
+ @Schema(name = "validOn", description = "Validate tax registration number on given date", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("validOn")
+ public String getValidOn() {
+ return validOn;
+ }
+
+ public void setValidOn(String validOn) {
+ this.validOn = validOn;
+ }
+
+ public TrnValidateRequest requesterTrn(String requesterTrn) {
+ this.requesterTrn = requesterTrn;
+ return this;
+ }
+
+ /**
+ * Tax registration number of the entity or person who is requesting validation
+ * @return requesterTrn
+ */
+
+ @Schema(name = "requesterTrn", description = "Tax registration number of the entity or person who is requesting validation", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("requesterTrn")
+ public String getRequesterTrn() {
+ return requesterTrn;
+ }
+
+ public void setRequesterTrn(String requesterTrn) {
+ this.requesterTrn = requesterTrn;
+ }
+
+ public TrnValidateRequest taxOfficeCode(String taxOfficeCode) {
+ this.taxOfficeCode = taxOfficeCode;
+ return this;
+ }
+
+ /**
+ * Code of the tax office, some country need it to validate tax registration number
+ * @return taxOfficeCode
+ */
+
+ @Schema(name = "taxOfficeCode", description = "Code of the tax office, some country need it to validate tax registration number", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("taxOfficeCode")
+ public String getTaxOfficeCode() {
+ return taxOfficeCode;
+ }
+
+ public void setTaxOfficeCode(String taxOfficeCode) {
+ this.taxOfficeCode = taxOfficeCode;
+ }
+
+ public TrnValidateRequest externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * Way to relate the request and response, if passed then the same value should be returned in response
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "Way to relate the request and response, if passed then the same value should be returned in response", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateRequest trnValidateRequest = (TrnValidateRequest) o;
+ return Objects.equals(this.trn, trnValidateRequest.trn) &&
+ Objects.equals(this.country, trnValidateRequest.country) &&
+ Objects.equals(this.trnType, trnValidateRequest.trnType) &&
+ Objects.equals(this.name, trnValidateRequest.name) &&
+ Objects.equals(this.validOn, trnValidateRequest.validOn) &&
+ Objects.equals(this.requesterTrn, trnValidateRequest.requesterTrn) &&
+ Objects.equals(this.taxOfficeCode, trnValidateRequest.taxOfficeCode) &&
+ Objects.equals(this.externalId, trnValidateRequest.externalId);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(trn, country, trnType, name, validOn, requesterTrn, taxOfficeCode, externalId);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateRequest {\n");
+ sb.append(" trn: ").append(toIndentedString(trn)).append("\n");
+ sb.append(" country: ").append(toIndentedString(country)).append("\n");
+ sb.append(" trnType: ").append(toIndentedString(trnType)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" validOn: ").append(toIndentedString(validOn)).append("\n");
+ sb.append(" requesterTrn: ").append(toIndentedString(requesterTrn)).append("\n");
+ sb.append(" taxOfficeCode: ").append(toIndentedString(taxOfficeCode)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+
diff --git a/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateResponse.java b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateResponse.java
new file mode 100644
index 0000000..b6c9130
--- /dev/null
+++ b/springproject/generated-openapi_trn.yml/src/main/java/com/example/model/openapitrnyml/TrnValidateResponse.java
@@ -0,0 +1,364 @@
+package com.example.model.openapitrnyml;
+
+import java.net.URI;
+import java.util.Objects;
+import com.example.model.openapitrnyml.BusinessStatus;
+import com.example.model.openapitrnyml.Country;
+import com.example.model.openapitrnyml.TrnStatus;
+import com.fasterxml.jackson.annotation.JsonProperty;
+import com.fasterxml.jackson.annotation.JsonCreator;
+import com.fasterxml.jackson.annotation.JsonValue;
+import org.openapitools.jackson.nullable.JsonNullable;
+import java.time.OffsetDateTime;
+import javax.validation.Valid;
+import javax.validation.constraints.*;
+import io.swagger.v3.oas.annotations.media.Schema;
+
+
+import java.util.*;
+import javax.annotation.Generated;
+
+/**
+ * Contains the required properties for tax registration number validation response
+ */
+
+@Schema(name = "TrnValidateResponse", description = "Contains the required properties for tax registration number validation response")
+@Generated(value = "org.openapitools.codegen.languages.SpringCodegen", date = "2024-10-01T11:22:40.630770+05:30[Asia/Kolkata]")
+public class TrnValidateResponse {
+
+ private String requestId;
+
+ private String trn;
+
+ private Country country;
+
+ private String name;
+
+ private String address;
+
+ private TrnStatus trnStatus;
+
+ private Boolean isBusiness;
+
+ private Boolean isRegistered;
+
+ private BusinessStatus businessStatus;
+
+ private String validationDataSource;
+
+ private String externalId;
+
+ private String message;
+
+ public TrnValidateResponse() {
+ super();
+ }
+
+ /**
+ * Constructor with only required parameters
+ */
+ public TrnValidateResponse(String trn, Country country) {
+ this.trn = trn;
+ this.country = country;
+ }
+
+ public TrnValidateResponse requestId(String requestId) {
+ this.requestId = requestId;
+ return this;
+ }
+
+ /**
+ * Unique id of the request, this is to refer later to fetch the response.
+ * @return requestId
+ */
+
+ @Schema(name = "requestId", description = "Unique id of the request, this is to refer later to fetch the response.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("requestId")
+ public String getRequestId() {
+ return requestId;
+ }
+
+ public void setRequestId(String requestId) {
+ this.requestId = requestId;
+ }
+
+ public TrnValidateResponse trn(String trn) {
+ this.trn = trn;
+ return this;
+ }
+
+ /**
+ * Tax registration number
+ * @return trn
+ */
+ @NotNull
+ @Schema(name = "trn", description = "Tax registration number", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("trn")
+ public String getTrn() {
+ return trn;
+ }
+
+ public void setTrn(String trn) {
+ this.trn = trn;
+ }
+
+ public TrnValidateResponse country(Country country) {
+ this.country = country;
+ return this;
+ }
+
+ /**
+ * Get country
+ * @return country
+ */
+ @NotNull @Valid
+ @Schema(name = "country", requiredMode = Schema.RequiredMode.REQUIRED)
+ @JsonProperty("country")
+ public Country getCountry() {
+ return country;
+ }
+
+ public void setCountry(Country country) {
+ this.country = country;
+ }
+
+ public TrnValidateResponse name(String name) {
+ this.name = name;
+ return this;
+ }
+
+ /**
+ * Name of the entity(may be an individual or a business company) who owns the tax registration number
+ * @return name
+ */
+
+ @Schema(name = "name", description = "Name of the entity(may be an individual or a business company) who owns the tax registration number", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("name")
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public TrnValidateResponse address(String address) {
+ this.address = address;
+ return this;
+ }
+
+ /**
+ * Address of the entity(may be an individual or a business company) who owns the tax registration number
+ * @return address
+ */
+
+ @Schema(name = "address", description = "Address of the entity(may be an individual or a business company) who owns the tax registration number", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("address")
+ public String getAddress() {
+ return address;
+ }
+
+ public void setAddress(String address) {
+ this.address = address;
+ }
+
+ public TrnValidateResponse trnStatus(TrnStatus trnStatus) {
+ this.trnStatus = trnStatus;
+ return this;
+ }
+
+ /**
+ * Get trnStatus
+ * @return trnStatus
+ */
+ @Valid
+ @Schema(name = "trnStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("trnStatus")
+ public TrnStatus getTrnStatus() {
+ return trnStatus;
+ }
+
+ public void setTrnStatus(TrnStatus trnStatus) {
+ this.trnStatus = trnStatus;
+ }
+
+ public TrnValidateResponse isBusiness(Boolean isBusiness) {
+ this.isBusiness = isBusiness;
+ return this;
+ }
+
+ /**
+ * Indicates that tax registration number belong to a business entity or not.
+ * @return isBusiness
+ */
+
+ @Schema(name = "isBusiness", description = "Indicates that tax registration number belong to a business entity or not.", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("isBusiness")
+ public Boolean getIsBusiness() {
+ return isBusiness;
+ }
+
+ public void setIsBusiness(Boolean isBusiness) {
+ this.isBusiness = isBusiness;
+ }
+
+ public TrnValidateResponse isRegistered(Boolean isRegistered) {
+ this.isRegistered = isRegistered;
+ return this;
+ }
+
+ /**
+ * Indicates that tax registration number is registered or not
+ * @return isRegistered
+ */
+
+ @Schema(name = "isRegistered", description = "Indicates that tax registration number is registered or not", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("isRegistered")
+ public Boolean getIsRegistered() {
+ return isRegistered;
+ }
+
+ public void setIsRegistered(Boolean isRegistered) {
+ this.isRegistered = isRegistered;
+ }
+
+ public TrnValidateResponse businessStatus(BusinessStatus businessStatus) {
+ this.businessStatus = businessStatus;
+ return this;
+ }
+
+ /**
+ * Get businessStatus
+ * @return businessStatus
+ */
+ @Valid
+ @Schema(name = "businessStatus", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("businessStatus")
+ public BusinessStatus getBusinessStatus() {
+ return businessStatus;
+ }
+
+ public void setBusinessStatus(BusinessStatus businessStatus) {
+ this.businessStatus = businessStatus;
+ }
+
+ public TrnValidateResponse validationDataSource(String validationDataSource) {
+ this.validationDataSource = validationDataSource;
+ return this;
+ }
+
+ /**
+ * Indicates name of the source of tax registration number validation (like database, vies)
+ * @return validationDataSource
+ */
+
+ @Schema(name = "validationDataSource", description = "Indicates name of the source of tax registration number validation (like database, vies)", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("validationDataSource")
+ public String getValidationDataSource() {
+ return validationDataSource;
+ }
+
+ public void setValidationDataSource(String validationDataSource) {
+ this.validationDataSource = validationDataSource;
+ }
+
+ public TrnValidateResponse externalId(String externalId) {
+ this.externalId = externalId;
+ return this;
+ }
+
+ /**
+ * The externalId passed in the request
+ * @return externalId
+ */
+
+ @Schema(name = "externalId", description = "The externalId passed in the request", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("externalId")
+ public String getExternalId() {
+ return externalId;
+ }
+
+ public void setExternalId(String externalId) {
+ this.externalId = externalId;
+ }
+
+ public TrnValidateResponse message(String message) {
+ this.message = message;
+ return this;
+ }
+
+ /**
+ * Any message about tax registration number validation request
+ * @return message
+ */
+
+ @Schema(name = "message", description = "Any message about tax registration number validation request", requiredMode = Schema.RequiredMode.NOT_REQUIRED)
+ @JsonProperty("message")
+ public String getMessage() {
+ return message;
+ }
+
+ public void setMessage(String message) {
+ this.message = message;
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+ TrnValidateResponse trnValidateResponse = (TrnValidateResponse) o;
+ return Objects.equals(this.requestId, trnValidateResponse.requestId) &&
+ Objects.equals(this.trn, trnValidateResponse.trn) &&
+ Objects.equals(this.country, trnValidateResponse.country) &&
+ Objects.equals(this.name, trnValidateResponse.name) &&
+ Objects.equals(this.address, trnValidateResponse.address) &&
+ Objects.equals(this.trnStatus, trnValidateResponse.trnStatus) &&
+ Objects.equals(this.isBusiness, trnValidateResponse.isBusiness) &&
+ Objects.equals(this.isRegistered, trnValidateResponse.isRegistered) &&
+ Objects.equals(this.businessStatus, trnValidateResponse.businessStatus) &&
+ Objects.equals(this.validationDataSource, trnValidateResponse.validationDataSource) &&
+ Objects.equals(this.externalId, trnValidateResponse.externalId) &&
+ Objects.equals(this.message, trnValidateResponse.message);
+ }
+
+ @Override
+ public int hashCode() {
+ return Objects.hash(requestId, trn, country, name, address, trnStatus, isBusiness, isRegistered, businessStatus, validationDataSource, externalId, message);
+ }
+
+ @Override
+ public String toString() {
+ StringBuilder sb = new StringBuilder();
+ sb.append("class TrnValidateResponse {\n");
+ sb.append(" requestId: ").append(toIndentedString(requestId)).append("\n");
+ sb.append(" trn: ").append(toIndentedString(trn)).append("\n");
+ sb.append(" country: ").append(toIndentedString(country)).append("\n");
+ sb.append(" name: ").append(toIndentedString(name)).append("\n");
+ sb.append(" address: ").append(toIndentedString(address)).append("\n");
+ sb.append(" trnStatus: ").append(toIndentedString(trnStatus)).append("\n");
+ sb.append(" isBusiness: ").append(toIndentedString(isBusiness)).append("\n");
+ sb.append(" isRegistered: ").append(toIndentedString(isRegistered)).append("\n");
+ sb.append(" businessStatus: ").append(toIndentedString(businessStatus)).append("\n");
+ sb.append(" validationDataSource: ").append(toIndentedString(validationDataSource)).append("\n");
+ sb.append(" externalId: ").append(toIndentedString(externalId)).append("\n");
+ sb.append(" message: ").append(toIndentedString(message)).append("\n");
+ sb.append("}");
+ return sb.toString();
+ }
+
+ /**
+ * Convert the given object to string with each line indented by 4 spaces
+ * (except the first line).
+ */
+ private String toIndentedString(Object o) {
+ if (o == null) {
+ return "null";
+ }
+ return o.toString().replace("\n", "\n ");
+ }
+}
+