Class AccessProfileRequest.Builder

java.lang.Object
ai.vectros.types.AccessProfileRequest.Builder
All Implemented Interfaces:
AccessProfileRequest._FinalStage, AccessProfileRequest.PrincipalIdStage
Enclosing class:
AccessProfileRequest

public static final class AccessProfileRequest.Builder extends Object implements AccessProfileRequest.PrincipalIdStage, AccessProfileRequest._FinalStage
  • Method Details

    • from

      Specified by:
      from in interface AccessProfileRequest.PrincipalIdStage
    • principalId

      public AccessProfileRequest._FinalStage principalId(@NotNull @NotNull String principalId)

      Principal this profile applies to. Must start with usr_ (an authenticated user — the suffix is the user id) or key_ (a scoped API key acting as its own principal — the suffix is the key id). The suffix may contain only letters, digits, underscores, and hyphens. Required when creating (POST); ignored when updating (PUT), where it is taken from the path.

      Principal this profile applies to. Must start with usr_ (an authenticated user — the suffix is the user id) or key_ (a scoped API key acting as its own principal — the suffix is the key id). The suffix may contain only letters, digits, underscores, and hyphens. Required when creating (POST); ignored when updating (PUT), where it is taken from the path.

      Specified by:
      principalId in interface AccessProfileRequest.PrincipalIdStage
      Returns:
      Reference to this so that method calls can be chained together.
    • status

      Profile lifecycle status. active permits token minting; suspended denies it (minting returns a uniform 403). Defaults to active when omitted.

      Specified by:
      status in interface AccessProfileRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • status

      Profile lifecycle status. active permits token minting; suspended denies it (minting returns a uniform 403). Defaults to active when omitted.

      Specified by:
      status in interface AccessProfileRequest._FinalStage
    • identityOverrides

      public AccessProfileRequest._FinalStage identityOverrides(Map<String,Object> identityOverrides)

      Optional per-context identity overrides, keyed by ownership namespace in scope:<namespace> form — scope:org and scope:client for the reserved namespaces, or any namespace you have registered (for example scope:group). At most two namespaces may be overridden; any other key is rejected. Each value is 1-128 characters: a letter or digit first, then letters, digits, _ or -. Omitting the field leaves any existing overrides unchanged; sending an empty map clears them, and sending a populated map replaces them wholesale — a namespace absent from the map you send is removed. If you use a scoped credential, two bounds apply and either returns 403: you may only set a value your own identity holds, and you may only change or clear a value the profile already holds if that value is yours as well — so clearing or repointing another principal's established identity is refused. A root API key (sk_) is exempt from both.

      Specified by:
      identityOverrides in interface AccessProfileRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • identityOverrides

      public AccessProfileRequest._FinalStage identityOverrides(Optional<Map<String,Object>> identityOverrides)

      Optional per-context identity overrides, keyed by ownership namespace in scope:<namespace> form — scope:org and scope:client for the reserved namespaces, or any namespace you have registered (for example scope:group). At most two namespaces may be overridden; any other key is rejected. Each value is 1-128 characters: a letter or digit first, then letters, digits, _ or -. Omitting the field leaves any existing overrides unchanged; sending an empty map clears them, and sending a populated map replaces them wholesale — a namespace absent from the map you send is removed. If you use a scoped credential, two bounds apply and either returns 403: you may only set a value your own identity holds, and you may only change or clear a value the profile already holds if that value is yours as well — so clearing or repointing another principal's established identity is refused. A root API key (sk_) is exempt from both.

      Specified by:
      identityOverrides in interface AccessProfileRequest._FinalStage
    • roleId

      public AccessProfileRequest._FinalStage roleId(String roleId)

      Reference to a role within the same context that supplies this principal's scopes. Provide exactly one of scopes or roleId — setting both, or neither, returns a 400. Changes to the role's scopes take effect for all referencing profiles.

      Specified by:
      roleId in interface AccessProfileRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • roleId

      Reference to a role within the same context that supplies this principal's scopes. Provide exactly one of scopes or roleId — setting both, or neither, returns a 400. Changes to the role's scopes take effect for all referencing profiles.

      Specified by:
      roleId in interface AccessProfileRequest._FinalStage
    • scopes

      Inline scope clauses to grant the principal. Provide exactly one of scopes or roleId — setting both, or neither, returns a 400.

      Specified by:
      scopes in interface AccessProfileRequest._FinalStage
      Returns:
      Reference to this so that method calls can be chained together.
    • scopes

      Inline scope clauses to grant the principal. Provide exactly one of scopes or roleId — setting both, or neither, returns a 400.

      Specified by:
      scopes in interface AccessProfileRequest._FinalStage
    • build

      public AccessProfileRequest build()
      Specified by:
      build in interface AccessProfileRequest._FinalStage
    • additionalProperty

      public AccessProfileRequest.Builder additionalProperty(String key, Object value)
      Specified by:
      additionalProperty in interface AccessProfileRequest._FinalStage
    • additionalProperties

      public AccessProfileRequest.Builder additionalProperties(Map<String,Object> additionalProperties)
      Specified by:
      additionalProperties in interface AccessProfileRequest._FinalStage