> fn) {
return fn.apply(new Builder()).build();
}
/**
* Required - Id for the API key
*
* API name: {@code id}
*/
public final String id() {
return this.id;
}
/**
* Required - Name of the API key.
*
* API name: {@code name}
*/
public final String name() {
return this.name;
}
/**
* Required - The type of the API key (e.g. rest
or
* cross_cluster
).
*
* API name: {@code type}
*/
public final ApiKeyType type() {
return this.type;
}
/**
* Required - Creation time for the API key in milliseconds.
*
* API name: {@code creation}
*/
public final long creation() {
return this.creation;
}
/**
* Expiration time for the API key in milliseconds.
*
* API name: {@code expiration}
*/
@Nullable
public final Long expiration() {
return this.expiration;
}
/**
* Required - Invalidation status for the API key. If the key has been
* invalidated, it has a value of true
. Otherwise, it is
* false
.
*
* API name: {@code invalidated}
*/
public final boolean invalidated() {
return this.invalidated;
}
/**
* If the key has been invalidated, invalidation time in milliseconds.
*
* API name: {@code invalidation}
*/
@Nullable
public final Long invalidation() {
return this.invalidation;
}
/**
* Required - Principal for which this API key was created
*
* API name: {@code username}
*/
public final String username() {
return this.username;
}
/**
* Required - Realm name of the principal for which this API key was created.
*
* API name: {@code realm}
*/
public final String realm() {
return this.realm;
}
/**
* Realm type of the principal for which this API key was created
*
* API name: {@code realm_type}
*/
@Nullable
public final String realmType() {
return this.realmType;
}
/**
* Required - Metadata of the API key
*
* API name: {@code metadata}
*/
public final Map metadata() {
return this.metadata;
}
/**
* The role descriptors assigned to this API key when it was created or last
* updated. An empty role descriptor means the API key inherits the owner user’s
* permissions.
*
* API name: {@code role_descriptors}
*/
public final Map roleDescriptors() {
return this.roleDescriptors;
}
/**
* The owner user’s permissions associated with the API key. It is a
* point-in-time snapshot captured at creation and subsequent updates. An API
* key’s effective permissions are an intersection of its assigned privileges
* and the owner user’s permissions.
*
* API name: {@code limited_by}
*/
public final List