Can't create tags off UdtType using SDK

I'm trying to create a UDT definition using the SDK. Here is a code snippet.

      List<PropertyValue> propertyValues = new ArrayList<>();
        propertyValues.add(new PropertyValue(WellKnownTagProps.TagType, TagObjectType.UdtType));
        BoundPropertySet propertySet = new BasicBoundPropertySet(propertyValues.toArray(new PropertyValue[]{}));

        // Add the root UDT
        String rootPath = TagConstants.UDT_ROOT_PATH.toStringFull() + "/" + udtInfo.model;
        managedTagProvider.configureTag(rootPath, propertySet);

        // Add tags
        for (var attribute : udtInfo.attributes.entrySet()) {
            managedTagProvider.configureTag(rootPath + "/" + attribute.getKey(), DataType.Int8);
        }

After this runs and I go into Designer, I see the UDT and the tag, but opening the tag I see the following.

If I copy the JSON definition I see it as this.

{
  "name": "myModel",
  "tagType": "UdtType",
  "tags": [
    {
      "prg": {
        "dataType": "Int8",
        "name": "atttr"
      },
      "name": "atttr",
      "tagType": "AtomicTag"
    }
  ]
}

I've tried a bunch of different variants configureTag with BoundedPropertySets, different props, etc but all create the "prg". It's not clear to me where this is coming from and I can't find much in the docs on building UDTs from the SDK. Any help would be great. Thanks!

Anything? Here is how I initialize the ProviderConfiguration. setHasDataTypes sets some flag (512) to true in the SDK and controls if types are created at all. Maybe it's something here that I'm missing? I can't find much if any documentation.

ProviderConfiguration providerConfiguration = new ProviderConfiguration(tagProvider);
        providerConfiguration.setAllowTagCustomization(true);
        providerConfiguration.setPersistTags(false);
        providerConfiguration.setPersistValues(false);
        providerConfiguration.setAllowTagDeletion(true);
        providerConfiguration.setHasDataTypes(true);
        ManagedTagProvider managedTagProvider = this.gatewayContext.getTagManager().getOrCreateManagedProvider(providerConfiguration, false);

I think I figured it out. I'm guessing the problem was in using configureTag to create the UDT piece by piece, but I'm not sure. The following API below seemed to do the trick in case anyone else struggles with this.

// Provider settings
  ProviderConfiguration providerConfiguration = new ProviderConfiguration(tagProvider);
                    providerConfiguration.setAllowTagDeletion(true);
                    providerConfiguration.setAllowTagCustomization(true);
                    providerConfiguration.setHasDataTypes(true);
                    providerConfiguration.setPersistTags(false);
                    providerConfiguration.setPersistValues(false);
     ManagedTagProvider managedTagProvider = this.gatewayContext.getTagManager().getOrCreateManagedProvider(providerConfiguration, false);


String rootPath = String.format("[%s]%s/%s", tagProvider.getName(), TagConstants.UDT_ROOT_PATH.toStringFull(), udtInfo.model);
        TagPath tagRootPath = TagPathParser.parse(rootPath);
        TagConfiguration tagConfiguration = BasicTagConfiguration.createNew(tagRootPath);
        tagConfiguration.set(WellKnownTagProps.TagType, TagObjectType.UdtType);


        // Add tags
        for (var attribute : udtInfo.attributes.entrySet()) {
            TagPath attributePath = TagPathParser.parse(attribute.getKey());
            TagConfiguration attrTagConfiguration = BasicTagConfiguration.createNew(attributePath);
            attrTagConfiguration.set(WellKnownTagProps.DataType, attribute.getValue());
            attrTagConfiguration.set(WellKnownTagProps.Enabled, Boolean.valueOf(true));
            tagConfiguration.addChild(attrTagConfiguration);
        }

 // Add the UDT
        var result = tagProvider.saveTagConfigsAsync(Arrays.asList(new TagConfiguration[] {tagConfiguration}), CollisionPolicy.Overwrite).join();

        if (result != null && !result.isEmpty()) {
            if (result.get(0).isBad())
                throw new Exception(result.get(0).getDiagnosticMessage());
        }