Skip to content

Commit 75c12de

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit fa4e06b of spec repo
1 parent 865f960 commit 75c12de

File tree

10 files changed

+194
-235
lines changed

10 files changed

+194
-235
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 71 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -47239,6 +47239,49 @@ components:
4723947239
type: string
4724047240
x-enum-varnames:
4724147241
- PROCESS
47242+
ProductAnalyticsAccount:
47243+
description: The account linked to your event.
47244+
properties:
47245+
id:
47246+
description: The account ID used in Datadog.
47247+
example: account-67890
47248+
type: string
47249+
required:
47250+
- id
47251+
type: object
47252+
ProductAnalyticsApplication:
47253+
description: The application in which you want to send your events.
47254+
properties:
47255+
id:
47256+
description: 'The application ID of your application. It can be found in
47257+
your
47258+
47259+
[application management page](https://app.datadoghq.com/rum/list).'
47260+
example: 123abcde-123a-123b-1234-123456789abc
47261+
type: string
47262+
required:
47263+
- id
47264+
type: object
47265+
ProductAnalyticsEvent:
47266+
description: Fields used for the event.
47267+
properties:
47268+
name:
47269+
description: The name of your event, which is used for search in the same
47270+
way as view or action names.
47271+
example: payment.processed
47272+
type: string
47273+
required:
47274+
- name
47275+
type: object
47276+
ProductAnalyticsEventType:
47277+
description: The type of Product Analytics event. Must be `server` for server-side
47278+
events.
47279+
enum:
47280+
- server
47281+
example: server
47282+
type: string
47283+
x-enum-varnames:
47284+
- SERVER
4724247285
ProductAnalyticsServerSideEventError:
4724347286
description: Error details.
4724447287
properties:
@@ -47265,60 +47308,33 @@ components:
4726547308
type: array
4726647309
type: object
4726747310
ProductAnalyticsServerSideEventItem:
47311+
additionalProperties:
47312+
description: 'Any additional facet you want to be able to use when searching
47313+
for events in Datadog.
47314+
47315+
These are flattened. For example, `{"customer": {"tier": "premium"}}` is
47316+
47317+
searchable with the syntax `@customer.tier:premium` in Datadog.'
4726847318
description: A Product Analytics server-side event.
4726947319
properties:
4727047320
account:
47271-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemAccount'
47321+
$ref: '#/components/schemas/ProductAnalyticsAccount'
4727247322
application:
47273-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemApplication'
47323+
$ref: '#/components/schemas/ProductAnalyticsApplication'
4727447324
event:
47275-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemEvent'
47325+
$ref: '#/components/schemas/ProductAnalyticsEvent'
4727647326
session:
47277-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemSession'
47327+
$ref: '#/components/schemas/ProductAnalyticsSession'
4727847328
type:
47279-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemType'
47329+
$ref: '#/components/schemas/ProductAnalyticsEventType'
4728047330
usr:
47281-
$ref: '#/components/schemas/ProductAnalyticsServerSideEventItemUsr'
47331+
$ref: '#/components/schemas/ProductAnalyticsUser'
4728247332
required:
4728347333
- application
4728447334
- event
4728547335
- type
4728647336
type: object
47287-
ProductAnalyticsServerSideEventItemAccount:
47288-
description: The account linked to your event.
47289-
properties:
47290-
id:
47291-
description: The account ID used in Datadog.
47292-
example: account-67890
47293-
type: string
47294-
required:
47295-
- id
47296-
type: object
47297-
ProductAnalyticsServerSideEventItemApplication:
47298-
description: The application in which you want to send your events.
47299-
properties:
47300-
id:
47301-
description: 'The application ID of your application. It can be found in
47302-
your
47303-
47304-
[application management page](https://app.datadoghq.com/rum/list).'
47305-
example: 123abcde-123a-123b-1234-123456789abc
47306-
type: string
47307-
required:
47308-
- id
47309-
type: object
47310-
ProductAnalyticsServerSideEventItemEvent:
47311-
description: Fields used for the event.
47312-
properties:
47313-
name:
47314-
description: The name of your event, which is used for search in the same
47315-
way as view or action names.
47316-
example: payment.processed
47317-
type: string
47318-
required:
47319-
- name
47320-
type: object
47321-
ProductAnalyticsServerSideEventItemSession:
47337+
ProductAnalyticsSession:
4732247338
description: The session linked to your event.
4732347339
properties:
4732447340
id:
@@ -47328,16 +47344,7 @@ components:
4732847344
required:
4732947345
- id
4733047346
type: object
47331-
ProductAnalyticsServerSideEventItemType:
47332-
description: The type of Product Analytics event. Must be `server` for server-side
47333-
events.
47334-
enum:
47335-
- server
47336-
example: server
47337-
type: string
47338-
x-enum-varnames:
47339-
- SERVER
47340-
ProductAnalyticsServerSideEventItemUsr:
47347+
ProductAnalyticsUser:
4734147348
description: The user linked to your event.
4734247349
properties:
4734347350
id:
@@ -91322,21 +91329,18 @@ paths:
9132291329
security:
9132391330
- apiKeyAuth: []
9132491331
servers:
91325-
- url: https://{subdomain}.{site}
91332+
- url: https://{name}
9132691333
variables:
91327-
site:
91328-
default: datadoghq.com
91329-
description: The regional site for customers.
91334+
name:
91335+
default: browser-intake-datadoghq.com
91336+
description: The intake domain for the regional site.
9133091337
enum:
91331-
- datadoghq.com
91332-
- us3.datadoghq.com
91333-
- us5.datadoghq.com
91334-
- ap1.datadoghq.com
91335-
- ap2.datadoghq.com
91336-
- datadoghq.eu
91337-
subdomain:
91338-
default: browser-intake
91339-
description: The subdomain where the API is deployed.
91338+
- browser-intake-datadoghq.com
91339+
- browser-intake-us3-datadoghq.com
91340+
- browser-intake-us5-datadoghq.com
91341+
- browser-intake-ap1-datadoghq.com
91342+
- browser-intake-ap2-datadoghq.com
91343+
- browser-intake-datadoghq.eu
9134091344
- url: '{protocol}://{name}'
9134191345
variables:
9134291346
name:
@@ -91345,14 +91349,11 @@ paths:
9134591349
protocol:
9134691350
default: https
9134791351
description: The protocol for accessing the API.
91348-
- url: https://{subdomain}.{site}
91352+
- url: https://{name}
9134991353
variables:
91350-
site:
91351-
default: datadoghq.com
91354+
name:
91355+
default: browser-intake-datadoghq.com
9135291356
description: Any Datadog deployment.
91353-
subdomain:
91354-
default: browser-intake
91355-
description: The subdomain where the API is deployed.
9135691357
summary: Send server-side events
9135791358
tags:
9135891359
- Product Analytics

examples/v2/product-analytics/SubmitProductAnalyticsEvent.java

Lines changed: 12 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@
44
import com.datadog.api.client.ApiClient;
55
import com.datadog.api.client.ApiException;
66
import com.datadog.api.client.v2.api.ProductAnalyticsApi;
7+
import com.datadog.api.client.v2.model.ProductAnalyticsAccount;
8+
import com.datadog.api.client.v2.model.ProductAnalyticsApplication;
9+
import com.datadog.api.client.v2.model.ProductAnalyticsEvent;
10+
import com.datadog.api.client.v2.model.ProductAnalyticsEventType;
711
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItem;
8-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemAccount;
9-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemApplication;
10-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemEvent;
11-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemSession;
12-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemType;
13-
import com.datadog.api.client.v2.model.ProductAnalyticsServerSideEventItemUsr;
12+
import com.datadog.api.client.v2.model.ProductAnalyticsSession;
13+
import com.datadog.api.client.v2.model.ProductAnalyticsUser;
1414

1515
public class Example {
1616
public static void main(String[] args) {
@@ -19,14 +19,13 @@ public static void main(String[] args) {
1919

2020
ProductAnalyticsServerSideEventItem body =
2121
new ProductAnalyticsServerSideEventItem()
22-
.account(new ProductAnalyticsServerSideEventItemAccount().id("account-67890"))
22+
.account(new ProductAnalyticsAccount().id("account-67890"))
2323
.application(
24-
new ProductAnalyticsServerSideEventItemApplication()
25-
.id("123abcde-123a-123b-1234-123456789abc"))
26-
.event(new ProductAnalyticsServerSideEventItemEvent().name("payment.processed"))
27-
.session(new ProductAnalyticsServerSideEventItemSession().id("session-abcdef"))
28-
.type(ProductAnalyticsServerSideEventItemType.SERVER)
29-
.usr(new ProductAnalyticsServerSideEventItemUsr().id("user-12345"));
24+
new ProductAnalyticsApplication().id("123abcde-123a-123b-1234-123456789abc"))
25+
.event(new ProductAnalyticsEvent().name("payment.processed"))
26+
.session(new ProductAnalyticsSession().id("session-abcdef"))
27+
.type(ProductAnalyticsEventType.SERVER)
28+
.usr(new ProductAnalyticsUser().id("user-12345"));
3029

3130
try {
3231
apiInstance.submitProductAnalyticsEvent(body);

src/main/java/com/datadog/api/client/ApiClient.java

Lines changed: 13 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -671,29 +671,23 @@ public class ApiClient {
671671
new ArrayList<ServerConfiguration>(
672672
Arrays.asList(
673673
new ServerConfiguration(
674-
"https://{subdomain}.{site}",
674+
"https://{name}",
675675
"No description provided",
676676
new HashMap<String, ServerVariable>() {
677677
{
678678
put(
679-
"site",
679+
"name",
680680
new ServerVariable(
681-
"The regional site for customers.",
682-
"datadoghq.com",
681+
"The intake domain for the regional site.",
682+
"browser-intake-datadoghq.com",
683683
new HashSet<String>(
684684
Arrays.asList(
685-
"datadoghq.com",
686-
"us3.datadoghq.com",
687-
"us5.datadoghq.com",
688-
"ap1.datadoghq.com",
689-
"ap2.datadoghq.com",
690-
"datadoghq.eu"))));
691-
put(
692-
"subdomain",
693-
new ServerVariable(
694-
"The subdomain where the API is deployed.",
695-
"browser-intake",
696-
new HashSet<String>()));
685+
"browser-intake-datadoghq.com",
686+
"browser-intake-us3-datadoghq.com",
687+
"browser-intake-us5-datadoghq.com",
688+
"browser-intake-ap1-datadoghq.com",
689+
"browser-intake-ap2-datadoghq.com",
690+
"browser-intake-datadoghq.eu"))));
697691
}
698692
}),
699693
new ServerConfiguration(
@@ -716,21 +710,15 @@ public class ApiClient {
716710
}
717711
}),
718712
new ServerConfiguration(
719-
"https://{subdomain}.{site}",
713+
"https://{name}",
720714
"No description provided",
721715
new HashMap<String, ServerVariable>() {
722716
{
723717
put(
724-
"site",
718+
"name",
725719
new ServerVariable(
726720
"Any Datadog deployment.",
727-
"datadoghq.com",
728-
new HashSet<String>()));
729-
put(
730-
"subdomain",
731-
new ServerVariable(
732-
"The subdomain where the API is deployed.",
733-
"browser-intake",
721+
"browser-intake-datadoghq.com",
734722
new HashSet<String>()));
735723
}
736724
}))));

