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
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -715,6 +715,9 @@ public ServiceCall<ApiKey> createApiKey(CreateApiKeyOptions createApiKeyOptions)
if (createApiKeyOptions.actionWhenLeaked() != null) {
contentJson.addProperty("action_when_leaked", createApiKeyOptions.actionWhenLeaked());
}
if (createApiKeyOptions.expiresAt() != null) {
contentJson.addProperty("expires_at", createApiKeyOptions.expiresAt());
}
builder.bodyJson(contentJson);
ResponseConverter<ApiKey> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ApiKey>() { }.getType());
Expand Down Expand Up @@ -830,6 +833,9 @@ public ServiceCall<ApiKey> updateApiKey(UpdateApiKeyOptions updateApiKeyOptions)
if (updateApiKeyOptions.actionWhenLeaked() != null) {
contentJson.addProperty("action_when_leaked", updateApiKeyOptions.actionWhenLeaked());
}
if (updateApiKeyOptions.expiresAt() != null) {
contentJson.addProperty("expires_at", updateApiKeyOptions.expiresAt());
}
builder.bodyJson(contentJson);
ResponseConverter<ApiKey> responseConverter =
ResponseConverterUtils.getValue(new com.google.gson.reflect.TypeToken<ApiKey>() { }.getType());
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -42,6 +42,8 @@ public class ApiKey extends GenericModel {
protected Boolean supportSessions;
@SerializedName("action_when_leaked")
protected String actionWhenLeaked;
@SerializedName("expires_at")
protected String expiresAt;
protected String description;
@SerializedName("iam_id")
protected String iamId;
Expand Down Expand Up @@ -190,6 +192,17 @@ public String getActionWhenLeaked() {
return actionWhenLeaked;
}

/**
* Gets the expiresAt.
*
* Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'.
*
* @return the expiresAt
*/
public String getExpiresAt() {
return expiresAt;
}

/**
* Gets the description.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -26,6 +26,10 @@ public class ApiKeyInsideCreateServiceIdRequest extends GenericModel {
protected String apikey;
@SerializedName("store_value")
protected Boolean storeValue;
@SerializedName("action_when_leaked")
protected String actionWhenLeaked;
@SerializedName("expires_at")
protected String expiresAt;

/**
* Builder.
Expand All @@ -35,6 +39,8 @@ public static class Builder {
private String description;
private String apikey;
private Boolean storeValue;
private String actionWhenLeaked;
private String expiresAt;

/**
* Instantiates a new Builder from an existing ApiKeyInsideCreateServiceIdRequest instance.
Expand All @@ -46,6 +52,8 @@ private Builder(ApiKeyInsideCreateServiceIdRequest apiKeyInsideCreateServiceIdRe
this.description = apiKeyInsideCreateServiceIdRequest.description;
this.apikey = apiKeyInsideCreateServiceIdRequest.apikey;
this.storeValue = apiKeyInsideCreateServiceIdRequest.storeValue;
this.actionWhenLeaked = apiKeyInsideCreateServiceIdRequest.actionWhenLeaked;
this.expiresAt = apiKeyInsideCreateServiceIdRequest.expiresAt;
}

/**
Expand Down Expand Up @@ -115,6 +123,28 @@ public Builder storeValue(Boolean storeValue) {
this.storeValue = storeValue;
return this;
}

/**
* Set the actionWhenLeaked.
*
* @param actionWhenLeaked the actionWhenLeaked
* @return the ApiKeyInsideCreateServiceIdRequest builder
*/
public Builder actionWhenLeaked(String actionWhenLeaked) {
this.actionWhenLeaked = actionWhenLeaked;
return this;
}

/**
* Set the expiresAt.
*
* @param expiresAt the expiresAt
* @return the ApiKeyInsideCreateServiceIdRequest builder
*/
public Builder expiresAt(String expiresAt) {
this.expiresAt = expiresAt;
return this;
}
}

protected ApiKeyInsideCreateServiceIdRequest() { }
Expand All @@ -126,6 +156,8 @@ protected ApiKeyInsideCreateServiceIdRequest(Builder builder) {
description = builder.description;
apikey = builder.apikey;
storeValue = builder.storeValue;
actionWhenLeaked = builder.actionWhenLeaked;
expiresAt = builder.expiresAt;
}

/**
Expand Down Expand Up @@ -188,5 +220,27 @@ public String apikey() {
public Boolean storeValue() {
return storeValue;
}

/**
* Gets the actionWhenLeaked.
*
* Defines the action to take when API key is leaked, valid values are 'none', 'disable' and 'delete'.
*
* @return the actionWhenLeaked
*/
public String actionWhenLeaked() {
return actionWhenLeaked;
}

