diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index 4afc5c00f08..206b8ba1904 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -17294,11 +17294,201 @@ components: schema: $ref: '#/components/schemas/EntityToSchema' type: object + EntityResponseArray: + properties: + data: + items: + $ref: '#/components/schemas/PreviewEntityResponseData' + type: array + required: + - data + type: object EntityResponseData: description: List of entity data. items: $ref: '#/components/schemas/EntityData' type: array + EntityResponseDataAttributes: + properties: + apiVersion: + type: string + description: + type: string + displayName: + type: string + kind: + type: string + name: + type: string + namespace: + type: string + owner: + type: string + properties: + additionalProperties: {} + type: object + tags: + items: + type: string + type: array + type: object + EntityResponseDataRelationships: + properties: + incidents: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidents' + oncalls: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncalls' + rawSchema: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchema' + relatedEntities: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntities' + schema: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchema' + type: object + EntityResponseDataRelationshipsIncidents: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItems' + type: array + type: object + EntityResponseDataRelationshipsIncidentsDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsIncidentsDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsIncidentsDataItemsType: + default: incident + description: Incident resource type. + enum: + - incident + example: incident + type: string + x-enum-varnames: + - INCIDENT + EntityResponseDataRelationshipsOncalls: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItems' + type: array + type: object + EntityResponseDataRelationshipsOncallsDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsOncallsDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsOncallsDataItemsType: + default: oncall + description: Oncall resource type. + enum: + - oncall + example: oncall + type: string + x-enum-varnames: + - ONCALL + EntityResponseDataRelationshipsRawSchema: + properties: + data: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaData' + required: + - data + type: object + EntityResponseDataRelationshipsRawSchemaData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRawSchemaDataType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsRawSchemaDataType: + default: rawSchema + description: Raw schema resource type. + enum: + - rawSchema + example: rawSchema + type: string + x-enum-varnames: + - RAWSCHEMA + EntityResponseDataRelationshipsRelatedEntities: + properties: + data: + items: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItems' + type: array + type: object + EntityResponseDataRelationshipsRelatedEntitiesDataItems: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType: + default: relatedEntity + description: Related entity resource type. + enum: + - relatedEntity + example: relatedEntity + type: string + x-enum-varnames: + - RELATEDENTITY + EntityResponseDataRelationshipsSchema: + properties: + data: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaData' + required: + - data + type: object + EntityResponseDataRelationshipsSchemaData: + properties: + id: + example: '' + type: string + type: + $ref: '#/components/schemas/EntityResponseDataRelationshipsSchemaDataType' + required: + - type + - id + type: object + EntityResponseDataRelationshipsSchemaDataType: + default: schema + description: Schema resource type. + enum: + - schema + example: schema + type: string + x-enum-varnames: + - SCHEMA + EntityResponseDataType: + default: entity + description: Entity resource type. + enum: + - entity + example: entity + type: string + x-enum-varnames: + - ENTITY EntityResponseIncludedIncident: description: Included incident. properties: @@ -37681,6 +37871,19 @@ components: description: Offset type. type: string type: object + PreviewEntityResponseData: + properties: + attributes: + $ref: '#/components/schemas/EntityResponseDataAttributes' + id: + type: string + relationships: + $ref: '#/components/schemas/EntityResponseDataRelationships' + type: + $ref: '#/components/schemas/EntityResponseDataType' + required: + - type + type: object ProcessSummariesMeta: description: Response metadata object. properties: @@ -58421,6 +58624,26 @@ paths: tags: - Software Catalog x-codegen-request-body-name: body + /api/v2/catalog/entity/preview: + post: + operationId: PreviewCatalogEntities + responses: + '202': + content: + application/json: + schema: + $ref: '#/components/schemas/EntityResponseArray' + description: Accepted + '429': + $ref: '#/components/responses/TooManyRequestsResponse' + security: + - apiKeyAuth: [] + appKeyAuth: [] + - AuthZ: + - apm_service_catalog_read + summary: Preview catalog entities + tags: + - Software Catalog /api/v2/catalog/entity/{entity_id}: delete: description: Delete a single entity in Software Catalog. diff --git a/examples/v2/software-catalog/PreviewCatalogEntities.java b/examples/v2/software-catalog/PreviewCatalogEntities.java new file mode 100644 index 00000000000..b4a187af8dc --- /dev/null +++ b/examples/v2/software-catalog/PreviewCatalogEntities.java @@ -0,0 +1,24 @@ +// Preview catalog entities returns "Accepted" response + +import com.datadog.api.client.ApiClient; +import com.datadog.api.client.ApiException; +import com.datadog.api.client.v2.api.SoftwareCatalogApi; +import com.datadog.api.client.v2.model.EntityResponseArray; + +public class Example { + public static void main(String[] args) { + ApiClient defaultClient = ApiClient.getDefaultApiClient(); + SoftwareCatalogApi apiInstance = new SoftwareCatalogApi(defaultClient); + + try { + EntityResponseArray result = apiInstance.previewCatalogEntities(); + System.out.println(result); + } catch (ApiException e) { + System.err.println("Exception when calling SoftwareCatalogApi#previewCatalogEntities"); + System.err.println("Status code: " + e.getCode()); + System.err.println("Reason: " + e.getResponseBody()); + System.err.println("Response headers: " + e.getResponseHeaders()); + e.printStackTrace(); + } + } +} diff --git a/src/main/java/com/datadog/api/client/v2/api/SoftwareCatalogApi.java b/src/main/java/com/datadog/api/client/v2/api/SoftwareCatalogApi.java index 01219ab18ad..4875f4fdc7a 100644 --- a/src/main/java/com/datadog/api/client/v2/api/SoftwareCatalogApi.java +++ b/src/main/java/com/datadog/api/client/v2/api/SoftwareCatalogApi.java @@ -6,6 +6,7 @@ import com.datadog.api.client.PaginationIterable; import com.datadog.api.client.Pair; import com.datadog.api.client.v2.model.EntityData; +import com.datadog.api.client.v2.model.EntityResponseArray; import com.datadog.api.client.v2.model.IncludeType; import com.datadog.api.client.v2.model.KindData; import com.datadog.api.client.v2.model.ListEntityCatalogResponse; @@ -1268,6 +1269,113 @@ public ApiResponse listCatalogRelationWithHttpInfo( new GenericType() {}); } + /** + * Preview catalog entities. + * + *

