Class 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
    • Constructor Detail

      • SetUserApiKeyRequest

        public SetUserApiKeyRequest()
    • Method Detail

      • 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)
      • 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)
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • validateJsonElement

        public static void validateJsonElement​(com.google.gson.JsonElement jsonElement)
                                        throws IOException
        Validates 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