Skip to content

Commit cbdabf7

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit 988555f of spec repo
1 parent 2cf92db commit cbdabf7

15 files changed

+769
-72
lines changed

.generator/schemas/v2/openapi.yaml

Lines changed: 92 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -68031,6 +68031,8 @@ components:
6803168031
properties:
6803268032
frequency:
6803368033
$ref: '#/components/schemas/TeamSyncAttributesFrequency'
68034+
selection_state:
68035+
$ref: '#/components/schemas/TeamSyncAttributesSelectionState'
6803468036
source:
6803568037
$ref: '#/components/schemas/TeamSyncAttributesSource'
6803668038
sync_membership:
@@ -68054,6 +68056,15 @@ components:
6805468056
- ONCE
6805568057
- CONTINUOUSLY
6805668058
- PAUSED
68059+
TeamSyncAttributesSelectionState:
68060+
description: 'Specifies which teams or organizations to sync. When
68061+
68062+
provided, synchronization is limited to the specified
68063+
68064+
items and their subtrees.'
68065+
items:
68066+
$ref: '#/components/schemas/TeamSyncSelectionStateItem'
68067+
type: array
6805768068
TeamSyncAttributesSource:
6805868069
description: The external source platform for team synchronization. Only "github"
6805968070
is supported.
@@ -68126,6 +68137,78 @@ components:
6812668137
$ref: '#/components/schemas/TeamSyncData'
6812768138
type: array
6812868139
type: object
68140+
TeamSyncSelectionStateExternalId:
68141+
description: The external identifier for a team or organization in the source
68142+
platform.
68143+
properties:
68144+
type:
68145+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalIdType'
68146+
value:
68147+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalIdValue'
68148+
required:
68149+
- type
68150+
- value
68151+
type: object
68152+
TeamSyncSelectionStateExternalIdType:
68153+
description: 'The type of external identifier for the selection state item.
68154+
68155+
For GitHub synchronization, the allowed values are `team` and
68156+
68157+
`organization`.'
68158+
enum:
68159+
- team
68160+
- organization
68161+
example: team
68162+
type: string
68163+
x-enum-varnames:
68164+
- TEAM
68165+
- ORGANIZATION
68166+
TeamSyncSelectionStateExternalIdValue:
68167+
description: 'The external identifier value from the source
68168+
68169+
platform. For GitHub, this is the string
68170+
68171+
representation of a GitHub organization ID or team
68172+
68173+
ID.'
68174+
example: '1'
68175+
type: string
68176+
TeamSyncSelectionStateItem:
68177+
description: Identifies a team or organization hierarchy to include in synchronization.
68178+
properties:
68179+
external_id:
68180+
$ref: '#/components/schemas/TeamSyncSelectionStateExternalId'
68181+
operation:
68182+
$ref: '#/components/schemas/TeamSyncSelectionStateOperation'
68183+
scope:
68184+
$ref: '#/components/schemas/TeamSyncSelectionStateScope'
68185+
required:
68186+
- external_id
68187+
type: object
68188+
TeamSyncSelectionStateOperation:
68189+
description: 'The operation to perform on the selected hierarchy.
68190+
68191+
When set to `include`, synchronization covers the
68192+
68193+
referenced teams or organizations.'
68194+
enum:
68195+
- include
68196+
example: include
68197+
type: string
68198+
x-enum-varnames:
68199+
- INCLUDE
68200+
TeamSyncSelectionStateScope:
68201+
description: 'The scope of the selection. When set to `subtree`,
68202+
68203+
synchronization includes the referenced team or
68204+
68205+
organization and everything nested under it.'
68206+
enum:
68207+
- subtree
68208+
example: subtree
68209+
type: string
68210+
x-enum-varnames:
68211+
- SUBTREE
6812968212
TeamTarget:
6813068213
description: Represents a team target for an escalation policy step, including
6813168214
the team's ID and resource type.
@@ -107597,12 +107680,6 @@ paths:
107597107680
description: OK
107598107681
'403':
107599107682
$ref: '#/components/responses/ForbiddenResponse'
107600-
'404':
107601-
content:
107602-
application/json:
107603-
schema:
107604-
$ref: '#/components/schemas/APIErrorResponse'
107605-
description: Team sync configurations not found
107606107683
'429':
107607107684
$ref: '#/components/responses/TooManyRequestsResponse'
107608107685
security:
@@ -107634,6 +107711,13 @@ paths:
107634107711
or created.
107635107712

107636107713

107714+
Optionally, provide `selection_state` to limit synchronization
107715+
107716+
to specific teams or organizations and their subtrees, instead
107717+
107718+
of syncing all teams.
107719+
107720+
107637107721
[A GitHub organization must be connected to your Datadog account](https://docs.datadoghq.com/integrations/github/),
107638107722

107639107723
and the GitHub App integrated with Datadog must have the `Members Read` permission.
@@ -107655,6 +107739,8 @@ paths:
107655107739
responses:
107656107740
'200':
107657107741
description: OK
107742+
'204':
107743+
description: No Content
107658107744
'403':
107659107745
$ref: '#/components/responses/ForbiddenResponse'
107660107746
'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: 4 additions & 1 deletion
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
*/
@@ -5026,6 +5025,9 @@ public CompletableFuture<Void> syncTeamsAsync(TeamSyncRequest body) {
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: 44 additions & 1 deletion
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,6 +34,9 @@ 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

@@ -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)