See {@link #previewCatalogEntitiesWithHttpInfo}. + * + * @return EntityResponseArray + * @throws ApiException if fails to make API call + */ + public EntityResponseArray previewCatalogEntities() throws ApiException { + return previewCatalogEntitiesWithHttpInfo().getData(); + } + + /** + * Preview catalog entities. + * + *

See {@link #previewCatalogEntitiesWithHttpInfoAsync}. + * + * @return CompletableFuture<EntityResponseArray> + */ + public CompletableFuture previewCatalogEntitiesAsync() { + return previewCatalogEntitiesWithHttpInfoAsync() + .thenApply( + response -> { + return response.getData(); + }); + } + + /** + * @return ApiResponse<EntityResponseArray> + * @throws ApiException if fails to make API call + * @http.response.details + * + * + * + * + * + *
Response details
Status Code Description Response Headers
202 Accepted -
429 Too many requests -
+ */ + public ApiResponse previewCatalogEntitiesWithHttpInfo() throws ApiException { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/catalog/entity/preview"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder = + apiClient.createBuilder( + "v2.SoftwareCatalogApi.previewCatalogEntities", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + return apiClient.invokeAPI( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + + /** + * Preview catalog entities. + * + *

See {@link #previewCatalogEntitiesWithHttpInfo}. + * + * @return CompletableFuture<ApiResponse<EntityResponseArray>> + */ + public CompletableFuture> + previewCatalogEntitiesWithHttpInfoAsync() { + Object localVarPostBody = null; + // create path and map variables + String localVarPath = "/api/v2/catalog/entity/preview"; + + Map localVarHeaderParams = new HashMap(); + + Invocation.Builder builder; + try { + builder = + apiClient.createBuilder( + "v2.SoftwareCatalogApi.previewCatalogEntities", + localVarPath, + new ArrayList(), + localVarHeaderParams, + new HashMap(), + new String[] {"application/json"}, + new String[] {"apiKeyAuth", "appKeyAuth", "AuthZ"}); + } catch (ApiException ex) { + CompletableFuture> result = new CompletableFuture<>(); + result.completeExceptionally(ex); + return result; + } + return apiClient.invokeAPIAsync( + "POST", + builder, + localVarHeaderParams, + new String[] {}, + localVarPostBody, + new HashMap(), + false, + new GenericType() {}); + } + /** * Create or update entities. * diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseArray.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseArray.java new file mode 100644 index 00000000000..ea48a401438 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseArray.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseArray.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseArray { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = new ArrayList<>(); + + public EntityResponseArray() {} + + @JsonCreator + public EntityResponseArray( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + List data) { + this.data = data; + } + + public EntityResponseArray data(List data) { + this.data = data; + for (PreviewEntityResponseData item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public EntityResponseArray addDataItem(PreviewEntityResponseData dataItem) { + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseArray + */ + @JsonAnySetter + public EntityResponseArray putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseArray object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseArray entityResponseArray = (EntityResponseArray) o; + return Objects.equals(this.data, entityResponseArray.data) + && Objects.equals(this.additionalProperties, entityResponseArray.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseArray {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataAttributes.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataAttributes.java new file mode 100644 index 00000000000..f9185dbcb0f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataAttributes.java @@ -0,0 +1,382 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataAttributes.JSON_PROPERTY_API_VERSION, + EntityResponseDataAttributes.JSON_PROPERTY_DESCRIPTION, + EntityResponseDataAttributes.JSON_PROPERTY_DISPLAY_NAME, + EntityResponseDataAttributes.JSON_PROPERTY_KIND, + EntityResponseDataAttributes.JSON_PROPERTY_NAME, + EntityResponseDataAttributes.JSON_PROPERTY_NAMESPACE, + EntityResponseDataAttributes.JSON_PROPERTY_OWNER, + EntityResponseDataAttributes.JSON_PROPERTY_PROPERTIES, + EntityResponseDataAttributes.JSON_PROPERTY_TAGS +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataAttributes { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_API_VERSION = "apiVersion"; + private String apiVersion; + + public static final String JSON_PROPERTY_DESCRIPTION = "description"; + private String description; + + public static final String JSON_PROPERTY_DISPLAY_NAME = "displayName"; + private String displayName; + + public static final String JSON_PROPERTY_KIND = "kind"; + private String kind; + + public static final String JSON_PROPERTY_NAME = "name"; + private String name; + + public static final String JSON_PROPERTY_NAMESPACE = "namespace"; + private String namespace; + + public static final String JSON_PROPERTY_OWNER = "owner"; + private String owner; + + public static final String JSON_PROPERTY_PROPERTIES = "properties"; + private Map properties = null; + + public static final String JSON_PROPERTY_TAGS = "tags"; + private List tags = null; + + public EntityResponseDataAttributes apiVersion(String apiVersion) { + this.apiVersion = apiVersion; + return this; + } + + /** + * GetapiVersion + * + * @return apiVersion + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_API_VERSION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getApiVersion() { + return apiVersion; + } + + public void setApiVersion(String apiVersion) { + this.apiVersion = apiVersion; + } + + public EntityResponseDataAttributes description(String description) { + this.description = description; + return this; + } + + /** + * Getdescription + * + * @return description + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DESCRIPTION) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDescription() { + return description; + } + + public void setDescription(String description) { + this.description = description; + } + + public EntityResponseDataAttributes displayName(String displayName) { + this.displayName = displayName; + return this; + } + + /** + * GetdisplayName + * + * @return displayName + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DISPLAY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getDisplayName() { + return displayName; + } + + public void setDisplayName(String displayName) { + this.displayName = displayName; + } + + public EntityResponseDataAttributes kind(String kind) { + this.kind = kind; + return this; + } + + /** + * Getkind + * + * @return kind + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_KIND) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getKind() { + return kind; + } + + public void setKind(String kind) { + this.kind = kind; + } + + public EntityResponseDataAttributes name(String name) { + this.name = name; + return this; + } + + /** + * Getname + * + * @return name + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAME) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getName() { + return name; + } + + public void setName(String name) { + this.name = name; + } + + public EntityResponseDataAttributes namespace(String namespace) { + this.namespace = namespace; + return this; + } + + /** + * Getnamespace + * + * @return namespace + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_NAMESPACE) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getNamespace() { + return namespace; + } + + public void setNamespace(String namespace) { + this.namespace = namespace; + } + + public EntityResponseDataAttributes owner(String owner) { + this.owner = owner; + return this; + } + + /** + * Getowner + * + * @return owner + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_OWNER) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getOwner() { + return owner; + } + + public void setOwner(String owner) { + this.owner = owner; + } + + public EntityResponseDataAttributes properties(Map properties) { + this.properties = properties; + return this; + } + + public EntityResponseDataAttributes putPropertiesItem(String key, Object propertiesItem) { + if (this.properties == null) { + this.properties = new HashMap<>(); + } + this.properties.put(key, propertiesItem); + return this; + } + + /** + * Getproperties + * + * @return properties + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_PROPERTIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public Map getProperties() { + return properties; + } + + public void setProperties(Map properties) { + this.properties = properties; + } + + public EntityResponseDataAttributes tags(List tags) { + this.tags = tags; + return this; + } + + public EntityResponseDataAttributes addTagsItem(String tagsItem) { + if (this.tags == null) { + this.tags = new ArrayList<>(); + } + this.tags.add(tagsItem); + return this; + } + + /** + * Gettags + * + * @return tags + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_TAGS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getTags() { + return tags; + } + + public void setTags(List tags) { + this.tags = tags; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataAttributes + */ + @JsonAnySetter + public EntityResponseDataAttributes putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataAttributes object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataAttributes entityResponseDataAttributes = (EntityResponseDataAttributes) o; + return Objects.equals(this.apiVersion, entityResponseDataAttributes.apiVersion) + && Objects.equals(this.description, entityResponseDataAttributes.description) + && Objects.equals(this.displayName, entityResponseDataAttributes.displayName) + && Objects.equals(this.kind, entityResponseDataAttributes.kind) + && Objects.equals(this.name, entityResponseDataAttributes.name) + && Objects.equals(this.namespace, entityResponseDataAttributes.namespace) + && Objects.equals(this.owner, entityResponseDataAttributes.owner) + && Objects.equals(this.properties, entityResponseDataAttributes.properties) + && Objects.equals(this.tags, entityResponseDataAttributes.tags) + && Objects.equals( + this.additionalProperties, entityResponseDataAttributes.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + apiVersion, + description, + displayName, + kind, + name, + namespace, + owner, + properties, + tags, + additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataAttributes {\n"); + sb.append(" apiVersion: ").append(toIndentedString(apiVersion)).append("\n"); + sb.append(" description: ").append(toIndentedString(description)).append("\n"); + sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); + sb.append(" kind: ").append(toIndentedString(kind)).append("\n"); + sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" namespace: ").append(toIndentedString(namespace)).append("\n"); + sb.append(" owner: ").append(toIndentedString(owner)).append("\n"); + sb.append(" properties: ").append(toIndentedString(properties)).append("\n"); + sb.append(" tags: ").append(toIndentedString(tags)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationships.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationships.java new file mode 100644 index 00000000000..f2b222bdf81 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationships.java @@ -0,0 +1,256 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationships.JSON_PROPERTY_INCIDENTS, + EntityResponseDataRelationships.JSON_PROPERTY_ONCALLS, + EntityResponseDataRelationships.JSON_PROPERTY_RAW_SCHEMA, + EntityResponseDataRelationships.JSON_PROPERTY_RELATED_ENTITIES, + EntityResponseDataRelationships.JSON_PROPERTY_SCHEMA +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationships { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_INCIDENTS = "incidents"; + private EntityResponseDataRelationshipsIncidents incidents; + + public static final String JSON_PROPERTY_ONCALLS = "oncalls"; + private EntityResponseDataRelationshipsOncalls oncalls; + + public static final String JSON_PROPERTY_RAW_SCHEMA = "rawSchema"; + private EntityResponseDataRelationshipsRawSchema rawSchema; + + public static final String JSON_PROPERTY_RELATED_ENTITIES = "relatedEntities"; + private EntityResponseDataRelationshipsRelatedEntities relatedEntities; + + public static final String JSON_PROPERTY_SCHEMA = "schema"; + private EntityResponseDataRelationshipsSchema schema; + + public EntityResponseDataRelationships incidents( + EntityResponseDataRelationshipsIncidents incidents) { + this.incidents = incidents; + this.unparsed |= incidents.unparsed; + return this; + } + + /** + * Getincidents + * + * @return incidents + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_INCIDENTS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationshipsIncidents getIncidents() { + return incidents; + } + + public void setIncidents(EntityResponseDataRelationshipsIncidents incidents) { + this.incidents = incidents; + } + + public EntityResponseDataRelationships oncalls(EntityResponseDataRelationshipsOncalls oncalls) { + this.oncalls = oncalls; + this.unparsed |= oncalls.unparsed; + return this; + } + + /** + * Getoncalls + * + * @return oncalls + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ONCALLS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationshipsOncalls getOncalls() { + return oncalls; + } + + public void setOncalls(EntityResponseDataRelationshipsOncalls oncalls) { + this.oncalls = oncalls; + } + + public EntityResponseDataRelationships rawSchema( + EntityResponseDataRelationshipsRawSchema rawSchema) { + this.rawSchema = rawSchema; + this.unparsed |= rawSchema.unparsed; + return this; + } + + /** + * GetrawSchema + * + * @return rawSchema + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RAW_SCHEMA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationshipsRawSchema getRawSchema() { + return rawSchema; + } + + public void setRawSchema(EntityResponseDataRelationshipsRawSchema rawSchema) { + this.rawSchema = rawSchema; + } + + public EntityResponseDataRelationships relatedEntities( + EntityResponseDataRelationshipsRelatedEntities relatedEntities) { + this.relatedEntities = relatedEntities; + this.unparsed |= relatedEntities.unparsed; + return this; + } + + /** + * GetrelatedEntities + * + * @return relatedEntities + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATED_ENTITIES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationshipsRelatedEntities getRelatedEntities() { + return relatedEntities; + } + + public void setRelatedEntities(EntityResponseDataRelationshipsRelatedEntities relatedEntities) { + this.relatedEntities = relatedEntities; + } + + public EntityResponseDataRelationships schema(EntityResponseDataRelationshipsSchema schema) { + this.schema = schema; + this.unparsed |= schema.unparsed; + return this; + } + + /** + * Getschema + * + * @return schema + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_SCHEMA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationshipsSchema getSchema() { + return schema; + } + + public void setSchema(EntityResponseDataRelationshipsSchema schema) { + this.schema = schema; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationships + */ + @JsonAnySetter + public EntityResponseDataRelationships putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationships object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationships entityResponseDataRelationships = + (EntityResponseDataRelationships) o; + return Objects.equals(this.incidents, entityResponseDataRelationships.incidents) + && Objects.equals(this.oncalls, entityResponseDataRelationships.oncalls) + && Objects.equals(this.rawSchema, entityResponseDataRelationships.rawSchema) + && Objects.equals(this.relatedEntities, entityResponseDataRelationships.relatedEntities) + && Objects.equals(this.schema, entityResponseDataRelationships.schema) + && Objects.equals( + this.additionalProperties, entityResponseDataRelationships.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash( + incidents, oncalls, rawSchema, relatedEntities, schema, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationships {\n"); + sb.append(" incidents: ").append(toIndentedString(incidents)).append("\n"); + sb.append(" oncalls: ").append(toIndentedString(oncalls)).append("\n"); + sb.append(" rawSchema: ").append(toIndentedString(rawSchema)).append("\n"); + sb.append(" relatedEntities: ").append(toIndentedString(relatedEntities)).append("\n"); + sb.append(" schema: ").append(toIndentedString(schema)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidents.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidents.java new file mode 100644 index 00000000000..bd360f7df2a --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidents.java @@ -0,0 +1,154 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseDataRelationshipsIncidents.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsIncidents { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public EntityResponseDataRelationshipsIncidents data( + List data) { + this.data = data; + for (EntityResponseDataRelationshipsIncidentsDataItems item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public EntityResponseDataRelationshipsIncidents addDataItem( + EntityResponseDataRelationshipsIncidentsDataItems dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsIncidents + */ + @JsonAnySetter + public EntityResponseDataRelationshipsIncidents putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsIncidents object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsIncidents entityResponseDataRelationshipsIncidents = + (EntityResponseDataRelationshipsIncidents) o; + return Objects.equals(this.data, entityResponseDataRelationshipsIncidents.data) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsIncidents.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsIncidents {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItems.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItems.java new file mode 100644 index 00000000000..c7e225f114f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItems.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationshipsIncidentsDataItems.JSON_PROPERTY_ID, + EntityResponseDataRelationshipsIncidentsDataItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsIncidentsDataItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataRelationshipsIncidentsDataItemsType type = + EntityResponseDataRelationshipsIncidentsDataItemsType.INCIDENT; + + public EntityResponseDataRelationshipsIncidentsDataItems() {} + + @JsonCreator + public EntityResponseDataRelationshipsIncidentsDataItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + EntityResponseDataRelationshipsIncidentsDataItemsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public EntityResponseDataRelationshipsIncidentsDataItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityResponseDataRelationshipsIncidentsDataItems type( + EntityResponseDataRelationshipsIncidentsDataItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Incident resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsIncidentsDataItemsType getType() { + return type; + } + + public void setType(EntityResponseDataRelationshipsIncidentsDataItemsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsIncidentsDataItems + */ + @JsonAnySetter + public EntityResponseDataRelationshipsIncidentsDataItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsIncidentsDataItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsIncidentsDataItems + entityResponseDataRelationshipsIncidentsDataItems = + (EntityResponseDataRelationshipsIncidentsDataItems) o; + return Objects.equals(this.id, entityResponseDataRelationshipsIncidentsDataItems.id) + && Objects.equals(this.type, entityResponseDataRelationshipsIncidentsDataItems.type) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsIncidentsDataItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsIncidentsDataItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItemsType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItemsType.java new file mode 100644 index 00000000000..84e854b8dc3 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsIncidentsDataItemsType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Incident resource type. */ +@JsonSerialize( + using = + EntityResponseDataRelationshipsIncidentsDataItemsType + .EntityResponseDataRelationshipsIncidentsDataItemsTypeSerializer.class) +public class EntityResponseDataRelationshipsIncidentsDataItemsType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("incident")); + + public static final EntityResponseDataRelationshipsIncidentsDataItemsType INCIDENT = + new EntityResponseDataRelationshipsIncidentsDataItemsType("incident"); + + EntityResponseDataRelationshipsIncidentsDataItemsType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataRelationshipsIncidentsDataItemsTypeSerializer + extends StdSerializer { + public EntityResponseDataRelationshipsIncidentsDataItemsTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseDataRelationshipsIncidentsDataItemsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataRelationshipsIncidentsDataItemsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataRelationshipsIncidentsDataItemsType fromValue(String value) { + return new EntityResponseDataRelationshipsIncidentsDataItemsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncalls.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncalls.java new file mode 100644 index 00000000000..c2a74bbead5 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncalls.java @@ -0,0 +1,153 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseDataRelationshipsOncalls.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsOncalls { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public EntityResponseDataRelationshipsOncalls data( + List data) { + this.data = data; + for (EntityResponseDataRelationshipsOncallsDataItems item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public EntityResponseDataRelationshipsOncalls addDataItem( + EntityResponseDataRelationshipsOncallsDataItems dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsOncalls + */ + @JsonAnySetter + public EntityResponseDataRelationshipsOncalls putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsOncalls object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsOncalls entityResponseDataRelationshipsOncalls = + (EntityResponseDataRelationshipsOncalls) o; + return Objects.equals(this.data, entityResponseDataRelationshipsOncalls.data) + && Objects.equals( + this.additionalProperties, entityResponseDataRelationshipsOncalls.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsOncalls {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItems.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItems.java new file mode 100644 index 00000000000..05a1fa78a5f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItems.java @@ -0,0 +1,186 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationshipsOncallsDataItems.JSON_PROPERTY_ID, + EntityResponseDataRelationshipsOncallsDataItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsOncallsDataItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataRelationshipsOncallsDataItemsType type = + EntityResponseDataRelationshipsOncallsDataItemsType.ONCALL; + + public EntityResponseDataRelationshipsOncallsDataItems() {} + + @JsonCreator + public EntityResponseDataRelationshipsOncallsDataItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + EntityResponseDataRelationshipsOncallsDataItemsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public EntityResponseDataRelationshipsOncallsDataItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityResponseDataRelationshipsOncallsDataItems type( + EntityResponseDataRelationshipsOncallsDataItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Oncall resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsOncallsDataItemsType getType() { + return type; + } + + public void setType(EntityResponseDataRelationshipsOncallsDataItemsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsOncallsDataItems + */ + @JsonAnySetter + public EntityResponseDataRelationshipsOncallsDataItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsOncallsDataItems object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsOncallsDataItems + entityResponseDataRelationshipsOncallsDataItems = + (EntityResponseDataRelationshipsOncallsDataItems) o; + return Objects.equals(this.id, entityResponseDataRelationshipsOncallsDataItems.id) + && Objects.equals(this.type, entityResponseDataRelationshipsOncallsDataItems.type) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsOncallsDataItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsOncallsDataItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItemsType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItemsType.java new file mode 100644 index 00000000000..93bea9bacd0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsOncallsDataItemsType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Oncall resource type. */ +@JsonSerialize( + using = + EntityResponseDataRelationshipsOncallsDataItemsType + .EntityResponseDataRelationshipsOncallsDataItemsTypeSerializer.class) +public class EntityResponseDataRelationshipsOncallsDataItemsType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("oncall")); + + public static final EntityResponseDataRelationshipsOncallsDataItemsType ONCALL = + new EntityResponseDataRelationshipsOncallsDataItemsType("oncall"); + + EntityResponseDataRelationshipsOncallsDataItemsType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataRelationshipsOncallsDataItemsTypeSerializer + extends StdSerializer { + public EntityResponseDataRelationshipsOncallsDataItemsTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseDataRelationshipsOncallsDataItemsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataRelationshipsOncallsDataItemsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataRelationshipsOncallsDataItemsType fromValue(String value) { + return new EntityResponseDataRelationshipsOncallsDataItemsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchema.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchema.java new file mode 100644 index 00000000000..546624e990f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchema.java @@ -0,0 +1,150 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseDataRelationshipsRawSchema.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsRawSchema { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private EntityResponseDataRelationshipsRawSchemaData data; + + public EntityResponseDataRelationshipsRawSchema() {} + + @JsonCreator + public EntityResponseDataRelationshipsRawSchema( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + EntityResponseDataRelationshipsRawSchemaData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public EntityResponseDataRelationshipsRawSchema data( + EntityResponseDataRelationshipsRawSchemaData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsRawSchemaData getData() { + return data; + } + + public void setData(EntityResponseDataRelationshipsRawSchemaData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsRawSchema + */ + @JsonAnySetter + public EntityResponseDataRelationshipsRawSchema putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsRawSchema object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsRawSchema entityResponseDataRelationshipsRawSchema = + (EntityResponseDataRelationshipsRawSchema) o; + return Objects.equals(this.data, entityResponseDataRelationshipsRawSchema.data) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsRawSchema.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsRawSchema {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaData.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaData.java new file mode 100644 index 00000000000..ff973d786fc --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaData.java @@ -0,0 +1,185 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationshipsRawSchemaData.JSON_PROPERTY_ID, + EntityResponseDataRelationshipsRawSchemaData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsRawSchemaData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataRelationshipsRawSchemaDataType type = + EntityResponseDataRelationshipsRawSchemaDataType.RAWSCHEMA; + + public EntityResponseDataRelationshipsRawSchemaData() {} + + @JsonCreator + public EntityResponseDataRelationshipsRawSchemaData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + EntityResponseDataRelationshipsRawSchemaDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public EntityResponseDataRelationshipsRawSchemaData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityResponseDataRelationshipsRawSchemaData type( + EntityResponseDataRelationshipsRawSchemaDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Raw schema resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsRawSchemaDataType getType() { + return type; + } + + public void setType(EntityResponseDataRelationshipsRawSchemaDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsRawSchemaData + */ + @JsonAnySetter + public EntityResponseDataRelationshipsRawSchemaData putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsRawSchemaData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsRawSchemaData entityResponseDataRelationshipsRawSchemaData = + (EntityResponseDataRelationshipsRawSchemaData) o; + return Objects.equals(this.id, entityResponseDataRelationshipsRawSchemaData.id) + && Objects.equals(this.type, entityResponseDataRelationshipsRawSchemaData.type) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsRawSchemaData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsRawSchemaData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaDataType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaDataType.java new file mode 100644 index 00000000000..84fb4c5473c --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRawSchemaDataType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Raw schema resource type. */ +@JsonSerialize( + using = + EntityResponseDataRelationshipsRawSchemaDataType + .EntityResponseDataRelationshipsRawSchemaDataTypeSerializer.class) +public class EntityResponseDataRelationshipsRawSchemaDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("rawSchema")); + + public static final EntityResponseDataRelationshipsRawSchemaDataType RAWSCHEMA = + new EntityResponseDataRelationshipsRawSchemaDataType("rawSchema"); + + EntityResponseDataRelationshipsRawSchemaDataType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataRelationshipsRawSchemaDataTypeSerializer + extends StdSerializer { + public EntityResponseDataRelationshipsRawSchemaDataTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseDataRelationshipsRawSchemaDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataRelationshipsRawSchemaDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataRelationshipsRawSchemaDataType fromValue(String value) { + return new EntityResponseDataRelationshipsRawSchemaDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntities.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntities.java new file mode 100644 index 00000000000..f95d6c2413b --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntities.java @@ -0,0 +1,155 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseDataRelationshipsRelatedEntities.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsRelatedEntities { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private List data = null; + + public EntityResponseDataRelationshipsRelatedEntities data( + List data) { + this.data = data; + for (EntityResponseDataRelationshipsRelatedEntitiesDataItems item : data) { + this.unparsed |= item.unparsed; + } + return this; + } + + public EntityResponseDataRelationshipsRelatedEntities addDataItem( + EntityResponseDataRelationshipsRelatedEntitiesDataItems dataItem) { + if (this.data == null) { + this.data = new ArrayList<>(); + } + this.data.add(dataItem); + this.unparsed |= dataItem.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public List getData() { + return data; + } + + public void setData(List data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsRelatedEntities + */ + @JsonAnySetter + public EntityResponseDataRelationshipsRelatedEntities putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsRelatedEntities object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsRelatedEntities entityResponseDataRelationshipsRelatedEntities = + (EntityResponseDataRelationshipsRelatedEntities) o; + return Objects.equals(this.data, entityResponseDataRelationshipsRelatedEntities.data) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsRelatedEntities.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsRelatedEntities {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItems.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItems.java new file mode 100644 index 00000000000..73ae7ea32c6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItems.java @@ -0,0 +1,189 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationshipsRelatedEntitiesDataItems.JSON_PROPERTY_ID, + EntityResponseDataRelationshipsRelatedEntitiesDataItems.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsRelatedEntitiesDataItems { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataRelationshipsRelatedEntitiesDataItemsType type = + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType.RELATEDENTITY; + + public EntityResponseDataRelationshipsRelatedEntitiesDataItems() {} + + @JsonCreator + public EntityResponseDataRelationshipsRelatedEntitiesDataItems( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public EntityResponseDataRelationshipsRelatedEntitiesDataItems id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityResponseDataRelationshipsRelatedEntitiesDataItems type( + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Related entity resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsRelatedEntitiesDataItemsType getType() { + return type; + } + + public void setType(EntityResponseDataRelationshipsRelatedEntitiesDataItemsType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsRelatedEntitiesDataItems + */ + @JsonAnySetter + public EntityResponseDataRelationshipsRelatedEntitiesDataItems putAdditionalProperty( + String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** + * Return true if this EntityResponseDataRelationshipsRelatedEntitiesDataItems object is equal to + * o. + */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsRelatedEntitiesDataItems + entityResponseDataRelationshipsRelatedEntitiesDataItems = + (EntityResponseDataRelationshipsRelatedEntitiesDataItems) o; + return Objects.equals(this.id, entityResponseDataRelationshipsRelatedEntitiesDataItems.id) + && Objects.equals(this.type, entityResponseDataRelationshipsRelatedEntitiesDataItems.type) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsRelatedEntitiesDataItems.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsRelatedEntitiesDataItems {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType.java new file mode 100644 index 00000000000..946760a94f6 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsRelatedEntitiesDataItemsType.java @@ -0,0 +1,64 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Related entity resource type. */ +@JsonSerialize( + using = + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType + .EntityResponseDataRelationshipsRelatedEntitiesDataItemsTypeSerializer.class) +public class EntityResponseDataRelationshipsRelatedEntitiesDataItemsType extends ModelEnum { + + private static final Set allowedValues = + new HashSet(Arrays.asList("relatedEntity")); + + public static final EntityResponseDataRelationshipsRelatedEntitiesDataItemsType RELATEDENTITY = + new EntityResponseDataRelationshipsRelatedEntitiesDataItemsType("relatedEntity"); + + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataRelationshipsRelatedEntitiesDataItemsTypeSerializer + extends StdSerializer { + public EntityResponseDataRelationshipsRelatedEntitiesDataItemsTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseDataRelationshipsRelatedEntitiesDataItemsTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataRelationshipsRelatedEntitiesDataItemsType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataRelationshipsRelatedEntitiesDataItemsType fromValue( + String value) { + return new EntityResponseDataRelationshipsRelatedEntitiesDataItemsType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchema.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchema.java new file mode 100644 index 00000000000..6ef27824841 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchema.java @@ -0,0 +1,149 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({EntityResponseDataRelationshipsSchema.JSON_PROPERTY_DATA}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsSchema { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_DATA = "data"; + private EntityResponseDataRelationshipsSchemaData data; + + public EntityResponseDataRelationshipsSchema() {} + + @JsonCreator + public EntityResponseDataRelationshipsSchema( + @JsonProperty(required = true, value = JSON_PROPERTY_DATA) + EntityResponseDataRelationshipsSchemaData data) { + this.data = data; + this.unparsed |= data.unparsed; + } + + public EntityResponseDataRelationshipsSchema data( + EntityResponseDataRelationshipsSchemaData data) { + this.data = data; + this.unparsed |= data.unparsed; + return this; + } + + /** + * Getdata + * + * @return data + */ + @JsonProperty(JSON_PROPERTY_DATA) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsSchemaData getData() { + return data; + } + + public void setData(EntityResponseDataRelationshipsSchemaData data) { + this.data = data; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsSchema + */ + @JsonAnySetter + public EntityResponseDataRelationshipsSchema putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsSchema object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsSchema entityResponseDataRelationshipsSchema = + (EntityResponseDataRelationshipsSchema) o; + return Objects.equals(this.data, entityResponseDataRelationshipsSchema.data) + && Objects.equals( + this.additionalProperties, entityResponseDataRelationshipsSchema.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(data, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsSchema {\n"); + sb.append(" data: ").append(toIndentedString(data)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaData.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaData.java new file mode 100644 index 00000000000..56a6e3b79f7 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaData.java @@ -0,0 +1,184 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + EntityResponseDataRelationshipsSchemaData.JSON_PROPERTY_ID, + EntityResponseDataRelationshipsSchemaData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class EntityResponseDataRelationshipsSchemaData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataRelationshipsSchemaDataType type = + EntityResponseDataRelationshipsSchemaDataType.SCHEMA; + + public EntityResponseDataRelationshipsSchemaData() {} + + @JsonCreator + public EntityResponseDataRelationshipsSchemaData( + @JsonProperty(required = true, value = JSON_PROPERTY_ID) String id, + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) + EntityResponseDataRelationshipsSchemaDataType type) { + this.id = id; + this.type = type; + this.unparsed |= !type.isValid(); + } + + public EntityResponseDataRelationshipsSchemaData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public EntityResponseDataRelationshipsSchemaData type( + EntityResponseDataRelationshipsSchemaDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Schema resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataRelationshipsSchemaDataType getType() { + return type; + } + + public void setType(EntityResponseDataRelationshipsSchemaDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return EntityResponseDataRelationshipsSchemaData + */ + @JsonAnySetter + public EntityResponseDataRelationshipsSchemaData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this EntityResponseDataRelationshipsSchemaData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + EntityResponseDataRelationshipsSchemaData entityResponseDataRelationshipsSchemaData = + (EntityResponseDataRelationshipsSchemaData) o; + return Objects.equals(this.id, entityResponseDataRelationshipsSchemaData.id) + && Objects.equals(this.type, entityResponseDataRelationshipsSchemaData.type) + && Objects.equals( + this.additionalProperties, + entityResponseDataRelationshipsSchemaData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(id, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class EntityResponseDataRelationshipsSchemaData {\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaDataType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaDataType.java new file mode 100644 index 00000000000..bca440faf89 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataRelationshipsSchemaDataType.java @@ -0,0 +1,62 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Schema resource type. */ +@JsonSerialize( + using = + EntityResponseDataRelationshipsSchemaDataType + .EntityResponseDataRelationshipsSchemaDataTypeSerializer.class) +public class EntityResponseDataRelationshipsSchemaDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("schema")); + + public static final EntityResponseDataRelationshipsSchemaDataType SCHEMA = + new EntityResponseDataRelationshipsSchemaDataType("schema"); + + EntityResponseDataRelationshipsSchemaDataType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataRelationshipsSchemaDataTypeSerializer + extends StdSerializer { + public EntityResponseDataRelationshipsSchemaDataTypeSerializer( + Class t) { + super(t); + } + + public EntityResponseDataRelationshipsSchemaDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataRelationshipsSchemaDataType value, + JsonGenerator jgen, + SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataRelationshipsSchemaDataType fromValue(String value) { + return new EntityResponseDataRelationshipsSchemaDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataType.java b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataType.java new file mode 100644 index 00000000000..d4646e587c0 --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/EntityResponseDataType.java @@ -0,0 +1,55 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.datadog.api.client.ModelEnum; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.core.JsonProcessingException; +import com.fasterxml.jackson.databind.SerializerProvider; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.StdSerializer; +import java.io.IOException; +import java.util.Arrays; +import java.util.HashSet; +import java.util.Set; + +/** Entity resource type. */ +@JsonSerialize(using = EntityResponseDataType.EntityResponseDataTypeSerializer.class) +public class EntityResponseDataType extends ModelEnum { + + private static final Set allowedValues = new HashSet(Arrays.asList("entity")); + + public static final EntityResponseDataType ENTITY = new EntityResponseDataType("entity"); + + EntityResponseDataType(String value) { + super(value, allowedValues); + } + + public static class EntityResponseDataTypeSerializer + extends StdSerializer { + public EntityResponseDataTypeSerializer(Class t) { + super(t); + } + + public EntityResponseDataTypeSerializer() { + this(null); + } + + @Override + public void serialize( + EntityResponseDataType value, JsonGenerator jgen, SerializerProvider provider) + throws IOException, JsonProcessingException { + jgen.writeObject(value.value); + } + } + + @JsonCreator + public static EntityResponseDataType fromValue(String value) { + return new EntityResponseDataType(value); + } +} diff --git a/src/main/java/com/datadog/api/client/v2/model/PreviewEntityResponseData.java b/src/main/java/com/datadog/api/client/v2/model/PreviewEntityResponseData.java new file mode 100644 index 00000000000..8bd5e3e656f --- /dev/null +++ b/src/main/java/com/datadog/api/client/v2/model/PreviewEntityResponseData.java @@ -0,0 +1,234 @@ +/* + * Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License. + * This product includes software developed at Datadog (https://www.datadoghq.com/). + * Copyright 2019-Present Datadog, Inc. + */ + +package com.datadog.api.client.v2.model; + +import com.fasterxml.jackson.annotation.JsonAnyGetter; +import com.fasterxml.jackson.annotation.JsonAnySetter; +import com.fasterxml.jackson.annotation.JsonCreator; +import com.fasterxml.jackson.annotation.JsonIgnore; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.annotation.JsonPropertyOrder; +import java.util.HashMap; +import java.util.Map; +import java.util.Objects; + +/** */ +@JsonPropertyOrder({ + PreviewEntityResponseData.JSON_PROPERTY_ATTRIBUTES, + PreviewEntityResponseData.JSON_PROPERTY_ID, + PreviewEntityResponseData.JSON_PROPERTY_RELATIONSHIPS, + PreviewEntityResponseData.JSON_PROPERTY_TYPE +}) +@jakarta.annotation.Generated( + value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator") +public class PreviewEntityResponseData { + @JsonIgnore public boolean unparsed = false; + public static final String JSON_PROPERTY_ATTRIBUTES = "attributes"; + private EntityResponseDataAttributes attributes; + + public static final String JSON_PROPERTY_ID = "id"; + private String id; + + public static final String JSON_PROPERTY_RELATIONSHIPS = "relationships"; + private EntityResponseDataRelationships relationships; + + public static final String JSON_PROPERTY_TYPE = "type"; + private EntityResponseDataType type = EntityResponseDataType.ENTITY; + + public PreviewEntityResponseData() {} + + @JsonCreator + public PreviewEntityResponseData( + @JsonProperty(required = true, value = JSON_PROPERTY_TYPE) EntityResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + } + + public PreviewEntityResponseData attributes(EntityResponseDataAttributes attributes) { + this.attributes = attributes; + this.unparsed |= attributes.unparsed; + return this; + } + + /** + * Getattributes + * + * @return attributes + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ATTRIBUTES) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataAttributes getAttributes() { + return attributes; + } + + public void setAttributes(EntityResponseDataAttributes attributes) { + this.attributes = attributes; + } + + public PreviewEntityResponseData id(String id) { + this.id = id; + return this; + } + + /** + * Getid + * + * @return id + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_ID) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public String getId() { + return id; + } + + public void setId(String id) { + this.id = id; + } + + public PreviewEntityResponseData relationships(EntityResponseDataRelationships relationships) { + this.relationships = relationships; + this.unparsed |= relationships.unparsed; + return this; + } + + /** + * Getrelationships + * + * @return relationships + */ + @jakarta.annotation.Nullable + @JsonProperty(JSON_PROPERTY_RELATIONSHIPS) + @JsonInclude(value = JsonInclude.Include.USE_DEFAULTS) + public EntityResponseDataRelationships getRelationships() { + return relationships; + } + + public void setRelationships(EntityResponseDataRelationships relationships) { + this.relationships = relationships; + } + + public PreviewEntityResponseData type(EntityResponseDataType type) { + this.type = type; + this.unparsed |= !type.isValid(); + return this; + } + + /** + * Entity resource type. + * + * @return type + */ + @JsonProperty(JSON_PROPERTY_TYPE) + @JsonInclude(value = JsonInclude.Include.ALWAYS) + public EntityResponseDataType getType() { + return type; + } + + public void setType(EntityResponseDataType type) { + if (!type.isValid()) { + this.unparsed = true; + } + this.type = type; + } + + /** + * A container for additional, undeclared properties. This is a holder for any undeclared + * properties as specified with the 'additionalProperties' keyword in the OAS document. + */ + private Map additionalProperties; + + /** + * Set the additional (undeclared) property with the specified name and value. If the property + * does not already exist, create it otherwise replace it. + * + * @param key The arbitrary key to set + * @param value The associated value + * @return PreviewEntityResponseData + */ + @JsonAnySetter + public PreviewEntityResponseData putAdditionalProperty(String key, Object value) { + if (this.additionalProperties == null) { + this.additionalProperties = new HashMap(); + } + this.additionalProperties.put(key, value); + return this; + } + + /** + * Return the additional (undeclared) property. + * + * @return The additional properties + */ + @JsonAnyGetter + public Map getAdditionalProperties() { + return additionalProperties; + } + + /** + * Return the additional (undeclared) property with the specified name. + * + * @param key The arbitrary key to get + * @return The specific additional property for the given key + */ + public Object getAdditionalProperty(String key) { + if (this.additionalProperties == null) { + return null; + } + return this.additionalProperties.get(key); + } + + /** Return true if this PreviewEntityResponseData object is equal to o. */ + @Override + public boolean equals(Object o) { + if (this == o) { + return true; + } + if (o == null || getClass() != o.getClass()) { + return false; + } + PreviewEntityResponseData previewEntityResponseData = (PreviewEntityResponseData) o; + return Objects.equals(this.attributes, previewEntityResponseData.attributes) + && Objects.equals(this.id, previewEntityResponseData.id) + && Objects.equals(this.relationships, previewEntityResponseData.relationships) + && Objects.equals(this.type, previewEntityResponseData.type) + && Objects.equals( + this.additionalProperties, previewEntityResponseData.additionalProperties); + } + + @Override + public int hashCode() { + return Objects.hash(attributes, id, relationships, type, additionalProperties); + } + + @Override + public String toString() { + StringBuilder sb = new StringBuilder(); + sb.append("class PreviewEntityResponseData {\n"); + sb.append(" attributes: ").append(toIndentedString(attributes)).append("\n"); + sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" relationships: ").append(toIndentedString(relationships)).append("\n"); + sb.append(" type: ").append(toIndentedString(type)).append("\n"); + sb.append(" additionalProperties: ") + .append(toIndentedString(additionalProperties)) + .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/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature b/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature index 070e066a944..34e9f95314d 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature +++ b/src/test/resources/com/datadog/api/client/v2/api/software_catalog.feature @@ -144,3 +144,9 @@ Feature: Software Catalog And request contains "page[limit]" parameter with value 20 When the request with pagination is sent Then the response status is 200 OK + + @generated @skip @team:DataDog/service-catalog + Scenario: Preview catalog entities returns "Accepted" response + Given new "PreviewCatalogEntities" request + When the request is sent + Then the response status is 202 Accepted diff --git a/src/test/resources/com/datadog/api/client/v2/api/undo.json b/src/test/resources/com/datadog/api/client/v2/api/undo.json index f4a7f9e7f8d..1865379ddbe 100644 --- a/src/test/resources/com/datadog/api/client/v2/api/undo.json +++ b/src/test/resources/com/datadog/api/client/v2/api/undo.json @@ -751,6 +751,12 @@ "type": "unsafe" } }, + "PreviewCatalogEntities": { + "tag": "Software Catalog", + "undo": { + "type": "safe" + } + }, "DeleteCatalogEntity": { "tag": "Software Catalog", "undo": {