Package org.openapitools.client.model
Class SetUserApiKeyRequest
- java.lang.Object
-
- org.openapitools.client.model.SetUserApiKeyRequest
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2024-03-29T12:34:27.506198300-05:00[America/Chicago]", comments="Generator version: 7.4.0") public class SetUserApiKeyRequest extends Object
SetUserApiKeyRequest
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classSetUserApiKeyRequest.CustomTypeAdapterFactory
-
Field Summary
Fields Modifier and Type Field Description static HashSet<String>openapiFieldsstatic HashSet<String>openapiRequiredFieldsstatic StringSERIALIZED_NAME_NAMEstatic StringSERIALIZED_NAME_ROLE
-
Constructor Summary
Constructors Constructor Description SetUserApiKeyRequest()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)static SetUserApiKeyRequestfromJson(String jsonString)Create an instance of SetUserApiKeyRequest given an JSON string@NotNull StringgetName()The name which will be assigned to the new api key.@NotNull IntegergetRole()The role which will be assigned to the new api key.inthashCode()SetUserApiKeyRequestname(String name)SetUserApiKeyRequestrole(Integer role)voidsetName(String name)voidsetRole(Integer role)StringtoJson()Convert an instance of SetUserApiKeyRequest to an JSON stringStringtoString()static voidvalidateJsonElement(com.google.gson.JsonElement jsonElement)Validates the JSON Element and throws an exception if issues found
-
-
-
Field Detail
-
SERIALIZED_NAME_NAME
public static final String SERIALIZED_NAME_NAME
- See Also:
- Constant Field Values
-
SERIALIZED_NAME_ROLE
public static final String SERIALIZED_NAME_ROLE
- See Also:
- Constant Field Values
-
-
Method Detail
-
name
public SetUserApiKeyRequest name(String name)
-
getName
@Nonnull @NotNull public @NotNull String getName()
The name which will be assigned to the new api key.- Returns:
- name
-
setName
public void setName(String name)
-
role
public SetUserApiKeyRequest role(Integer role)
-
getRole
@Nonnull @NotNull public @NotNull Integer getRole()
The role which will be assigned to the new api key. Either 0 (read), 1 (read and write at the level of the currently auth'ed user). The auth'ed user must have a role greater than or equal to the role being assigned which means they must be an admin (1) or owner (2) of the organization to assign write permissions with a role of 1.- Returns:
- role
-
setRole
public void setRole(Integer role)
-
validateJsonElement
public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOExceptionValidates the JSON Element and throws an exception if issues found- Parameters:
jsonElement- JSON Element- Throws:
IOException- if the JSON Element is invalid with respect to SetUserApiKeyRequest
-
fromJson
public static SetUserApiKeyRequest fromJson(String jsonString) throws IOException
Create an instance of SetUserApiKeyRequest given an JSON string- Parameters:
jsonString- JSON string- Returns:
- An instance of SetUserApiKeyRequest
- Throws:
IOException- if the JSON string is invalid with respect to SetUserApiKeyRequest
-
toJson
public String toJson()
Convert an instance of SetUserApiKeyRequest to an JSON string- Returns:
- JSON string
-
-