Class GrantApiKey.Builder

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

public static class GrantApiKey.Builder extends WithJsonObjectBuilderBase<GrantApiKey.Builder> implements ObjectBuilder<GrantApiKey>
Builder for GrantApiKey.
  • Constructor Details

    • Builder

      public Builder()
  • Method Details

    • name

      public final GrantApiKey.Builder name(String value)
      Required - API name: name
    • expiration

      public final GrantApiKey.Builder expiration(@Nullable Time value)
      Expiration time for the API key. By default, API keys never expire.

      API name: expiration

    • expiration

      Expiration time for the API key. By default, API keys never expire.

      API name: expiration

    • roleDescriptors

      public final GrantApiKey.Builder roleDescriptors(List<Map<String,RoleDescriptor>> list)
      The role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.

      API name: role_descriptors

      Adds all elements of list to roleDescriptors.

    • roleDescriptors

      public final GrantApiKey.Builder roleDescriptors(Map<String,RoleDescriptor> value, Map<String,RoleDescriptor>... values)
      The role descriptors for this API key. This parameter is optional. When it is not specified or is an empty array, the API key has a point in time snapshot of permissions of the specified user or access token. If you supply role descriptors, the resultant permissions are an intersection of API keys permissions and the permissions of the user or access token.

      API name: role_descriptors

      Adds one or more values to roleDescriptors.

    • metadata

      public final GrantApiKey.Builder metadata(Map<String,JsonData> map)
      Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final GrantApiKey.Builder metadata(String key, JsonData value)
      Arbitrary metadata that you want to associate with the API key. It supports nested data structure. Within the metadata object, keys beginning with _ are reserved for system usage.

      API name: metadata

      Adds an entry to metadata.

    • self

      protected GrantApiKey.Builder self()
      Specified by:
      self in class WithJsonObjectBuilderBase<GrantApiKey.Builder>
    • build

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