LoggedBy.java

package gov.nist.secauto.oscal.lib.model;

import gov.nist.secauto.metaschema.binding.model.annotations.BoundFlag;
import gov.nist.secauto.metaschema.binding.model.annotations.MetaschemaAssembly;
import gov.nist.secauto.metaschema.model.common.datatype.adapter.TokenAdapter;
import gov.nist.secauto.metaschema.model.common.datatype.adapter.UuidAdapter;
import java.lang.Override;
import java.lang.String;
import java.util.UUID;
import org.apache.commons.lang3.builder.MultilineRecursiveToStringStyle;
import org.apache.commons.lang3.builder.ReflectionToStringBuilder;

/**
 * Used to indicate who created a log entry in what role.
 */
@MetaschemaAssembly(
    formalName = "Logged By",
    description = "Used to indicate who created a log entry in what role.",
    name = "logged-by",
    metaschema = OscalAssessmentCommonMetaschema.class
)
public class LoggedBy {
  @BoundFlag(
      formalName = "Party UUID Reference",
      description = "A [machine-oriented](https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented) identifier reference to the party who is making the log entry.",
      useName = "party-uuid",
      required = true,
      typeAdapter = UuidAdapter.class
  )
  private UUID _partyUuid;

  @BoundFlag(
      formalName = "Actor Role",
      description = "A point to the role-id of the role in which the party is making the log entry.",
      useName = "role-id",
      typeAdapter = TokenAdapter.class
  )
  private String _roleId;

  public LoggedBy() {
  }

  public UUID getPartyUuid() {
    return _partyUuid;
  }

  public void setPartyUuid(UUID value) {
    _partyUuid = value;
  }

  public String getRoleId() {
    return _roleId;
  }

  public void setRoleId(String value) {
    _roleId = value;
  }

  @Override
  public String toString() {
    return new ReflectionToStringBuilder(this, MultilineRecursiveToStringStyle.MULTI_LINE_STYLE).toString();
  }
}