Skip to content
Merged
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
28 changes: 28 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -18761,6 +18761,13 @@ components:
format: date-time
readOnly: true
type: string
date_last_used:
description: Date the API Key was last used
example: '2020-11-27T10:00:00.000Z'
format: date-time
nullable: true
readOnly: true
type: string
key:
description: The API key.
readOnly: true
Expand Down Expand Up @@ -18819,6 +18826,13 @@ components:
minLength: 4
readOnly: true
type: string
last_used_at:
description: Last usage timestamp of the application key.
example: '2020-12-20T10:00:00.000Z'
format: date-time
nullable: true
readOnly: true
type: string
name:
description: Name of the application key.
example: Application Key for managing dashboards
Expand Down Expand Up @@ -34754,6 +34768,13 @@ components:
example: '2020-11-23T10:00:00.000Z'
readOnly: true
type: string
date_last_used:
description: Date the API Key was last used.
example: '2020-11-27T10:00:00.000Z'
format: date-time
nullable: true
readOnly: true
type: string
last4:
description: The last four characters of the API key.
example: abcd
Expand Down Expand Up @@ -34802,6 +34823,12 @@ components:
minLength: 4
readOnly: true
type: string
last_used_at:
description: Last usage timestamp of the application key.
example: '2020-12-20T10:00:00.000Z'
nullable: true
readOnly: true
type: string
name:
description: Name of the application key.
example: Application Key for managing dashboards
Expand Down Expand Up @@ -37778,6 +37805,7 @@ components:
- type
type: object
RoleAttributes:
additionalProperties: {}
description: Attributes of the role.
properties:
created_at:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@ public static void main(String[] args) {
ApiClient defaultClient = ApiClient.getDefaultApiClient();
KeyManagementApi apiInstance = new KeyManagementApi(defaultClient);

// there is a valid "application_key" in the system
String APPLICATION_KEY_DATA_ID = System.getenv("APPLICATION_KEY_DATA_ID");

try {
ApplicationKeyResponse result = apiInstance.getCurrentUserApplicationKey("app_key_id");
ApplicationKeyResponse result =
apiInstance.getCurrentUserApplicationKey(APPLICATION_KEY_DATA_ID);
System.out.println(result);
} catch (ApiException e) {
System.err.println("Exception when calling KeyManagementApi#getCurrentUserApplicationKey");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,13 @@
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes of a full API key. */
@JsonPropertyOrder({
FullAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
FullAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
FullAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
FullAPIKeyAttributes.JSON_PROPERTY_KEY,
FullAPIKeyAttributes.JSON_PROPERTY_LAST4,
FullAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
Expand All @@ -37,6 +39,9 @@ public class FullAPIKeyAttributes {
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private OffsetDateTime createdAt;

public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
private JsonNullable<OffsetDateTime> dateLastUsed = JsonNullable.<OffsetDateTime>undefined();

public static final String JSON_PROPERTY_KEY = "key";
private String key;

Expand Down Expand Up @@ -86,6 +91,32 @@ public OffsetDateTime getCreatedAt() {
return createdAt;
}

/**
* Date the API Key was last used
*
* @return dateLastUsed
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getDateLastUsed() {

if (dateLastUsed == null) {
dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
}
return dateLastUsed.orElse(null);
}

@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDateLastUsed_JsonNullable() {
return dateLastUsed;
}

@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
private void setDateLastUsed_JsonNullable(JsonNullable<OffsetDateTime> dateLastUsed) {
this.dateLastUsed = dateLastUsed;
}

/**
* The API key.
*
Expand Down Expand Up @@ -222,6 +253,7 @@ public boolean equals(Object o) {
FullAPIKeyAttributes fullApiKeyAttributes = (FullAPIKeyAttributes) o;
return Objects.equals(this.category, fullApiKeyAttributes.category)
&& Objects.equals(this.createdAt, fullApiKeyAttributes.createdAt)
&& Objects.equals(this.dateLastUsed, fullApiKeyAttributes.dateLastUsed)
&& Objects.equals(this.key, fullApiKeyAttributes.key)
&& Objects.equals(this.last4, fullApiKeyAttributes.last4)
&& Objects.equals(this.modifiedAt, fullApiKeyAttributes.modifiedAt)
Expand All @@ -236,6 +268,7 @@ public int hashCode() {
return Objects.hash(
category,
createdAt,
dateLastUsed,
key,
last4,
modifiedAt,
Expand All @@ -250,6 +283,7 @@ public String toString() {
sb.append("class FullAPIKeyAttributes {\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
FullApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT,
FullApplicationKeyAttributes.JSON_PROPERTY_KEY,
FullApplicationKeyAttributes.JSON_PROPERTY_LAST4,
FullApplicationKeyAttributes.JSON_PROPERTY_LAST_USED_AT,
FullApplicationKeyAttributes.JSON_PROPERTY_NAME,
FullApplicationKeyAttributes.JSON_PROPERTY_SCOPES
})
Expand All @@ -41,6 +42,9 @@ public class FullApplicationKeyAttributes {
public static final String JSON_PROPERTY_LAST4 = "last4";
private String last4;

public static final String JSON_PROPERTY_LAST_USED_AT = "last_used_at";
private JsonNullable<OffsetDateTime> lastUsedAt = JsonNullable.<OffsetDateTime>undefined();

public static final String JSON_PROPERTY_NAME = "name";
private String name;

Expand Down Expand Up @@ -83,6 +87,32 @@ public String getLast4() {
return last4;
}

/**
* Last usage timestamp of the application key.
*
* @return lastUsedAt
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getLastUsedAt() {

if (lastUsedAt == null) {
lastUsedAt = JsonNullable.<OffsetDateTime>undefined();
}
return lastUsedAt.orElse(null);
}

@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getLastUsedAt_JsonNullable() {
return lastUsedAt;
}

@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
private void setLastUsedAt_JsonNullable(JsonNullable<OffsetDateTime> lastUsedAt) {
this.lastUsedAt = lastUsedAt;
}

public FullApplicationKeyAttributes name(String name) {
this.name = name;
return this;
Expand Down Expand Up @@ -206,6 +236,7 @@ public boolean equals(Object o) {
return Objects.equals(this.createdAt, fullApplicationKeyAttributes.createdAt)
&& Objects.equals(this.key, fullApplicationKeyAttributes.key)
&& Objects.equals(this.last4, fullApplicationKeyAttributes.last4)
&& Objects.equals(this.lastUsedAt, fullApplicationKeyAttributes.lastUsedAt)
&& Objects.equals(this.name, fullApplicationKeyAttributes.name)
&& Objects.equals(this.scopes, fullApplicationKeyAttributes.scopes)
&& Objects.equals(
Expand All @@ -214,7 +245,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(createdAt, key, last4, name, scopes, additionalProperties);
return Objects.hash(createdAt, key, last4, lastUsedAt, name, scopes, additionalProperties);
}

@Override
Expand All @@ -224,6 +255,7 @@ public String toString() {
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" key: ").append(toIndentedString(key)).append("\n");
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
sb.append(" additionalProperties: ")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,14 +12,17 @@
import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonPropertyOrder;
import java.time.OffsetDateTime;
import java.util.HashMap;
import java.util.Map;
import java.util.Objects;
import org.openapitools.jackson.nullable.JsonNullable;

/** Attributes of a partial API key. */
@JsonPropertyOrder({
PartialAPIKeyAttributes.JSON_PROPERTY_CATEGORY,
PartialAPIKeyAttributes.JSON_PROPERTY_CREATED_AT,
PartialAPIKeyAttributes.JSON_PROPERTY_DATE_LAST_USED,
PartialAPIKeyAttributes.JSON_PROPERTY_LAST4,
PartialAPIKeyAttributes.JSON_PROPERTY_MODIFIED_AT,
PartialAPIKeyAttributes.JSON_PROPERTY_NAME,
Expand All @@ -35,6 +38,9 @@ public class PartialAPIKeyAttributes {
public static final String JSON_PROPERTY_CREATED_AT = "created_at";
private String createdAt;

public static final String JSON_PROPERTY_DATE_LAST_USED = "date_last_used";
private JsonNullable<OffsetDateTime> dateLastUsed = JsonNullable.<OffsetDateTime>undefined();

public static final String JSON_PROPERTY_LAST4 = "last4";
private String last4;

Expand Down Expand Up @@ -81,6 +87,32 @@ public String getCreatedAt() {
return createdAt;
}

/**
* Date the API Key was last used.
*
* @return dateLastUsed
*/
@jakarta.annotation.Nullable
@JsonIgnore
public OffsetDateTime getDateLastUsed() {

if (dateLastUsed == null) {
dateLastUsed = JsonNullable.<OffsetDateTime>undefined();
}
return dateLastUsed.orElse(null);
}

@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<OffsetDateTime> getDateLastUsed_JsonNullable() {
return dateLastUsed;
}

@JsonProperty(JSON_PROPERTY_DATE_LAST_USED)
private void setDateLastUsed_JsonNullable(JsonNullable<OffsetDateTime> dateLastUsed) {
this.dateLastUsed = dateLastUsed;
}

/**
* The last four characters of the API key.
*
Expand Down Expand Up @@ -205,6 +237,7 @@ public boolean equals(Object o) {
PartialAPIKeyAttributes partialApiKeyAttributes = (PartialAPIKeyAttributes) o;
return Objects.equals(this.category, partialApiKeyAttributes.category)
&& Objects.equals(this.createdAt, partialApiKeyAttributes.createdAt)
&& Objects.equals(this.dateLastUsed, partialApiKeyAttributes.dateLastUsed)
&& Objects.equals(this.last4, partialApiKeyAttributes.last4)
&& Objects.equals(this.modifiedAt, partialApiKeyAttributes.modifiedAt)
&& Objects.equals(this.name, partialApiKeyAttributes.name)
Expand All @@ -218,6 +251,7 @@ public int hashCode() {
return Objects.hash(
category,
createdAt,
dateLastUsed,
last4,
modifiedAt,
name,
Expand All @@ -231,6 +265,7 @@ public String toString() {
sb.append("class PartialAPIKeyAttributes {\n");
sb.append(" category: ").append(toIndentedString(category)).append("\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" dateLastUsed: ").append(toIndentedString(dateLastUsed)).append("\n");
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
sb.append(" modifiedAt: ").append(toIndentedString(modifiedAt)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
@JsonPropertyOrder({
PartialApplicationKeyAttributes.JSON_PROPERTY_CREATED_AT,
PartialApplicationKeyAttributes.JSON_PROPERTY_LAST4,
PartialApplicationKeyAttributes.JSON_PROPERTY_LAST_USED_AT,
PartialApplicationKeyAttributes.JSON_PROPERTY_NAME,
PartialApplicationKeyAttributes.JSON_PROPERTY_SCOPES
})
Expand All @@ -36,6 +37,9 @@ public class PartialApplicationKeyAttributes {
public static final String JSON_PROPERTY_LAST4 = "last4";
private String last4;

public static final String JSON_PROPERTY_LAST_USED_AT = "last_used_at";
private JsonNullable<String> lastUsedAt = JsonNullable.<String>undefined();

public static final String JSON_PROPERTY_NAME = "name";
private String name;

Expand Down Expand Up @@ -66,6 +70,32 @@ public String getLast4() {
return last4;
}

/**
* Last usage timestamp of the application key.
*
* @return lastUsedAt
*/
@jakarta.annotation.Nullable
@JsonIgnore
public String getLastUsedAt() {

if (lastUsedAt == null) {
lastUsedAt = JsonNullable.<String>undefined();
}
return lastUsedAt.orElse(null);
}

@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
@JsonInclude(value = JsonInclude.Include.USE_DEFAULTS)
public JsonNullable<String> getLastUsedAt_JsonNullable() {
return lastUsedAt;
}

@JsonProperty(JSON_PROPERTY_LAST_USED_AT)
private void setLastUsedAt_JsonNullable(JsonNullable<String> lastUsedAt) {
this.lastUsedAt = lastUsedAt;
}

public PartialApplicationKeyAttributes name(String name) {
this.name = name;
return this;
Expand Down Expand Up @@ -189,6 +219,7 @@ public boolean equals(Object o) {
(PartialApplicationKeyAttributes) o;
return Objects.equals(this.createdAt, partialApplicationKeyAttributes.createdAt)
&& Objects.equals(this.last4, partialApplicationKeyAttributes.last4)
&& Objects.equals(this.lastUsedAt, partialApplicationKeyAttributes.lastUsedAt)
&& Objects.equals(this.name, partialApplicationKeyAttributes.name)
&& Objects.equals(this.scopes, partialApplicationKeyAttributes.scopes)
&& Objects.equals(
Expand All @@ -197,7 +228,7 @@ public boolean equals(Object o) {

@Override
public int hashCode() {
return Objects.hash(createdAt, last4, name, scopes, additionalProperties);
return Objects.hash(createdAt, last4, lastUsedAt, name, scopes, additionalProperties);
}

@Override
Expand All @@ -206,6 +237,7 @@ public String toString() {
sb.append("class PartialApplicationKeyAttributes {\n");
sb.append(" createdAt: ").append(toIndentedString(createdAt)).append("\n");
sb.append(" last4: ").append(toIndentedString(last4)).append("\n");
sb.append(" lastUsedAt: ").append(toIndentedString(lastUsedAt)).append("\n");
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" scopes: ").append(toIndentedString(scopes)).append("\n");
sb.append(" additionalProperties: ")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
2025-09-08T09:24:42.052Z
Loading