package resources // Consent represents a consent request attached to a resource. // ConsentString is the question displayed to the user. // Optional, when true, means the user may decline without blocking scheduling. // A nil Optional is treated as required (false). type Consent struct { ConsentString string `json:"consent_string" bson:"consent_string"` Optional *bool `json:"optional,omitempty" bson:"optional,omitempty"` } func (c Consent) IsOptional() bool { return c.Optional != nil && *c.Optional }