Skip to content

Commit 0231604

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 6fd122c of spec repo
1 parent dcc8389 commit 0231604

15 files changed

+766
-78
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 84 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65653,6 +65653,8 @@ components:
6565365653
properties:
6565465654
frequency:
6565565655
$ref: "#/components/schemas/TeamSyncAttributesFrequency"
65656+
selection_state:
65657+
$ref: "#/components/schemas/TeamSyncAttributesSelectionState"
6565665658
source:
6565765659
$ref: "#/components/schemas/TeamSyncAttributesSource"
6565865660
sync_membership:
@@ -65675,6 +65677,14 @@ components:
6567565677
- ONCE
6567665678
- CONTINUOUSLY
6567765679
- PAUSED
65680+
TeamSyncAttributesSelectionState:
65681+
description: |-
65682+
Specifies which teams or organizations to sync. When
65683+
provided, synchronization is limited to the specified
65684+
items and their subtrees.
65685+
items:
65686+
$ref: "#/components/schemas/TeamSyncSelectionStateItem"
65687+
type: array
6567865688
TeamSyncAttributesSource:
6567965689
description: The external source platform for team synchronization. Only "github" is supported.
6568065690
enum:
@@ -65684,6 +65694,7 @@ components:
6568465694
x-enum-varnames:
6568565695
- GITHUB
6568665696
TeamSyncAttributesSyncMembership:
65697+
default: false
6568765698
description: Whether to sync members from the external team to the Datadog team. Defaults to `false` when not provided.
6568865699
example: true
6568965700
type: boolean
@@ -65743,6 +65754,72 @@ components:
6574365754
$ref: "#/components/schemas/TeamSyncData"
6574465755
type: array
6574565756
type: object
65757+
TeamSyncSelectionStateExternalId:
65758+
description: The external identifier for a team or organization in the source platform.
65759+
properties:
65760+
type:
65761+
$ref: "#/components/schemas/TeamSyncSelectionStateExternalIdType"
65762+
value:
65763+
$ref: "#/components/schemas/TeamSyncSelectionStateExternalIdValue"
65764+
required:
65765+
- type
65766+
- value
65767+
type: object
65768+
TeamSyncSelectionStateExternalIdType:
65769+
description: |-
65770+
The type of external identifier for the selection state item.
65771+
For GitHub synchronization, the allowed values are `team` and
65772+
`organization`.
65773+
enum:
65774+
- team
65775+
- organization
65776+
example: team
65777+
type: string
65778+
x-enum-varnames:
65779+
- TEAM
65780+
- ORGANIZATION
65781+
TeamSyncSelectionStateExternalIdValue:
65782+
description: |-
65783+
The external identifier value from the source
65784+
platform. For GitHub, this is the string
65785+
representation of a GitHub organization ID or team
65786+
ID.
65787+
example: "1"
65788+
type: string
65789+
TeamSyncSelectionStateItem:
65790+
description: Identifies a team or organization hierarchy to include in synchronization.
65791+
properties:
65792+
external_id:
65793+
$ref: "#/components/schemas/TeamSyncSelectionStateExternalId"
65794+
operation:
65795+
$ref: "#/components/schemas/TeamSyncSelectionStateOperation"
65796+
scope:
65797+
$ref: "#/components/schemas/TeamSyncSelectionStateScope"
65798+
required:
65799+
- external_id
65800+
type: object
65801+
TeamSyncSelectionStateOperation:
65802+
description: |-
65803+
The operation to perform on the selected hierarchy.
65804+
When set to `include`, synchronization covers the
65805+
referenced teams or organizations.
65806+
enum:
65807+
- include
65808+
example: include
65809+
type: string
65810+
x-enum-varnames:
65811+
- INCLUDE
65812+
TeamSyncSelectionStateScope:
65813+
description: |-
65814+
The scope of the selection. When set to `subtree`,
65815+
synchronization includes the referenced team or
65816+
organization and everything nested under it.
65817+
enum:
65818+
- subtree
65819+
example: subtree
65820+
type: string
65821+
x-enum-varnames:
65822+
- SUBTREE
6574665823
TeamTarget:
6574765824
description: "Represents a team target for an escalation policy step, including the team's ID and resource type."
6574865825
properties:
@@ -105047,12 +105124,6 @@ paths:
105047105124
description: OK
105048105125
"403":
105049105126
$ref: "#/components/responses/ForbiddenResponse"
105050-
"404":
105051-
content:
105052-
application/json:
105053-
schema:
105054-
$ref: "#/components/schemas/APIErrorResponse"
105055-
description: Team sync configurations not found
105056105127
"429":
105057105128
$ref: "#/components/responses/TooManyRequestsResponse"
105058105129
security:
@@ -105069,13 +105140,17 @@ paths:
105069105140
- teams_read
105070105141
post:
105071105142
description: |-
105072-
This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their names.
105143+
This endpoint configures synchronization between your existing Datadog teams and GitHub teams by matching their names.
105073105144
It evaluates all current Datadog teams and compares them against teams in the GitHub organization
105074105145
connected to your Datadog account, based on Datadog Team handle and GitHub Team slug
105075105146
(lowercased and kebab-cased).
105076105147

