Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-25 11:57:20.882330",
"spec_repo_commit": "80b43a3b"
"regenerated": "2024-11-25 17:55:59.723742",
"spec_repo_commit": "3cfd102e"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-11-25 11:57:20.901354",
"spec_repo_commit": "80b43a3b"
"regenerated": "2024-11-25 17:55:59.742591",
"spec_repo_commit": "3cfd102e"
}
}
}
20 changes: 0 additions & 20 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1320,19 +1320,8 @@ components:
AWSNamespaceFilters:
description: AWS Metrics namespace filters
oneOf:
- $ref: '#/components/schemas/AWSNamespaceFiltersExcludeAll'
- $ref: '#/components/schemas/AWSNamespaceFiltersExcludeOnly'
- $ref: '#/components/schemas/AWSNamespaceFiltersIncludeAll'
- $ref: '#/components/schemas/AWSNamespaceFiltersIncludeOnly'
AWSNamespaceFiltersExcludeAll:
description: Exclude all namespaces
properties:
exclude_all:
description: Exclude all namespaces
example: false
type: boolean
required:
- exclude_all
AWSNamespaceFiltersExcludeOnly:
description: Exclude only these namespaces
properties:
Expand All @@ -1346,15 +1335,6 @@ components:
type: array
required:
- exclude_only
AWSNamespaceFiltersIncludeAll:
description: Include all namespaces
properties:
include_all:
description: Include all namespaces
example: false
type: boolean
required:
- include_all
AWSNamespaceFiltersIncludeOnly:
description: Include only these namespaces
properties:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -78,51 +78,6 @@ public AWSNamespaceFilters deserialize(JsonParser jp, DeserializationContext ctx
boolean typeCoercion = ctxt.isEnabled(MapperFeature.ALLOW_COERCION_OF_SCALARS);
int match = 0;
JsonToken token = tree.traverse(jp.getCodec()).nextToken();
// deserialize AWSNamespaceFiltersExcludeAll
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (AWSNamespaceFiltersExcludeAll.class.equals(Integer.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Long.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Float.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Double.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Boolean.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |=
((AWSNamespaceFiltersExcludeAll.class.equals(Integer.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Long.class))
&& token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |=
((AWSNamespaceFiltersExcludeAll.class.equals(Float.class)
|| AWSNamespaceFiltersExcludeAll.class.equals(Double.class))
&& (token == JsonToken.VALUE_NUMBER_FLOAT
|| token == JsonToken.VALUE_NUMBER_INT));
attemptParsing |=
(AWSNamespaceFiltersExcludeAll.class.equals(Boolean.class)
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |=
(AWSNamespaceFiltersExcludeAll.class.equals(String.class)
&& token == JsonToken.VALUE_STRING);
}
}
if (attemptParsing) {
tmp = tree.traverse(jp.getCodec()).readValueAs(AWSNamespaceFiltersExcludeAll.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
if (!((AWSNamespaceFiltersExcludeAll) tmp).unparsed) {
deserialized = tmp;
match++;
}
log.log(Level.FINER, "Input data matches schema 'AWSNamespaceFiltersExcludeAll'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'AWSNamespaceFiltersExcludeAll'", e);
}

// deserialize AWSNamespaceFiltersExcludeOnly
try {
boolean attemptParsing = true;
Expand Down Expand Up @@ -169,51 +124,6 @@ public AWSNamespaceFilters deserialize(JsonParser jp, DeserializationContext ctx
Level.FINER, "Input data does not match schema 'AWSNamespaceFiltersExcludeOnly'", e);
}

// deserialize AWSNamespaceFiltersIncludeAll
try {
boolean attemptParsing = true;
// ensure that we respect type coercion as set on the client ObjectMapper
if (AWSNamespaceFiltersIncludeAll.class.equals(Integer.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Long.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Float.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Double.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Boolean.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(String.class)) {
attemptParsing = typeCoercion;
if (!attemptParsing) {
attemptParsing |=
((AWSNamespaceFiltersIncludeAll.class.equals(Integer.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Long.class))
&& token == JsonToken.VALUE_NUMBER_INT);
attemptParsing |=
((AWSNamespaceFiltersIncludeAll.class.equals(Float.class)
|| AWSNamespaceFiltersIncludeAll.class.equals(Double.class))
&& (token == JsonToken.VALUE_NUMBER_FLOAT
|| token == JsonToken.VALUE_NUMBER_INT));
attemptParsing |=
(AWSNamespaceFiltersIncludeAll.class.equals(Boolean.class)
&& (token == JsonToken.VALUE_FALSE || token == JsonToken.VALUE_TRUE));
attemptParsing |=
(AWSNamespaceFiltersIncludeAll.class.equals(String.class)
&& token == JsonToken.VALUE_STRING);
}
}
if (attemptParsing) {
tmp = tree.traverse(jp.getCodec()).readValueAs(AWSNamespaceFiltersIncludeAll.class);
// TODO: there is no validation against JSON schema constraints
// (min, max, enum, pattern...), this does not perform a strict JSON
// validation, which means the 'match' count may be higher than it should be.
if (!((AWSNamespaceFiltersIncludeAll) tmp).unparsed) {
deserialized = tmp;
match++;
}
log.log(Level.FINER, "Input data matches schema 'AWSNamespaceFiltersIncludeAll'");
}
} catch (Exception e) {
// deserialization failed, continue
log.log(Level.FINER, "Input data does not match schema 'AWSNamespaceFiltersIncludeAll'", e);
}

// deserialize AWSNamespaceFiltersIncludeOnly
try {
boolean attemptParsing = true;
Expand Down Expand Up @@ -289,33 +199,19 @@ public AWSNamespaceFilters() {
super("oneOf", Boolean.FALSE);
}

public AWSNamespaceFilters(AWSNamespaceFiltersExcludeAll o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public AWSNamespaceFilters(AWSNamespaceFiltersExcludeOnly o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public AWSNamespaceFilters(AWSNamespaceFiltersIncludeAll o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

public AWSNamespaceFilters(AWSNamespaceFiltersIncludeOnly o) {
super("oneOf", Boolean.FALSE);
setActualInstance(o);
}

static {
schemas.put(
"AWSNamespaceFiltersExcludeAll", new GenericType<AWSNamespaceFiltersExcludeAll>() {});
schemas.put(
"AWSNamespaceFiltersExcludeOnly", new GenericType<AWSNamespaceFiltersExcludeOnly>() {});
schemas.put(
"AWSNamespaceFiltersIncludeAll", new GenericType<AWSNamespaceFiltersIncludeAll>() {});
schemas.put(
"AWSNamespaceFiltersIncludeOnly", new GenericType<AWSNamespaceFiltersIncludeOnly>() {});
JSON.registerDescendants(AWSNamespaceFilters.class, Collections.unmodifiableMap(schemas));
Expand All @@ -328,27 +224,18 @@ public Map<String, GenericType> getSchemas() {

/**
* Set the instance that matches the oneOf child schema, check the instance parameter is valid
* against the oneOf child schemas: AWSNamespaceFiltersExcludeAll, AWSNamespaceFiltersExcludeOnly,
* AWSNamespaceFiltersIncludeAll, AWSNamespaceFiltersIncludeOnly
* against the oneOf child schemas: AWSNamespaceFiltersExcludeOnly, AWSNamespaceFiltersIncludeOnly
*
* <p>It could be an instance of the 'oneOf' schemas. The oneOf child schemas may themselves be a
* composed schema (allOf, anyOf, oneOf).
*/
@Override
public void setActualInstance(Object instance) {
if (JSON.isInstanceOf(AWSNamespaceFiltersExcludeAll.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(
AWSNamespaceFiltersExcludeOnly.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(AWSNamespaceFiltersIncludeAll.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
return;
}
if (JSON.isInstanceOf(
AWSNamespaceFiltersIncludeOnly.class, instance, new HashSet<Class<?>>())) {
super.setActualInstance(instance);
Expand All @@ -360,35 +247,21 @@ public void setActualInstance(Object instance) {
return;
}
throw new RuntimeException(
"Invalid instance type. Must be AWSNamespaceFiltersExcludeAll,"
+ " AWSNamespaceFiltersExcludeOnly, AWSNamespaceFiltersIncludeAll,"
"Invalid instance type. Must be AWSNamespaceFiltersExcludeOnly,"
+ " AWSNamespaceFiltersIncludeOnly");
}

/**
* Get the actual instance, which can be the following: AWSNamespaceFiltersExcludeAll,
* AWSNamespaceFiltersExcludeOnly, AWSNamespaceFiltersIncludeAll, AWSNamespaceFiltersIncludeOnly
* Get the actual instance, which can be the following: AWSNamespaceFiltersExcludeOnly,
* AWSNamespaceFiltersIncludeOnly
*
* @return The actual instance (AWSNamespaceFiltersExcludeAll, AWSNamespaceFiltersExcludeOnly,
* AWSNamespaceFiltersIncludeAll, AWSNamespaceFiltersIncludeOnly)
* @return The actual instance (AWSNamespaceFiltersExcludeOnly, AWSNamespaceFiltersIncludeOnly)
*/
@Override
public Object getActualInstance() {
return super.getActualInstance();
}

/**
* Get the actual instance of `AWSNamespaceFiltersExcludeAll`. If the actual instance is not
* `AWSNamespaceFiltersExcludeAll`, the ClassCastException will be thrown.
*
* @return The actual instance of `AWSNamespaceFiltersExcludeAll`
* @throws ClassCastException if the instance is not `AWSNamespaceFiltersExcludeAll`
*/
public AWSNamespaceFiltersExcludeAll getAWSNamespaceFiltersExcludeAll()
throws ClassCastException {
return (AWSNamespaceFiltersExcludeAll) super.getActualInstance();
}

/**
* Get the actual instance of `AWSNamespaceFiltersExcludeOnly`. If the actual instance is not
* `AWSNamespaceFiltersExcludeOnly`, the ClassCastException will be thrown.
Expand All @@ -401,18 +274,6 @@ public AWSNamespaceFiltersExcludeOnly getAWSNamespaceFiltersExcludeOnly()
return (AWSNamespaceFiltersExcludeOnly) super.getActualInstance();
}

/**
* Get the actual instance of `AWSNamespaceFiltersIncludeAll`. If the actual instance is not
* `AWSNamespaceFiltersIncludeAll`, the ClassCastException will be thrown.
*
* @return The actual instance of `AWSNamespaceFiltersIncludeAll`
* @throws ClassCastException if the instance is not `AWSNamespaceFiltersIncludeAll`
*/
public AWSNamespaceFiltersIncludeAll getAWSNamespaceFiltersIncludeAll()
throws ClassCastException {
return (AWSNamespaceFiltersIncludeAll) super.getActualInstance();
}

/**
* Get the actual instance of `AWSNamespaceFiltersIncludeOnly`. If the actual instance is not
* `AWSNamespaceFiltersIncludeOnly`, the ClassCastException will be thrown.
Expand Down
Loading