Class ContentTemplateCreate

java.lang.Object
io.github.primelib.confluence4j.rest.v1.models.ContentTemplateCreate

@Generated("io.github.primelib.primecodegen") public class ContentTemplateCreate extends Object
ContentTemplateCreate

This object is used to create content templates.

  • Field Details

    • name

      protected String name
      The name of the new template.
    • templateType

      protected String templateType
      The type of the new template. Set to `page`.
    • body

      protected ContentTemplateBodyCreate body
      The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.
    • description

      protected String description
      A description of the new template.
    • labels

      protected List<Label> labels
      Labels for the new template.
    • space

      protected Map<String,Object> space
      The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.
  • Constructor Details

    • ContentTemplateCreate

      public ContentTemplateCreate(Consumer<ContentTemplateCreate> spec)
      Constructs a validated instance of ContentTemplateCreate.
      Parameters:
      spec - the specification to process
    • ContentTemplateCreate

      @Internal protected ContentTemplateCreate()
      Protected no-args constructor for use by serialization frameworks.
    • ContentTemplateCreate

      @Internal public ContentTemplateCreate(String name, String templateType, ContentTemplateBodyCreate body, String description, List<Label> labels, Map<String,Object> space)
      Constructs a validated instance of ContentTemplateCreate.

      NOTE: This constructor is not considered stable and may change if the model is updated. Consider using ContentTemplateCreate(Consumer) instead.

      Parameters:
      name - The name of the new template.
      templateType - The type of the new template. Set to `page`.
      body - The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.
      description - A description of the new template.
      labels - Labels for the new template.
      space - The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.
  • Method Details

    • name

      public String name()
      Fluent getter for name.

      The name of the new template.

      Returns:
      name
    • name

      public ContentTemplateCreate name(String name)
      Fluent setter for name.

      The name of the new template.

      Parameters:
      name - name
      Returns:
      this
    • getName

      public String getName()
      Gets the value of name.

      The name of the new template.

      Returns:
      name
    • setName

      public void setName(String name)
      Sets the value of name.

      The name of the new template.

      Parameters:
      name - name
    • templateType

      public String templateType()
      Fluent getter for templateType.

      The type of the new template. Set to `page`.

      Returns:
      templateType
    • templateType

      public ContentTemplateCreate templateType(String templateType)
      Fluent setter for templateType.

      The type of the new template. Set to `page`.

      Parameters:
      templateType - templateType
      Returns:
      this
    • getTemplateType

      public String getTemplateType()
      Gets the value of templateType.

      The type of the new template. Set to `page`.

      Returns:
      templateType
    • setTemplateType

      public void setTemplateType(String templateType)
      Sets the value of templateType.

      The type of the new template. Set to `page`.

      Parameters:
      templateType - templateType
    • body

      Fluent getter for body.

      The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.

      Returns:
      body
    • body

      Fluent setter for body.

      The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.

      Parameters:
      body - body
      Returns:
      this
    • getBody

      public ContentTemplateBodyCreate getBody()
      Gets the value of body.

      The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.

      Returns:
      body
    • setBody

      public void setBody(ContentTemplateBodyCreate body)
      Sets the value of body.

      The body of the new content. Does not apply to attachments. Only one body format should be specified as the property for this object, e.g. `storage`. Note, `editor2` format is used by Atlassian only. `anonymous_export_view` is the same as `export_view` format but only content viewable by an anonymous user is included.

      Parameters:
      body - body
    • description

      public String description()
      Fluent getter for description.

      A description of the new template.

      Returns:
      description
    • description

      public ContentTemplateCreate description(String description)
      Fluent setter for description.

      A description of the new template.

      Parameters:
      description - description
      Returns:
      this
    • getDescription

      public String getDescription()
      Gets the value of description.

      A description of the new template.

      Returns:
      description
    • setDescription

      public void setDescription(String description)
      Sets the value of description.

      A description of the new template.

      Parameters:
      description - description
    • labels

      public List<Label> labels()
      Fluent getter for labels.

      Labels for the new template.

      Returns:
      labels
    • labels

      public ContentTemplateCreate labels(List<Label> labels)
      Fluent setter for labels.

      Labels for the new template.

      Parameters:
      labels - labels
      Returns:
      this
    • getLabels

      public List<Label> getLabels()
      Gets the value of labels.

      Labels for the new template.

      Returns:
      labels
    • setLabels

      public void setLabels(List<Label> labels)
      Sets the value of labels.

      Labels for the new template.

      Parameters:
      labels - labels
    • space

      public Map<String,Object> space()
      Fluent getter for space.

      The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.

      Returns:
      space
    • space

      public ContentTemplateCreate space(Map<String,Object> space)
      Fluent setter for space.

      The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.

      Parameters:
      space - space
      Returns:
      this
    • getSpace

      public Map<String,Object> getSpace()
      Gets the value of space.

      The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.

      Returns:
      space
    • setSpace

      public void setSpace(Map<String,Object> space)
      Sets the value of space.

      The key for the space of the new template. Only applies to space templates. If the spaceKey is not specified, the template will be created as a global template.

      Parameters:
      space - space
    • 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