Class ApiKey.Builder

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

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

    • Builder

      public Builder()
  • Method Details

    • creation

      public final ApiKey.Builder creation(@Nullable Long value)
      Creation time for the API key in milliseconds.

      API name: creation

    • expiration

      public final ApiKey.Builder expiration(@Nullable Long value)
      Expiration time for the API key in milliseconds.

      API name: expiration

    • id

      public final ApiKey.Builder id(String value)
      Required - Id for the API key

      API name: id

    • invalidated

      public final ApiKey.Builder invalidated(@Nullable Boolean value)
      Invalidation status for the API key. If the key has been invalidated, it has a value of true. Otherwise, it is false.

      API name: invalidated

    • name

      public final ApiKey.Builder name(String value)
      Required - Name of the API key.

      API name: name

    • realm

      public final ApiKey.Builder realm(@Nullable String value)
      Realm name of the principal for which this API key was created.

      API name: realm

    • realmType

      public final ApiKey.Builder realmType(@Nullable String value)
      Realm type of the principal for which this API key was created

      API name: realm_type

    • username

      public final ApiKey.Builder username(@Nullable String value)
      Principal for which this API key was created

      API name: username

    • profileUid

      public final ApiKey.Builder profileUid(@Nullable String value)
      The profile uid for the API key owner principal, if requested and if it exists

      API name: profile_uid

    • metadata

      public final ApiKey.Builder metadata(Map<String,JsonData> map)
      Metadata of the API key

      API name: metadata

      Adds all entries of map to metadata.

    • metadata

      public final ApiKey.Builder metadata(String key, JsonData value)
      Metadata of the API key

      API name: metadata

      Adds an entry to metadata.

    • roleDescriptors

      public final ApiKey.Builder roleDescriptors(Map<String,RoleDescriptor> map)
      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: role_descriptors

      Adds all entries of map to roleDescriptors.

    • roleDescriptors

      public final ApiKey.Builder roleDescriptors(String key, RoleDescriptor value)
      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: role_descriptors

      Adds an entry to roleDescriptors.

    • roleDescriptors

      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: role_descriptors

      Adds an entry to roleDescriptors using a builder lambda.

    • limitedBy

      public final ApiKey.Builder limitedBy(List<Map<String,RoleDescriptor>> list)
      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: limited_by

      Adds all elements of list to limitedBy.

    • limitedBy

      public final ApiKey.Builder limitedBy(Map<String,RoleDescriptor> value, Map<String,RoleDescriptor>... values)
      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: limited_by

      Adds one or more values to limitedBy.

    • sort

      public final ApiKey.Builder sort(List<FieldValue> list)
      API name: _sort

      Adds all elements of list to sort.

    • sort

      public final ApiKey.Builder sort(FieldValue value, FieldValue... values)
      API name: _sort

      Adds one or more values to sort.

    • sort

      public final ApiKey.Builder sort(String value, String... values)
      API name: _sort

      Adds all passed values to sort.

    • sort

      public final ApiKey.Builder sort(long value, long... values)
      API name: _sort

      Adds all passed values to sort.

    • sort

      public final ApiKey.Builder sort(double value, double... values)
      API name: _sort

      Adds all passed values to sort.

    • sort

      public final ApiKey.Builder sort(boolean value, boolean... values)
      API name: _sort

      Adds all passed values to sort.

    • sort

      API name: _sort

      Adds a value to sort using a builder lambda.

    • self

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

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