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
19 changes: 19 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -120748,6 +120748,19 @@ components:
description: The name of the feature flag.
example: "Updated Feature Flag XYZ789"
type: string
tags:
description: |-
Tags associated with the feature flag. This field replaces the full set of
existing tags; omit it to leave tags unchanged, or pass an empty array to
clear all tags. The owning team is set by including a tag of the form
`team:<team-handle>` in this array.
example: ["team:feature-flagging"]
items:
description: A tag associated with the feature flag.
maxLength: 200
type: string
maxItems: 100
type: array
type: object
UpdateFeatureFlagData:
description: Data for updating a feature flag.
Expand Down Expand Up @@ -149224,6 +149237,11 @@ paths:
description: |-
Updates an existing feature flag's metadata such as
name and description. Does not modify targeting rules or allocations.

To change the owning team, update `tags` and include a tag of the form
`team:<team-handle>` in the array. `tags` is a full replacement of the
existing tag set (including any `team:` tag), so include every tag you
want to keep, not just the ones you're adding.
operationId: UpdateFeatureFlag
parameters:
- $ref: "#/components/parameters/feature_flag_id"
Expand All @@ -149238,6 +149256,7 @@ paths:
description: Updated description for the feature flag
enabled: true
name: Updated Feature Flag XYZ789
tags: ["team:feature-flagging"]
type: feature-flags
schema:
$ref: "#/components/schemas/UpdateFeatureFlagRequest"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3206,6 +3206,11 @@ public CompletableFuture<FeatureFlagResponse> updateFeatureFlagAsync(
* Updates an existing feature flag's metadata such as name and description. Does not modify
* targeting rules or allocations.
*
* <p>To change the owning team, update <code>tags</code> and include a tag of the form <code>
* team:&lt;team-handle&gt;</code> in the array. <code>tags</code> is a full replacement of the
* existing tag set (including any <code>team:</code> tag), so include every tag you want to keep,
* not just the ones you're adding.
*
* @param featureFlagId The ID of the feature flag. (required)
* @param body (required)
* @return ApiResponse&lt;FeatureFlagResponse&gt;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;
Expand All @@ -21,7 +23,8 @@
@JsonPropertyOrder({
UpdateFeatureFlagAttributes.JSON_PROPERTY_DESCRIPTION,
UpdateFeatureFlagAttributes.JSON_PROPERTY_JSON_SCHEMA,
UpdateFeatureFlagAttributes.JSON_PROPERTY_NAME
UpdateFeatureFlagAttributes.JSON_PROPERTY_NAME,
UpdateFeatureFlagAttributes.JSON_PROPERTY_TAGS
})
@jakarta.annotation.Generated(
value = "https://github.com/DataDog/datadog-api-client-java/blob/master/.generator")
Expand All @@ -36,6 +39,9 @@ public class UpdateFeatureFlagAttributes {
public static final String JSON_PROPERTY_NAME = "name";
private String name;

public static final String JSON_PROPERTY_TAGS = "tags";
private List<String> tags = null;

public UpdateFeatureFlagAttributes description(String description) {
this.description = description;
return this;
Expand Down Expand Up @@ -109,6 +115,37 @@ public void setName(String name) {
this.name = name;
}

public UpdateFeatureFlagAttributes tags(List<String> tags) {
this.tags = tags;
return this;
}

public UpdateFeatureFlagAttributes addTagsItem(String tagsItem) {
if (this.tags == null) {
this.tags = new ArrayList<>();
}
this.tags.add(tagsItem);
return this;
}

/**
* Tags associated with the feature flag. This field replaces the full set of existing tags; omit
* it to leave tags unchanged, or pass an empty array to clear all tags. The owning team is set by
* including a tag of the form <code>team:&lt;team-handle&gt;</code> in this array.
*
* @return tags
*/
@jakarta.annotation.Nullable
@JsonProperty(JSON_PROPERTY_TAGS)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public List<String> getTags() {
return tags;
}

public void setTags(List<String> tags) {
this.tags = tags;
}

/**
* A container for additional, undeclared properties. This is a holder for any undeclared
* properties as specified with the 'additionalProperties' keyword in the OAS document.
Expand Down Expand Up @@ -168,13 +205,14 @@ public boolean equals(Object o) {
return Objects.equals(this.description, updateFeatureFlagAttributes.description)
&& Objects.equals(this.jsonSchema, updateFeatureFlagAttributes.jsonSchema)
&& Objects.equals(this.name, updateFeatureFlagAttributes.name)
&& Objects.equals(this.tags, updateFeatureFlagAttributes.tags)
&& Objects.equals(
this.additionalProperties, updateFeatureFlagAttributes.additionalProperties);
}

@Override
public int hashCode() {
return Objects.hash(description, jsonSchema, name, additionalProperties);
return Objects.hash(description, jsonSchema, name, tags, additionalProperties);
}

@Override
Expand All @@ -184,6 +222,7 @@ public String toString() {
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" jsonSchema: ").append(toIndentedString(jsonSchema)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" additionalProperties: ")
.append(toIndentedString(additionalProperties))
.append("\n");
Expand Down
Loading