Skip to content

Commit

Permalink
Automated SDK update
Browse files Browse the repository at this point in the history
This updates the SDK from internal repo commit segmentio/public-api@f3f82ca1.
  • Loading branch information
APIs and Common Services team committed Dec 9, 2024
1 parent 5a97da1 commit bd56042
Show file tree
Hide file tree
Showing 11 changed files with 1,252 additions and 7 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ All endpoints in the API follow REST conventions and use standard HTTP methods.

See the next sections for more information on how to use the Segment Public API Java SDK.

Latest API and SDK version: 57.1.0
Latest API and SDK version: 57.2.0

## Requirements

Expand All @@ -28,7 +28,7 @@ Add this dependency to your project's POM:
<dependency>
<groupId>com.segment.publicapi</groupId>
<artifactId>segment-publicapi</artifactId>
<version>57.1.0</version>
<version>57.2.0</version>
<scope>compile</scope>
</dependency>
```
Expand All @@ -44,7 +44,7 @@ Add this dependency to your project's build file:
}
dependencies {
implementation "com.segment.publicapi:segment-publicapi:57.1.0"
implementation "com.segment.publicapi:segment-publicapi:57.2.0"
}
```

Expand All @@ -58,7 +58,7 @@ mvn clean package

Then manually install the following JARs:

* `target/segment-publicapi-57.1.0.jar`
* `target/segment-publicapi-57.2.0.jar`
* `target/lib/*.jar`

You are now ready to start making calls to Public API!
Expand Down
82 changes: 82 additions & 0 deletions docs/DbtApi.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# DbtApi

All URIs are relative to *https://api.segmentapis.com*

| Method | HTTP request | Description |
|------------- | ------------- | -------------|
| [**createDbtModelSyncTrigger**](DbtApi.md#createDbtModelSyncTrigger) | **POST** /dbt-model-syncs/trigger | Create Dbt Model Sync Trigger |



## Operation: createDbtModelSyncTrigger

> CreateDbtModelSyncTrigger200Response createDbtModelSyncTrigger(createDbtModelSyncTriggerInput)
Create Dbt Model Sync Trigger

Creates a trigger for a new dbt model sync for a Source. The rate limit for this endpoint is 10 requests per minute, which is lower than the default due to access pattern restrictions. Once reached, this endpoint will respond with the 429 HTTP status code with headers indicating the limit parameters. See [Rate Limiting](/#tag/Rate-Limits) for more information.

### Example

```java
// Import classes:
import com.segment.publicapi.ApiClient;
import com.segment.publicapi.ApiException;
import com.segment.publicapi.Configuration;
import com.segment.publicapi.auth.*;
import com.segment.publicapi.models.*;
import com.segment.publicapi.api.DbtApi;

public class Example {
public static void main(String[] args) {
ApiClient defaultClient = Configuration.getDefaultApiClient();

// Configure HTTP bearer authorization: token
HttpBearerAuth token = (HttpBearerAuth) defaultClient.getAuthentication("token");
token.setBearerToken("BEARER TOKEN");

DbtApi apiInstance = new DbtApi(defaultClient);
CreateDbtModelSyncTriggerInput createDbtModelSyncTriggerInput = new CreateDbtModelSyncTriggerInput(); // CreateDbtModelSyncTriggerInput |
try {
CreateDbtModelSyncTrigger200Response result = apiInstance.createDbtModelSyncTrigger(createDbtModelSyncTriggerInput);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling DbtApi#createDbtModelSyncTrigger");
System.err.println("Status code: " + e.getCode());
System.err.println("Reason: " + e.getResponseBody());
System.err.println("Response headers: " + e.getResponseHeaders());
e.printStackTrace();
}
}
}
```

### Parameters


| Name | Type | Description | Notes |
|------------- | ------------- | ------------- | -------------|
| **createDbtModelSyncTriggerInput** | [**CreateDbtModelSyncTriggerInput**](CreateDbtModelSyncTriggerInput.md)| | |

### Return type

[**CreateDbtModelSyncTrigger200Response**](CreateDbtModelSyncTrigger200Response.md)

### Authorization

[token](../README.md#token)

### HTTP request headers

- **Content-Type**: application/vnd.segment.v1beta+json
- **Accept**: application/vnd.segment.v1beta+json, application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
| **200** | OK | - |
| **404** | Resource not found | - |
| **422** | Validation failure | - |
| **429** | Too many requests | - |

2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<artifactId>segment-publicapi</artifactId>
<packaging>jar</packaging>
<name>segment-publicapi</name>
<version>57.1.0</version>
<version>57.2.0</version>
<url>https://segment.com/docs/api/public-api/</url>
<description>Segment Public API</description>
<scm>
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/segment/publicapi/ApiClient.java
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ private void init() {
json = new JSON();

// Set default User-Agent.
setUserAgent("Public API SDK 57.1.0 (Java)");
setUserAgent("Public API SDK 57.2.0 (Java)");

authentications = new HashMap<String, Authentication>();
}
Expand Down
2 changes: 1 addition & 1 deletion src/main/java/com/segment/publicapi/Configuration.java
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
package com.segment.publicapi;

public class Configuration {
public static final String VERSION = "57.1.0";
public static final String VERSION = "57.2.0";

private static ApiClient defaultApiClient = new ApiClient();

Expand Down
11 changes: 11 additions & 0 deletions src/main/java/com/segment/publicapi/JSON.java
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,15 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateComputedTraitAlphaOutput
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateDbtModelSyncTrigger200Response
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateDbtModelSyncTriggerInput
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateDbtModelSyncTriggerOutput
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateDestination200Response
.CustomTypeAdapterFactory());
Expand Down Expand Up @@ -427,6 +436,8 @@ private static Class getClassByDiscriminator(
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.CreateWriteKeyForSourceAlphaOutput
.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.DbtModelSyncTrigger.CustomTypeAdapterFactory());
gsonBuilder.registerTypeAdapterFactory(
new com.segment.publicapi.models.DeleteDestination200Response
.CustomTypeAdapterFactory());
Expand Down
Loading

0 comments on commit bd56042

Please sign in to comment.