Class BetaApiKey

  • All Implemented Interfaces:

    
    public final class BetaApiKey
    
                        
    • Constructor Detail

    • Method Detail

      • id

         final String id()

        ID of the API key.

      • createdBy

         final Optional<BetaApiKeyCreatedBy> createdBy()

        The ID and type of the actor that created the API key, or null when the creator is not recorded (legacy, workload-identity-federated, or system-created keys).

      • scope

         final BetaApiKey.Scope scope()

        Where the API key belongs: its Workspace ({"type": "workspace", "workspace_id": "wrkspc_..."}, with the Workspace's real ID even when it is the organization's default Workspace), or the organization ({"type": "organization"}) for a principal-bound API key that has no Workspace.

      • _type

         final JsonValue _type()

        Object type.

        For API Keys, this is always "api_key".

        Expected to always return the following:

        JsonValue.from("api_key")

        However, this method can be useful for debugging and logging (e.g. if the server responded with an unexpected value).

      • _id

         final JsonField<String> _id()

        Returns the raw JSON value of id.

        Unlike id, this method doesn't throw if the JSON field has an unexpected type.

      • _createdAt

         final JsonField<OffsetDateTime> _createdAt()

        Returns the raw JSON value of createdAt.

        Unlike createdAt, this method doesn't throw if the JSON field has an unexpected type.

      • _expiresAt

         final JsonField<OffsetDateTime> _expiresAt()

        Returns the raw JSON value of expiresAt.

        Unlike expiresAt, this method doesn't throw if the JSON field has an unexpected type.

      • _name

         final JsonField<String> _name()

        Returns the raw JSON value of name.

        Unlike name, this method doesn't throw if the JSON field has an unexpected type.

      • _partialKeyHint

         final JsonField<String> _partialKeyHint()

        Returns the raw JSON value of partialKeyHint.

        Unlike partialKeyHint, this method doesn't throw if the JSON field has an unexpected type.

      • _scope

         final JsonField<BetaApiKey.Scope> _scope()

        Returns the raw JSON value of scope.

        Unlike scope, this method doesn't throw if the JSON field has an unexpected type.

      • _status

         final JsonField<BetaApiKey.Status> _status()

        Returns the raw JSON value of status.

        Unlike status, this method doesn't throw if the JSON field has an unexpected type.

      • validate

         final BetaApiKey validate()

        Validates that the types of all values in this object match their expected types recursively.

        This method is not forwards compatible with new types from the API for existing fields.

      • builder

         final static BetaApiKey.Builder builder()

        Returns a mutable builder for constructing an instance of BetaApiKey.

        The following fields are required:

        .id()
        .createdAt()
        .createdBy()
        .expiresAt()
        .name()
        .partialKeyHint()
        .principal()
        .scope()
        .status()