Class AssociationCreateOrUpdateInfo
java.lang.Object
io.confluent.kafka.schemaregistry.client.rest.entities.requests.AssociationCreateOrUpdateInfo
-
Constructor Summary
ConstructorsConstructorDescriptionAssociationCreateOrUpdateInfo(String subject, String associationType, LifecyclePolicy lifecycle, Boolean frozen, RegisterSchemaRequest schema, Boolean normalize) -
Method Summary
Modifier and TypeMethodDescriptionvoidapplyDefaults(boolean isCreate) Applies defaults for an association that does not yet exist.booleaninthashCode()voidsetAssociationType(String associationType) voidvoidsetLifecycle(LifecyclePolicy lifecycle) voidsetNormalize(Boolean normalize) voidsetSchema(RegisterSchemaRequest schema) voidsetSubject(String subject) toJson()voidvalidate(boolean isCreate, boolean dryRun)
-
Constructor Details
-
AssociationCreateOrUpdateInfo
public AssociationCreateOrUpdateInfo(String subject, String associationType, LifecyclePolicy lifecycle, Boolean frozen, RegisterSchemaRequest schema, Boolean normalize) -
AssociationCreateOrUpdateInfo
-
-
Method Details
-
getSubject
-
setSubject
-
getAssociationType
-
setAssociationType
-
getLifecycle
-
setLifecycle
-
getFrozen
-
setFrozen
-
getSchema
-
setSchema
-
getNormalize
-
setNormalize
-
equals
-
hashCode
public int hashCode() -
toJson
- 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)
-