001// Generated from: ../../../../../../../../oscal/src/metaschema/oscal_assessment-common_metaschema.xml 002// Do not edit - changes will be lost when regenerated. 003package dev.metaschema.oscal.lib.model; 004 005import dev.metaschema.core.datatype.adapter.TokenAdapter; 006import dev.metaschema.core.datatype.adapter.UuidAdapter; 007import dev.metaschema.core.datatype.markup.MarkupMultiline; 008import dev.metaschema.core.datatype.markup.MarkupMultilineAdapter; 009import dev.metaschema.core.model.IBoundObject; 010import dev.metaschema.core.model.IMetaschemaData; 011import dev.metaschema.core.util.ObjectUtils; 012import dev.metaschema.databind.model.annotations.BoundField; 013import dev.metaschema.databind.model.annotations.BoundFlag; 014import dev.metaschema.databind.model.annotations.MetaschemaAssembly; 015import edu.umd.cs.findbugs.annotations.NonNull; 016import edu.umd.cs.findbugs.annotations.Nullable; 017import java.util.UUID; 018import org.apache.commons.lang3.builder.ReflectionToStringBuilder; 019import org.apache.commons.lang3.builder.ToStringStyle; 020 021/** 022 * Used to indicate who created a log entry in what role. 023 */ 024@MetaschemaAssembly( 025 formalName = "Logged By", 026 description = "Used to indicate who created a log entry in what role.", 027 name = "logged-by", 028 moduleClass = OscalAssessmentCommonModule.class 029) 030public class LoggedBy implements IBoundObject { 031 private final IMetaschemaData __metaschemaData; 032 033 /** 034 * 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. 035 */ 036 @BoundFlag( 037 formalName = "Party UUID Reference", 038 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.", 039 name = "party-uuid", 040 required = true, 041 typeAdapter = UuidAdapter.class 042 ) 043 private UUID _partyUuid; 044 045 /** 046 * A point to the role-id of the role in which the party is making the log entry. 047 */ 048 @BoundFlag( 049 formalName = "Actor Role", 050 description = "A point to the role-id of the role in which the party is making the log entry.", 051 name = "role-id", 052 typeAdapter = TokenAdapter.class 053 ) 054 private String _roleId; 055 056 /** 057 * Additional commentary about the containing object. 058 */ 059 @BoundField( 060 formalName = "Remarks", 061 description = "Additional commentary about the containing object.", 062 useName = "remarks", 063 typeAdapter = MarkupMultilineAdapter.class 064 ) 065 private MarkupMultiline _remarks; 066 067 /** 068 * Constructs a new {@code dev.metaschema.oscal.lib.model.LoggedBy} instance with no metadata. 069 */ 070 public LoggedBy() { 071 this(null); 072 } 073 074 /** 075 * Constructs a new {@code dev.metaschema.oscal.lib.model.LoggedBy} instance with the specified metadata. 076 * 077 * @param data 078 * the metaschema data, or {@code null} if none 079 */ 080 public LoggedBy(IMetaschemaData data) { 081 this.__metaschemaData = data; 082 } 083 084 @Override 085 public IMetaschemaData getMetaschemaData() { 086 return __metaschemaData; 087 } 088 089 /** 090 * Get the "{@literal Party UUID Reference}". 091 * 092 * <p> 093 * 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. 094 * 095 * @return the party-uuid value 096 */ 097 @NonNull 098 public UUID getPartyUuid() { 099 return _partyUuid; 100 } 101 102 /** 103 * Set the "{@literal Party UUID Reference}". 104 * 105 * <p> 106 * 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. 107 * 108 * @param value 109 * the party-uuid value to set 110 */ 111 public void setPartyUuid(@NonNull UUID value) { 112 _partyUuid = value; 113 } 114 115 /** 116 * Get the "{@literal Actor Role}". 117 * 118 * <p> 119 * A point to the role-id of the role in which the party is making the log entry. 120 * 121 * @return the role-id value, or {@code null} if not set 122 */ 123 @Nullable 124 public String getRoleId() { 125 return _roleId; 126 } 127 128 /** 129 * Set the "{@literal Actor Role}". 130 * 131 * <p> 132 * A point to the role-id of the role in which the party is making the log entry. 133 * 134 * @param value 135 * the role-id value to set, or {@code null} to clear 136 */ 137 public void setRoleId(@Nullable String value) { 138 _roleId = value; 139 } 140 141 /** 142 * Get the "{@literal Remarks}". 143 * 144 * <p> 145 * Additional commentary about the containing object. 146 * 147 * @return the remarks value, or {@code null} if not set 148 */ 149 @Nullable 150 public MarkupMultiline getRemarks() { 151 return _remarks; 152 } 153 154 /** 155 * Set the "{@literal Remarks}". 156 * 157 * <p> 158 * Additional commentary about the containing object. 159 * 160 * @param value 161 * the remarks value to set, or {@code null} to clear 162 */ 163 public void setRemarks(@Nullable MarkupMultiline value) { 164 _remarks = value; 165 } 166 167 @Override 168 public String toString() { 169 return ObjectUtils.notNull(new ReflectionToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE).toString()); 170 } 171}