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

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
333 changes: 181 additions & 152 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

1 change: 0 additions & 1 deletion examples/v2/reference-tables/UpdateReferenceTable.java
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ public static void main(String[] args) {
.primaryKeys(Collections.singletonList("id")))
.syncEnabled(false)
.tags(Collections.singletonList("test_tag")))
.id("00000000-0000-0000-0000-000000000000")
.type(PatchTableRequestDataType.REFERENCE_TABLE));

try {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -81,11 +81,11 @@ public CompletableFuture<TableResultV2> createReferenceTableAsync(CreateTableReq
}

/**
* Create a new reference table. You can provide data in two ways: 1) Call POST
* api/v2/reference-tables/upload first to get an upload ID, then PUT chunks of CSV data to each
* provided URL, and finally call this POST endpoint with the upload_id in file_metadata, OR 2)
* Provide access_details in file_metadata pointing to a CSV file in cloud storage (Amazon S3,
* Azure Blob Storage, or GCP Cloud Storage).
* Creates a reference table. You can provide data in two ways: 1. Call POST
* /api/v2/reference-tables/upload to get an upload ID. Then, PUT the CSV data (not the file
* itself) in chunks to each URL in the request body. Finally, call this POST endpoint with <code>
* upload_id</code> in <code>file_metadata</code>. 2. Provide <code>access_details</code> in
* <code>file_metadata</code> pointing to a CSV file in cloud storage.
*
* @param body (required)
* @return ApiResponse&lt;TableResultV2&gt;
Expand Down Expand Up @@ -325,7 +325,7 @@ public ApiResponse<CreateUploadResponse> createReferenceTableUploadWithHttpInfo(
*
* <p>See {@link #deleteTableWithHttpInfo}.
*
* @param id The ID of the reference table to delete (required)
* @param id Unique identifier of the reference table to delete (required)
* @throws ApiException if fails to make API call
*/
public void deleteTable(String id) throws ApiException {
Expand All @@ -337,7 +337,7 @@ public void deleteTable(String id) throws ApiException {
*
* <p>See {@link #deleteTableWithHttpInfoAsync}.
*
* @param id The ID of the reference table to delete (required)
* @param id Unique identifier of the reference table to delete (required)
* @return CompletableFuture
*/
public CompletableFuture<Void> deleteTableAsync(String id) {
Expand All @@ -351,7 +351,7 @@ public CompletableFuture<Void> deleteTableAsync(String id) {
/**
* Delete a reference table by ID
*
* @param id The ID of the reference table to delete (required)
* @param id Unique identifier of the reference table to delete (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand Down Expand Up @@ -403,7 +403,7 @@ public ApiResponse<Void> deleteTableWithHttpInfo(String id) throws ApiException
*
* <p>See {@link #deleteTableWithHttpInfo}.
*
* @param id The ID of the reference table to delete (required)
* @param id Unique identifier of the reference table to delete (required)
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
public CompletableFuture<ApiResponse<Void>> deleteTableWithHttpInfoAsync(String id) {
Expand Down Expand Up @@ -455,7 +455,7 @@ public CompletableFuture<ApiResponse<Void>> deleteTableWithHttpInfoAsync(String
*
* <p>See {@link #getRowsByIDWithHttpInfo}.
*
* @param id The ID of the reference table (required)
* @param id Unique identifier of the reference table to get rows from (required)
* @param rowId List of row IDs (primary key values) to retrieve from the reference table.
* (required)
* @return TableRowResourceArray
Expand All @@ -470,7 +470,7 @@ public TableRowResourceArray getRowsByID(String id, List<String> rowId) throws A
*
* <p>See {@link #getRowsByIDWithHttpInfoAsync}.
*
* @param id The ID of the reference table (required)
* @param id Unique identifier of the reference table to get rows from (required)
* @param rowId List of row IDs (primary key values) to retrieve from the reference table.
* (required)
* @return CompletableFuture&lt;TableRowResourceArray&gt;
Expand All @@ -486,7 +486,7 @@ public CompletableFuture<TableRowResourceArray> getRowsByIDAsync(String id, List
/**
* Get reference table rows by their primary key values.
*
* @param id The ID of the reference table (required)
* @param id Unique identifier of the reference table to get rows from (required)
* @param rowId List of row IDs (primary key values) to retrieve from the reference table.
* (required)
* @return ApiResponse&lt;TableRowResourceArray&gt;
Expand Down Expand Up @@ -550,7 +550,7 @@ public ApiResponse<TableRowResourceArray> getRowsByIDWithHttpInfo(String id, Lis
*
* <p>See {@link #getRowsByIDWithHttpInfo}.
*
* @param id The ID of the reference table (required)
* @param id Unique identifier of the reference table to get rows from (required)
* @param rowId List of row IDs (primary key values) to retrieve from the reference table.
* (required)
* @return CompletableFuture&lt;ApiResponse&lt;TableRowResourceArray&gt;&gt;
Expand Down Expand Up @@ -616,7 +616,7 @@ public CompletableFuture<ApiResponse<TableRowResourceArray>> getRowsByIDWithHttp
*
* <p>See {@link #getTableWithHttpInfo}.
*
* @param id The ID of the reference table to retrieve (required)
* @param id Unique identifier of the reference table to retrieve (required)
* @return TableResultV2
* @throws ApiException if fails to make API call
*/
Expand All @@ -629,7 +629,7 @@ public TableResultV2 getTable(String id) throws ApiException {
*
* <p>See {@link #getTableWithHttpInfoAsync}.
*
* @param id The ID of the reference table to retrieve (required)
* @param id Unique identifier of the reference table to retrieve (required)
* @return CompletableFuture&lt;TableResultV2&gt;
*/
public CompletableFuture<TableResultV2> getTableAsync(String id) {
Expand All @@ -643,7 +643,7 @@ public CompletableFuture<TableResultV2> getTableAsync(String id) {
/**
* Get a reference table by ID
*
* @param id The ID of the reference table to retrieve (required)
* @param id Unique identifier of the reference table to retrieve (required)
* @return ApiResponse&lt;TableResultV2&gt;
* @throws ApiException if fails to make API call
* @http.response.details
Expand Down Expand Up @@ -695,7 +695,7 @@ public ApiResponse<TableResultV2> getTableWithHttpInfo(String id) throws ApiExce
*
* <p>See {@link #getTableWithHttpInfo}.
*
* @param id The ID of the reference table to retrieve (required)
* @param id Unique identifier of the reference table to retrieve (required)
* @return CompletableFuture&lt;ApiResponse&lt;TableResultV2&gt;&gt;
*/
public CompletableFuture<ApiResponse<TableResultV2>> getTableWithHttpInfoAsync(String id) {
Expand Down Expand Up @@ -776,8 +776,8 @@ public ListTablesOptionalParameters pageOffset(Long pageOffset) {
/**
* Set sort.
*
* @param sort Sort field and direction. Use field name for ascending, prefix with "-" for
* descending. (optional, default to "-updated_at")
* @param sort Sort field and direction for the list of reference tables. Use field name for
* ascending, prefix with "-" for descending. (optional, default to "-updated_at")
* @return ListTablesOptionalParameters
*/
public ListTablesOptionalParameters sort(ReferenceTableSortType sort) {
Expand Down Expand Up @@ -1000,7 +1000,7 @@ public CompletableFuture<ApiResponse<TableResultV2Array>> listTablesWithHttpInfo
*
* <p>See {@link #updateReferenceTableWithHttpInfo}.
*
* @param id The ID of the reference table to update (required)
* @param id Unique identifier of the reference table to update (required)
* @param body (required)
* @throws ApiException if fails to make API call
*/
Expand All @@ -1013,7 +1013,7 @@ public void updateReferenceTable(String id, PatchTableRequest body) throws ApiEx
*
* <p>See {@link #updateReferenceTableWithHttpInfoAsync}.
*
* @param id The ID of the reference table to update (required)
* @param id Unique identifier of the reference table to update (required)
* @param body (required)
* @return CompletableFuture
*/
Expand All @@ -1034,7 +1034,7 @@ public CompletableFuture<Void> updateReferenceTableAsync(String id, PatchTableRe
* types of <code>S3</code>, <code>GCS</code>, or <code>AZURE</code>, provide updated
* access_details in file_metadata pointing to a CSV file in the same type of cloud storage.
*
* @param id The ID of the reference table to update (required)
* @param id Unique identifier of the reference table to update (required)
* @param body (required)
* @return ApiResponse&lt;Void&gt;
* @throws ApiException if fails to make API call
Expand Down Expand Up @@ -1095,7 +1095,7 @@ public ApiResponse<Void> updateReferenceTableWithHttpInfo(String id, PatchTableR
*
* <p>See {@link #updateReferenceTableWithHttpInfo}.
*
* @param id The ID of the reference table to update (required)
* @param id Unique identifier of the reference table to update (required)
* @param body (required)
* @return CompletableFuture&lt;ApiResponse&lt;Void&gt;&gt;
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
import java.util.Map;
import java.util.Objects;

/** The definition of <code>CreateTableRequest</code> object. */
/** Request body for creating a new reference table from a local file or cloud storage. */
@JsonPropertyOrder({CreateTableRequest.JSON_PROPERTY_DATA})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -32,7 +32,7 @@ public CreateTableRequest data(CreateTableRequestData data) {
}

/**
* The definition of <code>CreateTableRequestData</code> object.
* The data object containing the table definition.
*
* @return data
*/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,21 +6,16 @@

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;

/** The definition of <code>CreateTableRequestData</code> object. */
/** The data object containing the table definition. */
@JsonPropertyOrder({
CreateTableRequestData.JSON_PROPERTY_ATTRIBUTES,
CreateTableRequestData.JSON_PROPERTY_ID,
CreateTableRequestData.JSON_PROPERTY_TYPE
})
@jakarta.annotation.Generated(
Expand All @@ -30,9 +25,6 @@ public class CreateTableRequestData {
public static final String JSON_PROPERTY_ATTRIBUTES = "attributes";
private CreateTableRequestDataAttributes attributes;

public static final String JSON_PROPERTY_ID = "id";
private String id;

public static final String JSON_PROPERTY_TYPE = "type";
private CreateTableRequestDataType type = CreateTableRequestDataType.REFERENCE_TABLE;

Expand All @@ -52,7 +44,7 @@ public CreateTableRequestData attributes(CreateTableRequestDataAttributes attrib
}

/**
* The definition of <code>CreateTableRequestDataAttributes</code> object.
* Attributes that define the reference table's configuration and properties.
*
* @return attributes
*/
Expand All @@ -67,27 +59,6 @@ public void setAttributes(CreateTableRequestDataAttributes attributes) {
this.attributes = attributes;
}

public CreateTableRequestData id(String id) {
this.id = id;
return this;
}

/**
* The ID of the reference table.
*
* @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 CreateTableRequestData type(CreateTableRequestDataType type) {
this.type = type;
this.unparsed |= !type.isValid();
Expand All @@ -112,52 +83,6 @@ public void setType(CreateTableRequestDataType type) {
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<String, Object> 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 CreateTableRequestData
*/
@JsonAnySetter
public CreateTableRequestData putAdditionalProperty(String key, Object value) {
if (this.additionalProperties == null) {
this.additionalProperties = new HashMap<String, Object>();
}
this.additionalProperties.put(key, value);
return this;
}

/**
* Return the additional (undeclared) property.
*
* @return The additional properties
*/
@JsonAnyGetter
public Map<String, Object> 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 CreateTableRequestData object is equal to o. */
@Override
public boolean equals(Object o) {
Expand All @@ -169,26 +94,20 @@ public boolean equals(Object o) {
}
CreateTableRequestData createTableRequestData = (CreateTableRequestData) o;
return Objects.equals(this.attributes, createTableRequestData.attributes)
&& Objects.equals(this.id, createTableRequestData.id)
&& Objects.equals(this.type, createTableRequestData.type)
&& Objects.equals(this.additionalProperties, createTableRequestData.additionalProperties);
&& Objects.equals(this.type, createTableRequestData.type);
}

@Override
public int hashCode() {
return Objects.hash(attributes, id, type, additionalProperties);
return Objects.hash(attributes, type);
}

@Override
public String toString() {
StringBuilder sb = new StringBuilder();
sb.append("class CreateTableRequestData {\n");
sb.append(" attributes: ").append(toIndentedString(attributes)).append("\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();
}
Expand Down
Loading
Loading