src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsServerSideEventItemAccount.java renamed to src/main/java/com/datadog/api/client/v2/model/ProductAnalyticsAccount.java

Lines changed: 12 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -18,23 +18,23 @@
1818
import java.util.Objects;
1919

2020
/** The account linked to your event. */
21-
@JsonPropertyOrder({ProductAnalyticsServerSideEventItemAccount.JSON_PROPERTY_ID})
21+
@JsonPropertyOrder({ProductAnalyticsAccount.JSON_PROPERTY_ID})
2222
@jakarta.annotation.Generated(
2323
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
24-
public class ProductAnalyticsServerSideEventItemAccount {
24+
public class ProductAnalyticsAccount {
2525
@JsonIgnore public boolean unparsed = false;
2626
public static final String JSON_PROPERTY_ID = "id";
2727
private String id;
2828

29-
public ProductAnalyticsServerSideEventItemAccount() {}
29+
public ProductAnalyticsAccount() {}
3030

3131
@JsonCreator
32-
public ProductAnalyticsServerSideEventItemAccount(
32+
public ProductAnalyticsAccount(
3333
@JsonProperty(required = true, value = JSON_PROPERTY_ID) String id) {
3434
this.id = id;
3535
}
3636

37-
public ProductAnalyticsServerSideEventItemAccount id(String id) {
37+
public ProductAnalyticsAccount id(String id) {
3838
this.id = id;
3939
return this;
4040
}
@@ -66,11 +66,10 @@ public void setId(String id) {
6666
*
6767
* @param key The arbitrary key to set
6868
* @param value The associated value
69-
* @return ProductAnalyticsServerSideEventItemAccount
69+
* @return ProductAnalyticsAccount
7070
*/
7171
@JsonAnySetter
72-
public ProductAnalyticsServerSideEventItemAccount putAdditionalProperty(
73-
String key, Object value) {
72+
public ProductAnalyticsAccount putAdditionalProperty(String key, Object value) {
7473
if (this.additionalProperties == null) {
7574
this.additionalProperties = new HashMap<String, Object>();
7675
}
@@ -101,7 +100,7 @@ public Object getAdditionalProperty(String key) {
101100
return this.additionalProperties.get(key);
102101
}
103102

104-
/** Return true if this ProductAnalyticsServerSideEventItemAccount object is equal to o. */
103+
/** Return true if this ProductAnalyticsAccount object is equal to o. */
105104
@Override
106105
public boolean equals(Object o) {
107106
if (this == o) {
@@ -110,12 +109,9 @@ public boolean equals(Object o) {
110109
if (o == null || getClass() != o.getClass()) {
111110
return false;
112111
}
113-
ProductAnalyticsServerSideEventItemAccount productAnalyticsServerSideEventItemAccount =
114-
(ProductAnalyticsServerSideEventItemAccount) o;
115-
return Objects.equals(this.id, productAnalyticsServerSideEventItemAccount.id)
116-
&& Objects.equals(
117-
this.additionalProperties,
118-
productAnalyticsServerSideEventItemAccount.additionalProperties);
112+
ProductAnalyticsAccount productAnalyticsAccount = (ProductAnalyticsAccount) o;
113+
return Objects.equals(this.id, productAnalyticsAccount.id)
114+
&& Objects.equals(this.additionalProperties, productAnalyticsAccount.additionalProperties);
119115
}
120116

121117
@Override
@@ -126,7 +122,7 @@ public int hashCode() {
126122
@Override
127123
public String toString() {
128124
StringBuilder sb = new StringBuilder();
129-
sb.append("class ProductAnalyticsServerSideEventItemAccount {\n");
125+
sb.append("class ProductAnalyticsAccount {\n");
130126
sb.append(" id: ").append(toIndentedString(id)).append("\n");
131127
sb.append(" additionalProperties: ")
132128
.append(toIndentedString(additionalProperties))

0 commit comments

Comments
 (0)