/**
* Gets the expiresAt.
*
* Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'.
*
* @return the expiresAt
*/
public String expiresAt() {
return expiresAt;
}
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand Down Expand Up @@ -28,6 +28,7 @@ public class CreateApiKeyOptions extends GenericModel {
protected Boolean storeValue;
protected Boolean supportSessions;
protected String actionWhenLeaked;
protected String expiresAt;
protected String entityLock;
protected String entityDisable;

Expand All @@ -43,6 +44,7 @@ public static class Builder {
private Boolean storeValue;
private Boolean supportSessions;
private String actionWhenLeaked;
private String expiresAt;
private String entityLock;
private String entityDisable;

Expand All @@ -60,6 +62,7 @@ private Builder(CreateApiKeyOptions createApiKeyOptions) {
this.storeValue = createApiKeyOptions.storeValue;
this.supportSessions = createApiKeyOptions.supportSessions;
this.actionWhenLeaked = createApiKeyOptions.actionWhenLeaked;
this.expiresAt = createApiKeyOptions.expiresAt;
this.entityLock = createApiKeyOptions.entityLock;
this.entityDisable = createApiKeyOptions.entityDisable;
}
Expand Down Expand Up @@ -178,6 +181,17 @@ public Builder actionWhenLeaked(String actionWhenLeaked) {
return this;
}

/**
* Set the expiresAt.
*
* @param expiresAt the expiresAt
* @return the CreateApiKeyOptions builder
*/
public Builder expiresAt(String expiresAt) {
this.expiresAt = expiresAt;
return this;
}

/**
* Set the entityLock.
*
Expand Down Expand Up @@ -216,6 +230,7 @@ protected CreateApiKeyOptions(Builder builder) {
storeValue = builder.storeValue;
supportSessions = builder.supportSessions;
actionWhenLeaked = builder.actionWhenLeaked;
expiresAt = builder.expiresAt;
entityLock = builder.entityLock;
entityDisable = builder.entityDisable;
}
Expand Down Expand Up @@ -327,6 +342,17 @@ public String actionWhenLeaked() {
return actionWhenLeaked;
}

/**
* Gets the expiresAt.
*
* Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'.
*
* @return the expiresAt
*/
public String expiresAt() {
return expiresAt;
}

/**
* Gets the entityLock.
*
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -26,6 +26,7 @@ public class UpdateApiKeyOptions extends GenericModel {
protected String description;
protected Boolean supportSessions;
protected String actionWhenLeaked;
protected String expiresAt;

/**
* Builder.
Expand All @@ -37,6 +38,7 @@ public static class Builder {
private String description;
private Boolean supportSessions;
private String actionWhenLeaked;
private String expiresAt;

/**
* Instantiates a new Builder from an existing UpdateApiKeyOptions instance.
Expand All @@ -50,6 +52,7 @@ private Builder(UpdateApiKeyOptions updateApiKeyOptions) {
this.description = updateApiKeyOptions.description;
this.supportSessions = updateApiKeyOptions.supportSessions;
this.actionWhenLeaked = updateApiKeyOptions.actionWhenLeaked;
this.expiresAt = updateApiKeyOptions.expiresAt;
}

/**
Expand Down Expand Up @@ -143,6 +146,17 @@ public Builder actionWhenLeaked(String actionWhenLeaked) {
this.actionWhenLeaked = actionWhenLeaked;
return this;
}

/**
* Set the expiresAt.
*
* @param expiresAt the expiresAt
* @return the UpdateApiKeyOptions builder
*/
public Builder expiresAt(String expiresAt) {
this.expiresAt = expiresAt;
return this;
}
}

protected UpdateApiKeyOptions() { }
Expand All @@ -158,6 +172,7 @@ protected UpdateApiKeyOptions(Builder builder) {
description = builder.description;
supportSessions = builder.supportSessions;
actionWhenLeaked = builder.actionWhenLeaked;
expiresAt = builder.expiresAt;
}

/**
Expand Down Expand Up @@ -240,5 +255,16 @@ public Boolean supportSessions() {
public String actionWhenLeaked() {
return actionWhenLeaked;
}

/**
* Gets the expiresAt.
*
* Date and time when the API key becomes invalid, ISO 8601 datetime in the format 'yyyy-MM-ddTHH:mm+0000'.
*
* @return the expiresAt
*/
public String expiresAt() {
return expiresAt;
}
}

Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*
* (C) Copyright IBM Corp. 2025.
* (C) Copyright IBM Corp. 2026.
*
* Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
Expand All @@ -26,7 +26,12 @@ public class UserReportMfaEnrollmentStatus extends GenericModel {
protected String name;
protected String username;
protected String email;
protected MfaEnrollments enrollments;
@SerializedName("effective_mfa_type")
protected String effectiveMfaType;
@SerializedName("id_based_mfa")
protected IdBasedMfaEnrollment idBasedMfa;
@SerializedName("account_based_mfa")
protected AccountBasedMfaEnrollment accountBasedMfa;

protected UserReportMfaEnrollmentStatus() { }

Expand Down Expand Up @@ -75,12 +80,32 @@ public String getEmail() {
}

/**
* Gets the enrollments.
* Gets the effectiveMfaType.
*
* @return the enrollments
* currently effective mfa type i.e. id_based_mfa or account_based_mfa.
*
* @return the effectiveMfaType
*/
public String getEffectiveMfaType() {
return effectiveMfaType;
}

/**
* Gets the idBasedMfa.
*
* @return the idBasedMfa
*/
public IdBasedMfaEnrollment getIdBasedMfa() {
return idBasedMfa;
}

/**
* Gets the accountBasedMfa.
*
* @return the accountBasedMfa
*/
public MfaEnrollments getEnrollments() {
return enrollments;
public AccountBasedMfaEnrollment getAccountBasedMfa() {
return accountBasedMfa;
}
}

Loading