Class SpacePermissionV2

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

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

This object represents a single space permission. Permissions consist of at least one operation object with an accompanying subjects object. The following combinations of `operation.key` and `operation.target` values are valid for the `operation` object: ``` bash 'create': 'page', 'blogpost', 'comment', 'attachment' 'read': 'space' 'delete': 'page', 'blogpost', 'comment', 'attachment', 'space' 'export': 'space' 'administer': 'space' 'archive': 'page' 'restrict_content': 'space' ``` For example, to enable Delete Own permission, set the `operation` object to the following: ``` "operation": { "key": "delete", "target": "space" } ``` To enable Add/Delete Restrictions permissions, set the `operation` object to the following: ``` "operation": { "key": "restrict_content", "target": "space" } ```

  • Field Details

    • id

      protected Long id
    • subject

      protected PermissionSubject subject
      The user or group that the permission applies to.
    • operation

      protected Operation operation
  • Constructor Details

    • SpacePermissionV2

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

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

      @Internal public SpacePermissionV2(Long id, PermissionSubject subject, Operation operation, Map<String,Object> additionalLinks)
      Constructs a validated instance of SpacePermissionV2.

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

      Parameters:
      id - id
      subject - The user or group that the permission applies to.
      operation - operation
      additionalLinks - additionalLinks
  • Method Details

    • id

      public Long id()
      Fluent getter for id.
      Returns:
      id
    • id

      public SpacePermissionV2 id(Long id)
      Fluent setter for id.
      Parameters:
      id - id
      Returns:
      this
    • getId

      public Long getId()
      Gets the value of id.
      Returns:
      id
    • setId

      public void setId(Long id)
      Sets the value of id.
      Parameters:
      id - id
    • subject

      public PermissionSubject subject()
      Fluent getter for subject.

      The user or group that the permission applies to.

      Returns:
      subject
    • subject

      public SpacePermissionV2 subject(PermissionSubject subject)
      Fluent setter for subject.

      The user or group that the permission applies to.

      Parameters:
      subject - subject
      Returns:
      this
    • getSubject

      public PermissionSubject getSubject()
      Gets the value of subject.

      The user or group that the permission applies to.

      Returns:
      subject
    • setSubject

      public void setSubject(PermissionSubject subject)
      Sets the value of subject.

      The user or group that the permission applies to.

      Parameters:
      subject - subject
    • operation

      public Operation operation()
      Fluent getter for operation.
      Returns:
      operation
    • operation

      public SpacePermissionV2 operation(Operation operation)
      Fluent setter for operation.
      Parameters:
      operation - operation
      Returns:
      this
    • getOperation

      public Operation getOperation()
      Gets the value of operation.
      Returns:
      operation
    • setOperation

      public void setOperation(Operation operation)
      Sets the value of operation.
      Parameters:
      operation - operation
    • additionalLinks

      public Map<String,Object> additionalLinks()
      Fluent getter for additionalLinks.
      Returns:
      additionalLinks
    • additionalLinks

      public SpacePermissionV2 additionalLinks(Map<String,Object> additionalLinks)
      Fluent setter for additionalLinks.
      Parameters:
      additionalLinks - additionalLinks
      Returns:
      this
    • getAdditionalLinks

      public Map<String,Object> getAdditionalLinks()
      Gets the value of additionalLinks.
      Returns:
      additionalLinks
    • setAdditionalLinks

      public void setAdditionalLinks(Map<String,Object> additionalLinks)
      Sets the value of additionalLinks.
      Parameters:
      additionalLinks - additionalLinks
    • 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