Class AssociationCreateOrUpdateInfo

java.lang.Object
io.confluent.kafka.schemaregistry.client.rest.entities.requests.AssociationCreateOrUpdateInfo

public class AssociationCreateOrUpdateInfo extends Object
  • Constructor Details

  • Method Details

    • getSubject

      public String getSubject()
    • setSubject

      public void setSubject(String subject)
    • getAssociationType

      public String getAssociationType()
    • setAssociationType

      public void setAssociationType(String associationType)
    • getLifecycle

      public LifecyclePolicy getLifecycle()
    • setLifecycle

      public void setLifecycle(LifecyclePolicy lifecycle)
    • getFrozen

      public Boolean getFrozen()
    • setFrozen

      public void setFrozen(Boolean frozen)
    • getSchema

      public RegisterSchemaRequest getSchema()
    • setSchema

      public void setSchema(RegisterSchemaRequest schema)
    • getNormalize

      public Boolean getNormalize()
    • setNormalize

      public void setNormalize(Boolean normalize)
    • equals

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

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

      public String toJson() throws IOException
      Throws:
      IOException
    • applyDefaults

      public void applyDefaults(boolean isCreate)
      Applies defaults for an association that does not yet exist. Only call this while creating the association: an upsert that updates an existing one keeps that association's stored lifecycle and would be wrongly rejected here for carrying a schema.

      For a create op a schema implies frozen STRONG, and frozen=false or WEAK alongside a schema are rejected. For an upsert op no schema is accepted at all, since a schema implies a topic-owned STRONG association and those can only be created together with the topic. Either way frozen and lifecycle are defaulted when null.

      The matching check on an explicit STRONG lifecycle lives in the registry, which can exempt subjects in IMPORT mode.

      Parameters:
      isCreate - whether this is a create op rather than an upsert op
    • validate

      public void validate(boolean isCreate, boolean dryRun)