001package gov.nist.secauto.oscal.lib.model;
002
003import gov.nist.secauto.metaschema.core.datatype.adapter.TokenAdapter;
004import gov.nist.secauto.metaschema.core.datatype.adapter.UuidAdapter;
005import gov.nist.secauto.metaschema.core.model.IBoundObject;
006import gov.nist.secauto.metaschema.core.model.IMetaschemaData;
007import gov.nist.secauto.metaschema.databind.model.annotations.BoundFlag;
008import gov.nist.secauto.metaschema.databind.model.annotations.MetaschemaAssembly;
009import java.lang.Override;
010import java.lang.String;
011import java.util.UUID;
012import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
013import org.apache.commons.lang3.builder.ToStringStyle;
014
015/**
016 * Used to indicate who created a log entry in what role.
017 */
018@MetaschemaAssembly(
019    formalName = "Logged By",
020    description = "Used to indicate who created a log entry in what role.",
021    name = "logged-by",
022    moduleClass = OscalAssessmentCommonModule.class
023)
024public class LoggedBy implements IBoundObject {
025  private final IMetaschemaData __metaschemaData;
026
027  /**
028   * "A <a href=\"https://pages.nist.gov/OSCAL/concepts/identifier-use/#machine-oriented\">machine-oriented</a> identifier reference to the party who is making the log entry."
029   */
030  @BoundFlag(
031      formalName = "Party UUID Reference",
032      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.",
033      name = "party-uuid",
034      required = true,
035      typeAdapter = UuidAdapter.class
036  )
037  private UUID _partyUuid;
038
039  /**
040   * "A point to the role-id of the role in which the party is making the log entry."
041   */
042  @BoundFlag(
043      formalName = "Actor Role",
044      description = "A point to the role-id of the role in which the party is making the log entry.",
045      name = "role-id",
046      typeAdapter = TokenAdapter.class
047  )
048  private String _roleId;
049
050  public LoggedBy() {
051    this(null);
052  }
053
054  public LoggedBy(IMetaschemaData data) {
055    this.__metaschemaData = data;
056  }
057
058  @Override
059  public IMetaschemaData getMetaschemaData() {
060    return __metaschemaData;
061  }
062
063  public UUID getPartyUuid() {
064    return _partyUuid;
065  }
066
067  public void setPartyUuid(UUID value) {
068    _partyUuid = value;
069  }
070
071  public String getRoleId() {
072    return _roleId;
073  }
074
075  public void setRoleId(String value) {
076    _roleId = value;
077  }
078
079  @Override
080  public String toString() {
081    return new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString();
082  }
083}