diff --git a/.codegen.json b/.codegen.json index 9bdf1a7fb..ec2ced9a1 100644 --- a/.codegen.json +++ b/.codegen.json @@ -1 +1 @@ -{ "engineHash": "c370934", "specHash": "a4bdc72", "version": "5.2.0" } +{ "engineHash": "c370934", "specHash": "f3c7c76", "version": "5.2.0" } diff --git a/docs/sdkgen/metadatataxonomies.md b/docs/sdkgen/metadatataxonomies.md index 0fd8d56eb..870aef039 100644 --- a/docs/sdkgen/metadatataxonomies.md +++ b/docs/sdkgen/metadatataxonomies.md @@ -492,8 +492,8 @@ See the endpoint docs at ### Arguments -- scope `GetMetadataTemplateFieldOptionsScope` - - The scope of the metadata template. Example: "global" +- namespace `String` + - The namespace of the metadata taxonomy. Example: "enterprise_123456" - templateKey `String` - The name of the metadata template. Example: "properties" - fieldKey `String` diff --git a/src/main/java/com/box/sdkgen/managers/metadatataxonomies/GetMetadataTemplateFieldOptionsScope.java b/src/main/java/com/box/sdkgen/managers/metadatataxonomies/GetMetadataTemplateFieldOptionsScope.java deleted file mode 100644 index 1e6b3e0f8..000000000 --- a/src/main/java/com/box/sdkgen/managers/metadatataxonomies/GetMetadataTemplateFieldOptionsScope.java +++ /dev/null @@ -1,63 +0,0 @@ -package com.box.sdkgen.managers.metadatataxonomies; - -import com.box.sdkgen.serialization.json.EnumWrapper; -import com.box.sdkgen.serialization.json.Valuable; -import com.fasterxml.jackson.core.JsonGenerator; -import com.fasterxml.jackson.core.JsonParser; -import com.fasterxml.jackson.databind.DeserializationContext; -import com.fasterxml.jackson.databind.JsonDeserializer; -import com.fasterxml.jackson.databind.JsonSerializer; -import com.fasterxml.jackson.databind.SerializerProvider; -import java.io.IOException; -import java.util.Arrays; - -public enum GetMetadataTemplateFieldOptionsScope implements Valuable { - GLOBAL("global"), - ENTERPRISE("enterprise"); - - private final String value; - - GetMetadataTemplateFieldOptionsScope(String value) { - this.value = value; - } - - public String getValue() { - return value; - } - - public static class GetMetadataTemplateFieldOptionsScopeDeserializer - extends JsonDeserializer> { - - public GetMetadataTemplateFieldOptionsScopeDeserializer() { - super(); - } - - @Override - public EnumWrapper deserialize( - JsonParser p, DeserializationContext ctxt) throws IOException { - String value = p.getValueAsString(); - return Arrays.stream(GetMetadataTemplateFieldOptionsScope.values()) - .filter((v) -> v.getValue().equalsIgnoreCase(value)) - .findFirst() - .map(EnumWrapper::new) - .orElse(new EnumWrapper(value)); - } - } - - public static class GetMetadataTemplateFieldOptionsScopeSerializer - extends JsonSerializer> { - - public GetMetadataTemplateFieldOptionsScopeSerializer() { - super(); - } - - @Override - public void serialize( - EnumWrapper value, - JsonGenerator gen, - SerializerProvider serializers) - throws IOException { - gen.writeString(value.getStringValue()); - } - } -} diff --git a/src/main/java/com/box/sdkgen/managers/metadatataxonomies/MetadataTaxonomiesManager.java b/src/main/java/com/box/sdkgen/managers/metadatataxonomies/MetadataTaxonomiesManager.java index c4bb657b4..a98ba2cbc 100644 --- a/src/main/java/com/box/sdkgen/managers/metadatataxonomies/MetadataTaxonomiesManager.java +++ b/src/main/java/com/box/sdkgen/managers/metadatataxonomies/MetadataTaxonomiesManager.java @@ -837,14 +837,14 @@ public void deleteMetadataTaxonomyNode( * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in * order of relevance. * - * @param scope The scope of the metadata template. Example: "global" + * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456" * @param templateKey The name of the metadata template. Example: "properties" * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography" */ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( - GetMetadataTemplateFieldOptionsScope scope, String templateKey, String fieldKey) { + String namespace, String templateKey, String fieldKey) { return getMetadataTemplateFieldOptions( - scope, + namespace, templateKey, fieldKey, new GetMetadataTemplateFieldOptionsQueryParams(), @@ -857,18 +857,22 @@ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in * order of relevance. * - * @param scope The scope of the metadata template. Example: "global" + * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456" * @param templateKey The name of the metadata template. Example: "properties" * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography" * @param queryParams Query parameters of getMetadataTemplateFieldOptions method */ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( - GetMetadataTemplateFieldOptionsScope scope, + String namespace, String templateKey, String fieldKey, GetMetadataTemplateFieldOptionsQueryParams queryParams) { return getMetadataTemplateFieldOptions( - scope, templateKey, fieldKey, queryParams, new GetMetadataTemplateFieldOptionsHeaders()); + namespace, + templateKey, + fieldKey, + queryParams, + new GetMetadataTemplateFieldOptionsHeaders()); } /** @@ -877,18 +881,22 @@ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in * order of relevance. * - * @param scope The scope of the metadata template. Example: "global" + * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456" * @param templateKey The name of the metadata template. Example: "properties" * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography" * @param headers Headers of getMetadataTemplateFieldOptions method */ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( - GetMetadataTemplateFieldOptionsScope scope, + String namespace, String templateKey, String fieldKey, GetMetadataTemplateFieldOptionsHeaders headers) { return getMetadataTemplateFieldOptions( - scope, templateKey, fieldKey, new GetMetadataTemplateFieldOptionsQueryParams(), headers); + namespace, + templateKey, + fieldKey, + new GetMetadataTemplateFieldOptionsQueryParams(), + headers); } /** @@ -897,14 +905,14 @@ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( * unless a `query` parameter is passed. With a `query` parameter specified, results are sorted in * order of relevance. * - * @param scope The scope of the metadata template. Example: "global" + * @param namespace The namespace of the metadata taxonomy. Example: "enterprise_123456" * @param templateKey The name of the metadata template. Example: "properties" * @param fieldKey The key of the metadata taxonomy field in the template. Example: "geography" * @param queryParams Query parameters of getMetadataTemplateFieldOptions method * @param headers Headers of getMetadataTemplateFieldOptions method */ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( - GetMetadataTemplateFieldOptionsScope scope, + String namespace, String templateKey, String fieldKey, GetMetadataTemplateFieldOptionsQueryParams queryParams, @@ -934,7 +942,7 @@ public MetadataTaxonomyNodes getMetadataTemplateFieldOptions( "", this.networkSession.getBaseUrls().getBaseUrl(), "/2.0/metadata_templates/", - convertToString(scope), + convertToString(namespace), "/", convertToString(templateKey), "/fields/",