Class UpdateApiKeyRequest.Builder

All Implemented Interfaces:
WithJson<UpdateApiKeyRequest.Builder>, ObjectBuilder<UpdateApiKeyRequest>
Enclosing class:
UpdateApiKeyRequest

public static class UpdateApiKeyRequest.Builder extends RequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder> implements ObjectBuilder<UpdateApiKeyRequest>
Builder for UpdateApiKeyRequest.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • expiration

      public final UpdateApiKeyRequest.Builder expiration(@Nullable Time value)
      The expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the expiration unchanged.

      API name: expiration

    • expiration

      The expiration time for the API key. By default, API keys never expire. This property can be omitted to leave the expiration unchanged.

      API name: expiration

    • id

      public final UpdateApiKeyRequest.Builder id(String value)
      Required - The ID of the API key to update.

      API name: id

    • metadata

      public final UpdateApiKeyRequest.Builder metadata(Map<String,JsonData> map)
      Arbitrary metadata that you want to associate with the API key. It supports a nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. When specified, this value fully replaces the metadata previously associated with the API key.

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final UpdateApiKeyRequest.Builder metadata(String key, JsonData value)
      Arbitrary metadata that you want to associate with the API key. It supports a nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage. When specified, this value fully replaces the metadata previously associated with the API key.

      API name: metadata

      Adds an entry to metadata.

    • roleDescriptors

      public final UpdateApiKeyRequest.Builder roleDescriptors(Map<String,RoleDescriptor> map)
      The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.

      API name: role_descriptors

      Adds all entries of map to roleDescriptors.

    • roleDescriptors

      public final UpdateApiKeyRequest.Builder roleDescriptors(String key, RoleDescriptor value)
      The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.

      API name: role_descriptors

      Adds an entry to roleDescriptors.

    • roleDescriptors

      The role descriptors to assign to this API key. The API key's effective permissions are an intersection of its assigned privileges and the point in time snapshot of permissions of the owner user. You can assign new privileges by specifying them in this parameter. To remove assigned privileges, you can supply an empty role_descriptors parameter, that is to say, an empty object {}. If an API key has no assigned privileges, it inherits the owner user's full permissions. The snapshot of the owner's permissions is always updated, whether you supply the role_descriptors parameter or not. The structure of a role descriptor is the same as the request for the create API keys API.

      API name: role_descriptors

      Adds an entry to roleDescriptors using a builder lambda.

    • self

      protected UpdateApiKeyRequest.Builder self()
      Specified by:
      self in class RequestBase.AbstractBuilder<UpdateApiKeyRequest.Builder>
    • build

      public UpdateApiKeyRequest build()
      Specified by:
      build in interface ObjectBuilder<UpdateApiKeyRequest>
      Throws:
      NullPointerException - if some of the required fields are null.