Class ExchangeCreateRequest

java.lang.Object
co.ankatech.keymanagement.client.keymanagement.model.ExchangeCreateRequest

@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", comments="Generator version: 7.23.0") public class ExchangeCreateRequest extends Object
Create a Cryptographic Exchange in DRAFT status: one directed relationship from an origin to a destination, each an application of the tenant or an external counterparty, never external on both ends, in one Exchange Context.
  • Field Details

  • Constructor Details

    • ExchangeCreateRequest

      public ExchangeCreateRequest()
  • Method Details

    • businessPurpose

      public ExchangeCreateRequest businessPurpose(@Nullable String businessPurpose)
    • getBusinessPurpose

      @Nullable public String getBusinessPurpose()
      Free-text business purpose
      Returns:
      businessPurpose
    • setBusinessPurpose

      public void setBusinessPurpose(@Nullable String businessPurpose)
    • destination

      public ExchangeCreateRequest destination(@Nonnull ExchangeEndpointRequest destination)
    • getDestination

      @Nonnull public ExchangeEndpointRequest getDestination()
      Where the cryptographic relationship ends
      Returns:
      destination
    • setDestination

      public void setDestination(@Nonnull ExchangeEndpointRequest destination)
    • effectiveFrom

      public ExchangeCreateRequest effectiveFrom(@Nullable OffsetDateTime effectiveFrom)
    • getEffectiveFrom

      @Nullable public OffsetDateTime getEffectiveFrom()
      Validity window start, inclusive: an RFC 3339 instant WITH an offset (Z or +hh:mm). A value without an offset is refused with 400 naming the member. Stored and returned in UTC; the cryptographic service refuses the Exchange's grants before this instant.
      Returns:
      effectiveFrom
    • setEffectiveFrom

      public void setEffectiveFrom(@Nullable OffsetDateTime effectiveFrom)
    • effectiveUntil

      public ExchangeCreateRequest effectiveUntil(@Nullable OffsetDateTime effectiveUntil)
    • getEffectiveUntil

      @Nullable public OffsetDateTime getEffectiveUntil()
      Validity window end, exclusive — must be after effectiveFrom when both are set: an RFC 3339 instant WITH an offset; a value without one is refused with 400 naming the member. Stored and returned in UTC; the cryptographic service refuses the Exchange's grants from this instant on, whether or not the expiry job has yet moved the Exchange to EXPIRED.
      Returns:
      effectiveUntil
    • setEffectiveUntil

      public void setEffectiveUntil(@Nullable OffsetDateTime effectiveUntil)
    • exchangeContextId

      public ExchangeCreateRequest exchangeContextId(@Nonnull UUID exchangeContextId)
    • getExchangeContextId

      @Nonnull public UUID getExchangeContextId()
      The Exchange Context of the tenant the Exchange and every grant it owns belong to. Another tenant's context, or an unknown one, is refused with 404; a context that is not ACTIVE with 409.
      Returns:
      exchangeContextId
    • setExchangeContextId

      public void setExchangeContextId(@Nonnull UUID exchangeContextId)
    • name

      public ExchangeCreateRequest name(@Nonnull String name)
    • getName

      @Nonnull public String getName()
      Display name; uniqueness is not enforced
      Returns:
      name
    • setName

      public void setName(@Nonnull String name)
    • notes

      public ExchangeCreateRequest notes(@Nullable String notes)
    • getNotes

      @Nullable public String getNotes()
      Free-text operator notes
      Returns:
      notes
    • setNotes

      public void setNotes(@Nullable String notes)
    • origin

      public ExchangeCreateRequest origin(@Nonnull ExchangeEndpointRequest origin)
    • getOrigin

      @Nonnull public ExchangeEndpointRequest getOrigin()
      Where the cryptographic relationship starts
      Returns:
      origin
    • setOrigin

      public void setOrigin(@Nonnull ExchangeEndpointRequest origin)
    • ownerPrincipalId

      public ExchangeCreateRequest ownerPrincipalId(@Nullable UUID ownerPrincipalId)
    • getOwnerPrincipalId

      @Nullable public UUID getOwnerPrincipalId()
      Owner principal; defaults to the caller's principal id when omitted
      Returns:
      ownerPrincipalId
    • setOwnerPrincipalId

      public void setOwnerPrincipalId(@Nullable UUID ownerPrincipalId)
    • tags

      public ExchangeCreateRequest tags(@Nullable List<String> tags)
    • addTagsItem

      public ExchangeCreateRequest addTagsItem(String tagsItem)
    • getTags

      @Nullable public List<String> getTags()
      Free-form tags (string array)
      Returns:
      tags
    • setTags

      public void setTags(@Nullable List<String> tags)
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • validateJsonElement

      public static void validateJsonElement(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element and throws an exception if issues found
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is invalid with respect to ExchangeCreateRequest
    • validateJsonElementAsCandidate

      public static void validateJsonElementAsCandidate(com.google.gson.JsonElement jsonElement) throws IOException
      Validates the JSON Element as a candidate of a oneOf schema: the checks of validateJsonElement(JsonElement), and the element carries no member this model does not declare. A oneOf schema without a discriminator tells its candidates apart by their member sets, so a candidate is matched on its closed member set.
      Parameters:
      jsonElement - JSON Element
      Throws:
      IOException - if the JSON Element is not a ExchangeCreateRequest
    • fromJson

      public static ExchangeCreateRequest fromJson(String jsonString) throws IOException
      Create an instance of ExchangeCreateRequest given an JSON string
      Parameters:
      jsonString - JSON string
      Returns:
      An instance of ExchangeCreateRequest
      Throws:
      IOException - if the JSON string is invalid with respect to ExchangeCreateRequest
    • toJson

      public String toJson()
      Convert an instance of ExchangeCreateRequest to an JSON string
      Returns:
      JSON string