105077105148
This operation is read-only on the GitHub side, no teams will be modified or created.
105078105149

105150+
Optionally, provide `selection_state` to limit synchronization
105151+
to specific teams or organizations and their subtrees, instead
105152+
of syncing all teams.
105153+
105079105154
[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
105080105155
and the GitHub App integrated with Datadog must have the `Members Read` permission. Matching is performed by comparing the Datadog team handle to the GitHub team slug
105081105156
using a normalized exact match; case is ignored and spaces are removed. No modifications are made
@@ -105090,6 +105165,8 @@ paths:
105090105165
responses:
105091105166
"200":
105092105167
description: OK
105168+
"204":
105169+
description: No Content
105093105170
"403":
105094105171
$ref: "#/components/responses/ForbiddenResponse"
105095105172
"429":

examples/v2/teams/SyncTeams_3215592344.java

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/main/java/com/datadog/api/client/v2/api/TeamsApi.java

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3211,7 +3211,6 @@ public CompletableFuture<TeamSyncResponse> getTeamSyncAsync(
32113211
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
32123212
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
32133213
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
3214-
* <tr><td> 404 </td><td> Team sync configurations not found </td><td> - </td></tr>
32153214
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
32163215
* </table>
32173216
*/
@@ -5019,13 +5018,16 @@ public CompletableFuture<Void> syncTeamsAsync(TeamSyncRequest body) {
50195018
}
50205019

50215020
/**
5022-
* This endpoint attempts to link your existing Datadog teams with GitHub teams by matching their
5023-
* names. It evaluates all current Datadog teams and compares them against teams in the GitHub
5024-
* organization connected to your Datadog account, based on Datadog Team handle and GitHub Team
5025-
* slug (lowercased and kebab-cased).
5021+
* This endpoint configures synchronization between your existing Datadog teams and GitHub teams
5022+
* by matching their names. It evaluates all current Datadog teams and compares them against teams
5023+
* in the GitHub organization connected to your Datadog account, based on Datadog Team handle and
5024+
* GitHub Team slug (lowercased and kebab-cased).
50265025
*
50275026
* <p>This operation is read-only on the GitHub side, no teams will be modified or created.
50285027
*
5028+
* <p>Optionally, provide <code>selection_state</code> to limit synchronization to specific teams
5029+
* or organizations and their subtrees, instead of syncing all teams.
5030+
*
50295031
* <p><a href="https://docs.datadoghq.com/integrations/github/">A GitHub organization must be
50305032
* connected to your Datadog account</a>, and the GitHub App integrated with Datadog must have the
50315033
* <code>Members Read</code> permission. Matching is performed by comparing the Datadog team
@@ -5041,6 +5043,7 @@ public CompletableFuture<Void> syncTeamsAsync(TeamSyncRequest body) {
50415043
* <caption>Response details</caption>
50425044
* <tr><td> Status Code </td><td> Description </td><td> Response Headers </td></tr>
50435045
* <tr><td> 200 </td><td> OK </td><td> - </td></tr>
5046+
* <tr><td> 204 </td><td> No Content </td><td> - </td></tr>
50445047
* <tr><td> 403 </td><td> Forbidden </td><td> - </td></tr>
50455048
* <tr><td> 429 </td><td> Too many requests </td><td> - </td></tr>
50465049
* <tr><td> 500 </td><td> Internal Server Error - Unexpected error during linking. </td><td> - </td></tr>

src/main/java/com/datadog/api/client/v2/model/TeamSyncAttributes.java

Lines changed: 45 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,16 @@
1313
import com.fasterxml.jackson.annotation.JsonInclude;
1414
import com.fasterxml.jackson.annotation.JsonProperty;
1515
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
16+
import java.util.ArrayList;
1617
import java.util.HashMap;
18+
import java.util.List;
1719
import java.util.Map;
1820
import java.util.Objects;
1921

2022
/** Team sync attributes. */
2123
@JsonPropertyOrder({
2224
TeamSyncAttributes.JSON_PROPERTY_FREQUENCY,
25+
TeamSyncAttributes.JSON_PROPERTY_SELECTION_STATE,
2326
TeamSyncAttributes.JSON_PROPERTY_SOURCE,
2427
TeamSyncAttributes.JSON_PROPERTY_SYNC_MEMBERSHIP,
2528
TeamSyncAttributes.JSON_PROPERTY_TYPE
@@ -31,11 +34,14 @@ public class TeamSyncAttributes {
3134
public static final String JSON_PROPERTY_FREQUENCY = "frequency";
3235
private TeamSyncAttributesFrequency frequency;
3336

37+
public static final String JSON_PROPERTY_SELECTION_STATE = "selection_state";
38+
private List<TeamSyncSelectionStateItem> selectionState = null;
39+
3440
public static final String JSON_PROPERTY_SOURCE = "source";
3541
private TeamSyncAttributesSource source;
3642

3743
public static final String JSON_PROPERTY_SYNC_MEMBERSHIP = "sync_membership";
38-
private Boolean syncMembership;
44+
private Boolean syncMembership = false;
3945

4046
public static final String JSON_PROPERTY_TYPE = "type";
4147
private TeamSyncAttributesType type;
@@ -77,6 +83,40 @@ public void setFrequency(TeamSyncAttributesFrequency frequency) {
7783
this.frequency = frequency;
7884
}
7985

86+
public TeamSyncAttributes selectionState(List<TeamSyncSelectionStateItem> selectionState) {
87+
this.selectionState = selectionState;
88+
for (TeamSyncSelectionStateItem item : selectionState) {
89+
this.unparsed |= item.unparsed;
90+
}
91+
return this;
92+
}
93+
94+
public TeamSyncAttributes addSelectionStateItem(TeamSyncSelectionStateItem selectionStateItem) {
95+
if (this.selectionState == null) {
96+
this.selectionState = new ArrayList<>();
97+
}
98+
this.selectionState.add(selectionStateItem);
99+
this.unparsed |= selectionStateItem.unparsed;
100+
return this;
101+
}
102+
103+
/**
104+
* Specifies which teams or organizations to sync. When provided, synchronization is limited to
105+
* the specified items and their subtrees.
106+
*
107+
* @return selectionState
108+
*/
109+
@jakarta.annotation.Nullable
110+
@JsonProperty(JSON_PROPERTY_SELECTION_STATE)
111+
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
112+
public List<TeamSyncSelectionStateItem> getSelectionState() {
113+
return selectionState;
114+
}
115+
116+
public void setSelectionState(List<TeamSyncSelectionStateItem> selectionState) {
117+
this.selectionState = selectionState;
118+
}
119+
80120
public TeamSyncAttributes source(TeamSyncAttributesSource source) {
81121
this.source = source;
82122
this.unparsed |= !source.isValid();
@@ -205,6 +245,7 @@ public boolean equals(Object o) {
205245
}
206246
TeamSyncAttributes teamSyncAttributes = (TeamSyncAttributes) o;
207247
return Objects.equals(this.frequency, teamSyncAttributes.frequency)
248+
&& Objects.equals(this.selectionState, teamSyncAttributes.selectionState)
208249
&& Objects.equals(this.source, teamSyncAttributes.source)
209250
&& Objects.equals(this.syncMembership, teamSyncAttributes.syncMembership)
210251
&& Objects.equals(this.type, teamSyncAttributes.type)
@@ -213,14 +254,16 @@ public boolean equals(Object o) {
213254

214255
@Override
215256
public int hashCode() {
216-
return Objects.hash(frequency, source, syncMembership, type, additionalProperties);
257+
return Objects.hash(
258+
frequency, selectionState, source, syncMembership, type, additionalProperties);
217259
}
218260

219261
@Override
220262
public String toString() {
221263
StringBuilder sb = new StringBuilder();
222264
sb.append("class TeamSyncAttributes {\n");
223265
sb.append(" frequency: ").append(toIndentedString(frequency)).append("\n");
266+
sb.append(" selectionState: ").append(toIndentedString(selectionState)).append("\n");
224267
sb.append(" source: ").append(toIndentedString(source)).append("\n");
225268
sb.append(" syncMembership: ").append(toIndentedString(syncMembership)).append("\n");
226269
sb.append(" type: ").append(toIndentedString(type)).append("\n");

0 commit comments

Comments
 (0)