title: DynamoDB + Quarkus - Odd type conversion
body: <p>I have a table / entity on DynamoDB that should be mapped with number as fields.</p>
  <p>Example:</p>
  <pre><code>@RegisterForReflection
  Foo {
       Integer myfield;
       ...
  }
  </code></pre>
  <p>I noticed that the AWS SDK used by <em>quarkus-amazon-dynamodb</em> dependency is built in a odd way.</p>
  <p>For example,the n() method of  <em>software.amazon.awssdk.services.dynamodb.model.AttributeValue</em></p>
  <p>return a java <strong>String</strong> instead of a <strong>Number</strong> type, so I have to convert the result with a clumsy <strong>Integer.parseInt()</strong></p>
  <pre><code>public static Foo from(Map&lt;String, AttributeValue&gt; item) {
      final var output = new Foo();
      if (item != null &amp;&amp; !item.isEmpty()) {
          output.setMyField(Integer.parseInt(item.get(MY_FIELD).n()));
      }
      return output;
  }
  </code></pre>
  <p>The same happens if I have to fetch an item and use</p>
  <p><strong>AttributeValue.builder().n()</strong></p>
  <pre><code>final Map&lt;String, AttributeValue&gt; key = new HashMap&lt;&gt;();
      key.put(Foo.MY_FIELD, AttributeValue.builder().n(input.toString()).build()); // too bad!!
  
      return GetItemRequest.builder()
              .tableName(TABLE_NAME)
              .key(key)
              .attributesToGet(Foo.MY_FIELD)
              .build();
  </code></pre>
  <p>Do I miss something ?</p>
  <p><strong>PS</strong></p>
  <p>The Quarkus dynamoDB documentation is <a href="https://quarkus.io/guides/amazon-dynamodb" rel="nofollow noreferrer">here</a></p>