Interface Schema.Builder
-
- Enclosing interface:
- Schema
public static interface Schema.Builder
Allows to build aSchema
.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Schema
build()
Schema.Builder
moveAfter(String after, String name)
Move an entry after another one.Schema.Builder
moveBefore(String before, String name)
Move an entry before another one.Schema.Builder
remove(String name)
Remove entry from builder.Schema.Builder
remove(Schema.Entry entry)
Remove entry from builder.Schema.Builder
swap(String name, String with)
Swap two entries.Schema.Builder
withElementSchema(Schema schema)
Schema.Builder
withEntry(Schema.Entry entry)
Schema.Builder
withEntryAfter(String after, Schema.Entry entry)
Insert the entry after the specified entry.Schema.Builder
withEntryBefore(String before, Schema.Entry entry)
Insert the entry before the specified entry.Schema.Builder
withProp(String key, String value)
Schema.Builder
withProps(Map<String,String> props)
Schema.Builder
withType(Schema.Type type)
-
-
-
Method Detail
-
withType
Schema.Builder withType(Schema.Type type)
- Parameters:
type
- schema type.- Returns:
- this builder.
-
withEntry
Schema.Builder withEntry(Schema.Entry entry)
- Parameters:
entry
- element for either an array or record type.- Returns:
- this builder.
-
withEntryAfter
Schema.Builder withEntryAfter(String after, Schema.Entry entry)
Insert the entry after the specified entry.- Parameters:
after
- the entry name referenceentry
- the entry name- Returns:
- this builder
-
withEntryBefore
Schema.Builder withEntryBefore(String before, Schema.Entry entry)
Insert the entry before the specified entry.- Parameters:
before
- the entry name referenceentry
- the entry name- Returns:
- this builder
-
remove
Schema.Builder remove(String name)
Remove entry from builder.- Parameters:
name
- the entry name- Returns:
- this builder
-
remove
Schema.Builder remove(Schema.Entry entry)
Remove entry from builder.- Parameters:
entry
- the entry- Returns:
- this builder
-
moveAfter
Schema.Builder moveAfter(String after, String name)
Move an entry after another one.- Parameters:
after
- the entry name referencename
- the entry name
-
moveBefore
Schema.Builder moveBefore(String before, String name)
Move an entry before another one.- Parameters:
before
- the entry name referencename
- the entry name
-
swap
Schema.Builder swap(String name, String with)
Swap two entries.- Parameters:
name
- the entry namewith
- the other entry name
-
withElementSchema
Schema.Builder withElementSchema(Schema schema)
- Parameters:
schema
- nested element schema.- Returns:
- this builder.
-
withProps
Schema.Builder withProps(Map<String,String> props)
- Parameters:
props
- schema properties- Returns:
- this builder
-
withProp
Schema.Builder withProp(String key, String value)
- Parameters:
key
- the prop key namevalue
- the prop value- Returns:
- this builder
-
-