25786 lines
793 KiB
Go
25786 lines
793 KiB
Go
// Code generated by ogen, DO NOT EDIT.
|
|
|
|
package api
|
|
|
|
import (
|
|
"fmt"
|
|
"time"
|
|
|
|
"github.com/go-faster/errors"
|
|
"github.com/google/uuid"
|
|
)
|
|
|
|
func (s *ProblemStatusCode) Error() string {
|
|
return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response)
|
|
}
|
|
|
|
type AcceptMyInvitationBadRequest Problem
|
|
|
|
func (*AcceptMyInvitationBadRequest) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationConflict Problem
|
|
|
|
func (*AcceptMyInvitationConflict) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationForbidden Problem
|
|
|
|
func (*AcceptMyInvitationForbidden) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationNotFound Problem
|
|
|
|
func (*AcceptMyInvitationNotFound) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationPreconditionFailed Problem
|
|
|
|
func (*AcceptMyInvitationPreconditionFailed) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationUnauthorized Problem
|
|
|
|
func (*AcceptMyInvitationUnauthorized) acceptMyInvitationRes() {}
|
|
|
|
type AcceptMyInvitationUnprocessableEntity Problem
|
|
|
|
func (*AcceptMyInvitationUnprocessableEntity) acceptMyInvitationRes() {}
|
|
|
|
// Current account view. It never contains password hashes, token hashes, session identifiers, or other
|
|
// storage secrets.
|
|
// Ref: #/components/schemas/Account
|
|
type Account struct {
|
|
// Account identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Email EmailAddress `json:"email"`
|
|
// Whether the address is verified. A session exists only for a verified account, so this is true in
|
|
// every current response.
|
|
EmailVerified bool `json:"email_verified"`
|
|
Scenario AccountScenario `json:"scenario"`
|
|
OnboardingStep OnboardingStep `json:"onboarding_step"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *Account) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *Account) GetEmail() EmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// GetEmailVerified returns the value of EmailVerified.
|
|
func (s *Account) GetEmailVerified() bool {
|
|
return s.EmailVerified
|
|
}
|
|
|
|
// GetScenario returns the value of Scenario.
|
|
func (s *Account) GetScenario() AccountScenario {
|
|
return s.Scenario
|
|
}
|
|
|
|
// GetOnboardingStep returns the value of OnboardingStep.
|
|
func (s *Account) GetOnboardingStep() OnboardingStep {
|
|
return s.OnboardingStep
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *Account) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *Account) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *Account) SetEmail(val EmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetEmailVerified sets the value of EmailVerified.
|
|
func (s *Account) SetEmailVerified(val bool) {
|
|
s.EmailVerified = val
|
|
}
|
|
|
|
// SetScenario sets the value of Scenario.
|
|
func (s *Account) SetScenario(val AccountScenario) {
|
|
s.Scenario = val
|
|
}
|
|
|
|
// SetOnboardingStep sets the value of OnboardingStep.
|
|
func (s *Account) SetOnboardingStep(val OnboardingStep) {
|
|
s.OnboardingStep = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *Account) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// AccountHeaders wraps Account with response headers.
|
|
type AccountHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response Account
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *AccountHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *AccountHeaders) GetResponse() Account {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *AccountHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *AccountHeaders) SetResponse(val Account) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*AccountHeaders) getCurrentAccountRes() {}
|
|
|
|
// Scenario chosen at registration: `candidate` looks for an offer and passes the assessment,
|
|
// `employer` represents a company that searches for candidates. The scenario selects the onboarding
|
|
// steps.
|
|
// Ref: #/components/schemas/AccountScenario
|
|
type AccountScenario string
|
|
|
|
const (
|
|
AccountScenarioCandidate AccountScenario = "candidate"
|
|
AccountScenarioEmployer AccountScenario = "employer"
|
|
)
|
|
|
|
// AllValues returns all AccountScenario values.
|
|
func (AccountScenario) AllValues() []AccountScenario {
|
|
return []AccountScenario{
|
|
AccountScenarioCandidate,
|
|
AccountScenarioEmployer,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AccountScenario) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AccountScenarioCandidate:
|
|
return []byte(s), nil
|
|
case AccountScenarioEmployer:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AccountScenario) UnmarshalText(data []byte) error {
|
|
switch AccountScenario(data) {
|
|
case AccountScenarioCandidate:
|
|
*s = AccountScenarioCandidate
|
|
return nil
|
|
case AccountScenarioEmployer:
|
|
*s = AccountScenarioEmployer
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The anonymous candidate card as an organization reads it. Only values that the candidate confirmed
|
|
// reach it; an unconfirmed suggestion and an unknown value never do. A free text value (a stack tag, a
|
|
// soft skill, the location) that looks like a contact (an email address, a phone number, a URL or
|
|
// domain, a Telegram link, an @handle) is dropped by the builder and never published. It carries no
|
|
// name, contact, resume text, employer, salary figure, account or profile identifier, and no schema of
|
|
// the private profile or of a contact disclosure is reachable from it; a contact reaches an
|
|
// organization only through the contact grant of an accepted invitation. Each property is null when
|
|
// its field is not published or the candidate has no value for it, so the card does not tell the two
|
|
// apart. The set of properties is closed, and an organization-visible card must never gain a property
|
|
// that identifies the candidate. The search ranking and the full card of an organization's search
|
|
// result are defined by the search contract, which reuses this content.
|
|
// Ref: #/components/schemas/AnonymousCardContent
|
|
type AnonymousCardContent struct {
|
|
// Categories confirmed by assessment results, or null.
|
|
Categories []CardCategory `json:"categories"`
|
|
// Technology tags of the candidate, or null.
|
|
Stack []StackTag `json:"stack"`
|
|
// Total months of work experience, summed by the server without the employers, periods, or
|
|
// descriptions, or null.
|
|
ExperienceMonths NilInt `json:"experience_months"`
|
|
// Soft skills of the candidate, or null.
|
|
SoftSkills []string `json:"soft_skills"`
|
|
// City or region as free text, never a street address, or null. Plain text; clients show it as text,
|
|
// never as HTML.
|
|
Location NilString `json:"location"`
|
|
// Whether the candidate is ready to relocate, or null.
|
|
Relocation NilBool `json:"relocation"`
|
|
}
|
|
|
|
// GetCategories returns the value of Categories.
|
|
func (s *AnonymousCardContent) GetCategories() []CardCategory {
|
|
return s.Categories
|
|
}
|
|
|
|
// GetStack returns the value of Stack.
|
|
func (s *AnonymousCardContent) GetStack() []StackTag {
|
|
return s.Stack
|
|
}
|
|
|
|
// GetExperienceMonths returns the value of ExperienceMonths.
|
|
func (s *AnonymousCardContent) GetExperienceMonths() NilInt {
|
|
return s.ExperienceMonths
|
|
}
|
|
|
|
// GetSoftSkills returns the value of SoftSkills.
|
|
func (s *AnonymousCardContent) GetSoftSkills() []string {
|
|
return s.SoftSkills
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *AnonymousCardContent) GetLocation() NilString {
|
|
return s.Location
|
|
}
|
|
|
|
// GetRelocation returns the value of Relocation.
|
|
func (s *AnonymousCardContent) GetRelocation() NilBool {
|
|
return s.Relocation
|
|
}
|
|
|
|
// SetCategories sets the value of Categories.
|
|
func (s *AnonymousCardContent) SetCategories(val []CardCategory) {
|
|
s.Categories = val
|
|
}
|
|
|
|
// SetStack sets the value of Stack.
|
|
func (s *AnonymousCardContent) SetStack(val []StackTag) {
|
|
s.Stack = val
|
|
}
|
|
|
|
// SetExperienceMonths sets the value of ExperienceMonths.
|
|
func (s *AnonymousCardContent) SetExperienceMonths(val NilInt) {
|
|
s.ExperienceMonths = val
|
|
}
|
|
|
|
// SetSoftSkills sets the value of SoftSkills.
|
|
func (s *AnonymousCardContent) SetSoftSkills(val []string) {
|
|
s.SoftSkills = val
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *AnonymousCardContent) SetLocation(val NilString) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetRelocation sets the value of Relocation.
|
|
func (s *AnonymousCardContent) SetRelocation(val NilBool) {
|
|
s.Relocation = val
|
|
}
|
|
|
|
// Candidate answer, selected by `format`, which must equal the format of the answered item. It carries
|
|
// only the answer: no score, duration, correctness flag, or seed. The server records the times itself
|
|
// and scores the answer with the key of the fixed item instance. Each format defines when two answers
|
|
// are equal, which decides whether a repeated submission is the same answer.
|
|
// Ref: #/components/schemas/AssessmentAnswer
|
|
// AssessmentAnswer represents sum type.
|
|
type AssessmentAnswer struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type AssessmentAnswerType
|
|
ChoiceAnswer ChoiceAnswer
|
|
NumberAnswer NumberAnswer
|
|
StringAnswer StringAnswer
|
|
OrderAnswer OrderAnswer
|
|
FindErrorAnswer FindErrorAnswer
|
|
ConfigurationAnswer ConfigurationAnswer
|
|
PracticeAnswer PracticeAnswer
|
|
}
|
|
|
|
// AssessmentAnswerType is oneOf type of AssessmentAnswer.
|
|
type AssessmentAnswerType string
|
|
|
|
// Possible values for AssessmentAnswerType.
|
|
const (
|
|
ChoiceAnswerAssessmentAnswer AssessmentAnswerType = "ChoiceAnswer"
|
|
NumberAnswerAssessmentAnswer AssessmentAnswerType = "NumberAnswer"
|
|
StringAnswerAssessmentAnswer AssessmentAnswerType = "StringAnswer"
|
|
OrderAnswerAssessmentAnswer AssessmentAnswerType = "OrderAnswer"
|
|
FindErrorAnswerAssessmentAnswer AssessmentAnswerType = "FindErrorAnswer"
|
|
ConfigurationAnswerAssessmentAnswer AssessmentAnswerType = "ConfigurationAnswer"
|
|
PracticeAnswerAssessmentAnswer AssessmentAnswerType = "PracticeAnswer"
|
|
)
|
|
|
|
// IsChoiceAnswer reports whether AssessmentAnswer is ChoiceAnswer.
|
|
func (s AssessmentAnswer) IsChoiceAnswer() bool { return s.Type == ChoiceAnswerAssessmentAnswer }
|
|
|
|
// IsNumberAnswer reports whether AssessmentAnswer is NumberAnswer.
|
|
func (s AssessmentAnswer) IsNumberAnswer() bool { return s.Type == NumberAnswerAssessmentAnswer }
|
|
|
|
// IsStringAnswer reports whether AssessmentAnswer is StringAnswer.
|
|
func (s AssessmentAnswer) IsStringAnswer() bool { return s.Type == StringAnswerAssessmentAnswer }
|
|
|
|
// IsOrderAnswer reports whether AssessmentAnswer is OrderAnswer.
|
|
func (s AssessmentAnswer) IsOrderAnswer() bool { return s.Type == OrderAnswerAssessmentAnswer }
|
|
|
|
// IsFindErrorAnswer reports whether AssessmentAnswer is FindErrorAnswer.
|
|
func (s AssessmentAnswer) IsFindErrorAnswer() bool { return s.Type == FindErrorAnswerAssessmentAnswer }
|
|
|
|
// IsConfigurationAnswer reports whether AssessmentAnswer is ConfigurationAnswer.
|
|
func (s AssessmentAnswer) IsConfigurationAnswer() bool {
|
|
return s.Type == ConfigurationAnswerAssessmentAnswer
|
|
}
|
|
|
|
// IsPracticeAnswer reports whether AssessmentAnswer is PracticeAnswer.
|
|
func (s AssessmentAnswer) IsPracticeAnswer() bool { return s.Type == PracticeAnswerAssessmentAnswer }
|
|
|
|
// SetChoiceAnswer sets AssessmentAnswer to ChoiceAnswer.
|
|
func (s *AssessmentAnswer) SetChoiceAnswer(v ChoiceAnswer) {
|
|
s.Type = ChoiceAnswerAssessmentAnswer
|
|
s.ChoiceAnswer = v
|
|
}
|
|
|
|
// GetChoiceAnswer returns ChoiceAnswer and true boolean if AssessmentAnswer is ChoiceAnswer.
|
|
func (s AssessmentAnswer) GetChoiceAnswer() (v ChoiceAnswer, ok bool) {
|
|
if !s.IsChoiceAnswer() {
|
|
return v, false
|
|
}
|
|
return s.ChoiceAnswer, true
|
|
}
|
|
|
|
// NewChoiceAnswerAssessmentAnswer returns new AssessmentAnswer from ChoiceAnswer.
|
|
func NewChoiceAnswerAssessmentAnswer(v ChoiceAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetChoiceAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetNumberAnswer sets AssessmentAnswer to NumberAnswer.
|
|
func (s *AssessmentAnswer) SetNumberAnswer(v NumberAnswer) {
|
|
s.Type = NumberAnswerAssessmentAnswer
|
|
s.NumberAnswer = v
|
|
}
|
|
|
|
// GetNumberAnswer returns NumberAnswer and true boolean if AssessmentAnswer is NumberAnswer.
|
|
func (s AssessmentAnswer) GetNumberAnswer() (v NumberAnswer, ok bool) {
|
|
if !s.IsNumberAnswer() {
|
|
return v, false
|
|
}
|
|
return s.NumberAnswer, true
|
|
}
|
|
|
|
// NewNumberAnswerAssessmentAnswer returns new AssessmentAnswer from NumberAnswer.
|
|
func NewNumberAnswerAssessmentAnswer(v NumberAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetNumberAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetStringAnswer sets AssessmentAnswer to StringAnswer.
|
|
func (s *AssessmentAnswer) SetStringAnswer(v StringAnswer) {
|
|
s.Type = StringAnswerAssessmentAnswer
|
|
s.StringAnswer = v
|
|
}
|
|
|
|
// GetStringAnswer returns StringAnswer and true boolean if AssessmentAnswer is StringAnswer.
|
|
func (s AssessmentAnswer) GetStringAnswer() (v StringAnswer, ok bool) {
|
|
if !s.IsStringAnswer() {
|
|
return v, false
|
|
}
|
|
return s.StringAnswer, true
|
|
}
|
|
|
|
// NewStringAnswerAssessmentAnswer returns new AssessmentAnswer from StringAnswer.
|
|
func NewStringAnswerAssessmentAnswer(v StringAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetStringAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetOrderAnswer sets AssessmentAnswer to OrderAnswer.
|
|
func (s *AssessmentAnswer) SetOrderAnswer(v OrderAnswer) {
|
|
s.Type = OrderAnswerAssessmentAnswer
|
|
s.OrderAnswer = v
|
|
}
|
|
|
|
// GetOrderAnswer returns OrderAnswer and true boolean if AssessmentAnswer is OrderAnswer.
|
|
func (s AssessmentAnswer) GetOrderAnswer() (v OrderAnswer, ok bool) {
|
|
if !s.IsOrderAnswer() {
|
|
return v, false
|
|
}
|
|
return s.OrderAnswer, true
|
|
}
|
|
|
|
// NewOrderAnswerAssessmentAnswer returns new AssessmentAnswer from OrderAnswer.
|
|
func NewOrderAnswerAssessmentAnswer(v OrderAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetOrderAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetFindErrorAnswer sets AssessmentAnswer to FindErrorAnswer.
|
|
func (s *AssessmentAnswer) SetFindErrorAnswer(v FindErrorAnswer) {
|
|
s.Type = FindErrorAnswerAssessmentAnswer
|
|
s.FindErrorAnswer = v
|
|
}
|
|
|
|
// GetFindErrorAnswer returns FindErrorAnswer and true boolean if AssessmentAnswer is FindErrorAnswer.
|
|
func (s AssessmentAnswer) GetFindErrorAnswer() (v FindErrorAnswer, ok bool) {
|
|
if !s.IsFindErrorAnswer() {
|
|
return v, false
|
|
}
|
|
return s.FindErrorAnswer, true
|
|
}
|
|
|
|
// NewFindErrorAnswerAssessmentAnswer returns new AssessmentAnswer from FindErrorAnswer.
|
|
func NewFindErrorAnswerAssessmentAnswer(v FindErrorAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetFindErrorAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetConfigurationAnswer sets AssessmentAnswer to ConfigurationAnswer.
|
|
func (s *AssessmentAnswer) SetConfigurationAnswer(v ConfigurationAnswer) {
|
|
s.Type = ConfigurationAnswerAssessmentAnswer
|
|
s.ConfigurationAnswer = v
|
|
}
|
|
|
|
// GetConfigurationAnswer returns ConfigurationAnswer and true boolean if AssessmentAnswer is ConfigurationAnswer.
|
|
func (s AssessmentAnswer) GetConfigurationAnswer() (v ConfigurationAnswer, ok bool) {
|
|
if !s.IsConfigurationAnswer() {
|
|
return v, false
|
|
}
|
|
return s.ConfigurationAnswer, true
|
|
}
|
|
|
|
// NewConfigurationAnswerAssessmentAnswer returns new AssessmentAnswer from ConfigurationAnswer.
|
|
func NewConfigurationAnswerAssessmentAnswer(v ConfigurationAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetConfigurationAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// SetPracticeAnswer sets AssessmentAnswer to PracticeAnswer.
|
|
func (s *AssessmentAnswer) SetPracticeAnswer(v PracticeAnswer) {
|
|
s.Type = PracticeAnswerAssessmentAnswer
|
|
s.PracticeAnswer = v
|
|
}
|
|
|
|
// GetPracticeAnswer returns PracticeAnswer and true boolean if AssessmentAnswer is PracticeAnswer.
|
|
func (s AssessmentAnswer) GetPracticeAnswer() (v PracticeAnswer, ok bool) {
|
|
if !s.IsPracticeAnswer() {
|
|
return v, false
|
|
}
|
|
return s.PracticeAnswer, true
|
|
}
|
|
|
|
// NewPracticeAnswerAssessmentAnswer returns new AssessmentAnswer from PracticeAnswer.
|
|
func NewPracticeAnswerAssessmentAnswer(v PracticeAnswer) AssessmentAnswer {
|
|
var s AssessmentAnswer
|
|
s.SetPracticeAnswer(v)
|
|
return s
|
|
}
|
|
|
|
// Answer to one item of the attempt. Unknown fields are rejected, so a request cannot send a score, a
|
|
// duration, or a correctness flag.
|
|
// Ref: #/components/schemas/AssessmentAnswerSubmission
|
|
type AssessmentAnswerSubmission struct {
|
|
ExpectedVersion AssessmentAttemptVersion `json:"expected_version"`
|
|
ItemID AssessmentItemId `json:"item_id"`
|
|
Answer AssessmentAnswer `json:"answer"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *AssessmentAnswerSubmission) GetExpectedVersion() AssessmentAttemptVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetItemID returns the value of ItemID.
|
|
func (s *AssessmentAnswerSubmission) GetItemID() AssessmentItemId {
|
|
return s.ItemID
|
|
}
|
|
|
|
// GetAnswer returns the value of Answer.
|
|
func (s *AssessmentAnswerSubmission) GetAnswer() AssessmentAnswer {
|
|
return s.Answer
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *AssessmentAnswerSubmission) SetExpectedVersion(val AssessmentAttemptVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetItemID sets the value of ItemID.
|
|
func (s *AssessmentAnswerSubmission) SetItemID(val AssessmentItemId) {
|
|
s.ItemID = val
|
|
}
|
|
|
|
// SetAnswer sets the value of Answer.
|
|
func (s *AssessmentAnswerSubmission) SetAnswer(val AssessmentAnswer) {
|
|
s.Answer = val
|
|
}
|
|
|
|
// Candidate view of a real assessment, a corrective real assessment, or a demo_express training run.
|
|
// The variants keep training output separate from qualification attempts.
|
|
// Ref: #/components/schemas/AssessmentAttempt
|
|
// AssessmentAttempt represents sum type.
|
|
type AssessmentAttempt struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type AssessmentAttemptType
|
|
AssessmentQualifiedAttempt AssessmentQualifiedAttempt
|
|
AssessmentCorrectiveAttempt AssessmentCorrectiveAttempt
|
|
AssessmentExpressAttempt AssessmentExpressAttempt
|
|
}
|
|
|
|
// AssessmentAttemptType is oneOf type of AssessmentAttempt.
|
|
type AssessmentAttemptType string
|
|
|
|
// Possible values for AssessmentAttemptType.
|
|
const (
|
|
AssessmentQualifiedAttemptAssessmentAttempt AssessmentAttemptType = "root"
|
|
AssessmentCorrectiveAttemptAssessmentAttempt AssessmentAttemptType = "corrective"
|
|
AssessmentExpressAttemptAssessmentAttempt AssessmentAttemptType = "demo_express"
|
|
)
|
|
|
|
// IsAssessmentQualifiedAttempt reports whether AssessmentAttempt is AssessmentQualifiedAttempt.
|
|
func (s AssessmentAttempt) IsAssessmentQualifiedAttempt() bool {
|
|
return s.Type == AssessmentQualifiedAttemptAssessmentAttempt
|
|
}
|
|
|
|
// IsAssessmentCorrectiveAttempt reports whether AssessmentAttempt is AssessmentCorrectiveAttempt.
|
|
func (s AssessmentAttempt) IsAssessmentCorrectiveAttempt() bool {
|
|
return s.Type == AssessmentCorrectiveAttemptAssessmentAttempt
|
|
}
|
|
|
|
// IsAssessmentExpressAttempt reports whether AssessmentAttempt is AssessmentExpressAttempt.
|
|
func (s AssessmentAttempt) IsAssessmentExpressAttempt() bool {
|
|
return s.Type == AssessmentExpressAttemptAssessmentAttempt
|
|
}
|
|
|
|
// SetAssessmentQualifiedAttempt sets AssessmentAttempt to AssessmentQualifiedAttempt.
|
|
func (s *AssessmentAttempt) SetAssessmentQualifiedAttempt(v AssessmentQualifiedAttempt) {
|
|
s.Type = AssessmentQualifiedAttemptAssessmentAttempt
|
|
s.AssessmentQualifiedAttempt = v
|
|
}
|
|
|
|
// GetAssessmentQualifiedAttempt returns AssessmentQualifiedAttempt and true boolean if AssessmentAttempt is AssessmentQualifiedAttempt.
|
|
func (s AssessmentAttempt) GetAssessmentQualifiedAttempt() (v AssessmentQualifiedAttempt, ok bool) {
|
|
if !s.IsAssessmentQualifiedAttempt() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentQualifiedAttempt, true
|
|
}
|
|
|
|
// NewAssessmentQualifiedAttemptAssessmentAttempt returns new AssessmentAttempt from AssessmentQualifiedAttempt.
|
|
func NewAssessmentQualifiedAttemptAssessmentAttempt(v AssessmentQualifiedAttempt) AssessmentAttempt {
|
|
var s AssessmentAttempt
|
|
s.SetAssessmentQualifiedAttempt(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentCorrectiveAttempt sets AssessmentAttempt to AssessmentCorrectiveAttempt.
|
|
func (s *AssessmentAttempt) SetAssessmentCorrectiveAttempt(v AssessmentCorrectiveAttempt) {
|
|
s.Type = AssessmentCorrectiveAttemptAssessmentAttempt
|
|
s.AssessmentCorrectiveAttempt = v
|
|
}
|
|
|
|
// GetAssessmentCorrectiveAttempt returns AssessmentCorrectiveAttempt and true boolean if AssessmentAttempt is AssessmentCorrectiveAttempt.
|
|
func (s AssessmentAttempt) GetAssessmentCorrectiveAttempt() (v AssessmentCorrectiveAttempt, ok bool) {
|
|
if !s.IsAssessmentCorrectiveAttempt() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentCorrectiveAttempt, true
|
|
}
|
|
|
|
// NewAssessmentCorrectiveAttemptAssessmentAttempt returns new AssessmentAttempt from AssessmentCorrectiveAttempt.
|
|
func NewAssessmentCorrectiveAttemptAssessmentAttempt(v AssessmentCorrectiveAttempt) AssessmentAttempt {
|
|
var s AssessmentAttempt
|
|
s.SetAssessmentCorrectiveAttempt(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentExpressAttempt sets AssessmentAttempt to AssessmentExpressAttempt.
|
|
func (s *AssessmentAttempt) SetAssessmentExpressAttempt(v AssessmentExpressAttempt) {
|
|
s.Type = AssessmentExpressAttemptAssessmentAttempt
|
|
s.AssessmentExpressAttempt = v
|
|
}
|
|
|
|
// GetAssessmentExpressAttempt returns AssessmentExpressAttempt and true boolean if AssessmentAttempt is AssessmentExpressAttempt.
|
|
func (s AssessmentAttempt) GetAssessmentExpressAttempt() (v AssessmentExpressAttempt, ok bool) {
|
|
if !s.IsAssessmentExpressAttempt() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentExpressAttempt, true
|
|
}
|
|
|
|
// NewAssessmentExpressAttemptAssessmentAttempt returns new AssessmentAttempt from AssessmentExpressAttempt.
|
|
func NewAssessmentExpressAttemptAssessmentAttempt(v AssessmentExpressAttempt) AssessmentAttempt {
|
|
var s AssessmentAttempt
|
|
s.SetAssessmentExpressAttempt(v)
|
|
return s
|
|
}
|
|
|
|
// Start a real assessment, a corrective attempt in an existing chain, or an explicit training run. The
|
|
// required `kind` discriminator selects one of the three request shapes; `mode` remains
|
|
// server-selected for real assessments.
|
|
// Ref: #/components/schemas/AssessmentAttemptCreate
|
|
// AssessmentAttemptCreate represents sum type.
|
|
type AssessmentAttemptCreate struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type AssessmentAttemptCreateType
|
|
AssessmentQualifiedAttemptCreate AssessmentQualifiedAttemptCreate
|
|
AssessmentCorrectiveAttemptCreate AssessmentCorrectiveAttemptCreate
|
|
AssessmentExpressAttemptCreate AssessmentExpressAttemptCreate
|
|
}
|
|
|
|
// AssessmentAttemptCreateType is oneOf type of AssessmentAttemptCreate.
|
|
type AssessmentAttemptCreateType string
|
|
|
|
// Possible values for AssessmentAttemptCreateType.
|
|
const (
|
|
AssessmentQualifiedAttemptCreateAssessmentAttemptCreate AssessmentAttemptCreateType = "root"
|
|
AssessmentCorrectiveAttemptCreateAssessmentAttemptCreate AssessmentAttemptCreateType = "corrective"
|
|
AssessmentExpressAttemptCreateAssessmentAttemptCreate AssessmentAttemptCreateType = "demo_express"
|
|
)
|
|
|
|
// IsAssessmentQualifiedAttemptCreate reports whether AssessmentAttemptCreate is AssessmentQualifiedAttemptCreate.
|
|
func (s AssessmentAttemptCreate) IsAssessmentQualifiedAttemptCreate() bool {
|
|
return s.Type == AssessmentQualifiedAttemptCreateAssessmentAttemptCreate
|
|
}
|
|
|
|
// IsAssessmentCorrectiveAttemptCreate reports whether AssessmentAttemptCreate is AssessmentCorrectiveAttemptCreate.
|
|
func (s AssessmentAttemptCreate) IsAssessmentCorrectiveAttemptCreate() bool {
|
|
return s.Type == AssessmentCorrectiveAttemptCreateAssessmentAttemptCreate
|
|
}
|
|
|
|
// IsAssessmentExpressAttemptCreate reports whether AssessmentAttemptCreate is AssessmentExpressAttemptCreate.
|
|
func (s AssessmentAttemptCreate) IsAssessmentExpressAttemptCreate() bool {
|
|
return s.Type == AssessmentExpressAttemptCreateAssessmentAttemptCreate
|
|
}
|
|
|
|
// SetAssessmentQualifiedAttemptCreate sets AssessmentAttemptCreate to AssessmentQualifiedAttemptCreate.
|
|
func (s *AssessmentAttemptCreate) SetAssessmentQualifiedAttemptCreate(v AssessmentQualifiedAttemptCreate) {
|
|
s.Type = AssessmentQualifiedAttemptCreateAssessmentAttemptCreate
|
|
s.AssessmentQualifiedAttemptCreate = v
|
|
}
|
|
|
|
// GetAssessmentQualifiedAttemptCreate returns AssessmentQualifiedAttemptCreate and true boolean if AssessmentAttemptCreate is AssessmentQualifiedAttemptCreate.
|
|
func (s AssessmentAttemptCreate) GetAssessmentQualifiedAttemptCreate() (v AssessmentQualifiedAttemptCreate, ok bool) {
|
|
if !s.IsAssessmentQualifiedAttemptCreate() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentQualifiedAttemptCreate, true
|
|
}
|
|
|
|
// NewAssessmentQualifiedAttemptCreateAssessmentAttemptCreate returns new AssessmentAttemptCreate from AssessmentQualifiedAttemptCreate.
|
|
func NewAssessmentQualifiedAttemptCreateAssessmentAttemptCreate(v AssessmentQualifiedAttemptCreate) AssessmentAttemptCreate {
|
|
var s AssessmentAttemptCreate
|
|
s.SetAssessmentQualifiedAttemptCreate(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentCorrectiveAttemptCreate sets AssessmentAttemptCreate to AssessmentCorrectiveAttemptCreate.
|
|
func (s *AssessmentAttemptCreate) SetAssessmentCorrectiveAttemptCreate(v AssessmentCorrectiveAttemptCreate) {
|
|
s.Type = AssessmentCorrectiveAttemptCreateAssessmentAttemptCreate
|
|
s.AssessmentCorrectiveAttemptCreate = v
|
|
}
|
|
|
|
// GetAssessmentCorrectiveAttemptCreate returns AssessmentCorrectiveAttemptCreate and true boolean if AssessmentAttemptCreate is AssessmentCorrectiveAttemptCreate.
|
|
func (s AssessmentAttemptCreate) GetAssessmentCorrectiveAttemptCreate() (v AssessmentCorrectiveAttemptCreate, ok bool) {
|
|
if !s.IsAssessmentCorrectiveAttemptCreate() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentCorrectiveAttemptCreate, true
|
|
}
|
|
|
|
// NewAssessmentCorrectiveAttemptCreateAssessmentAttemptCreate returns new AssessmentAttemptCreate from AssessmentCorrectiveAttemptCreate.
|
|
func NewAssessmentCorrectiveAttemptCreateAssessmentAttemptCreate(v AssessmentCorrectiveAttemptCreate) AssessmentAttemptCreate {
|
|
var s AssessmentAttemptCreate
|
|
s.SetAssessmentCorrectiveAttemptCreate(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentExpressAttemptCreate sets AssessmentAttemptCreate to AssessmentExpressAttemptCreate.
|
|
func (s *AssessmentAttemptCreate) SetAssessmentExpressAttemptCreate(v AssessmentExpressAttemptCreate) {
|
|
s.Type = AssessmentExpressAttemptCreateAssessmentAttemptCreate
|
|
s.AssessmentExpressAttemptCreate = v
|
|
}
|
|
|
|
// GetAssessmentExpressAttemptCreate returns AssessmentExpressAttemptCreate and true boolean if AssessmentAttemptCreate is AssessmentExpressAttemptCreate.
|
|
func (s AssessmentAttemptCreate) GetAssessmentExpressAttemptCreate() (v AssessmentExpressAttemptCreate, ok bool) {
|
|
if !s.IsAssessmentExpressAttemptCreate() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentExpressAttemptCreate, true
|
|
}
|
|
|
|
// NewAssessmentExpressAttemptCreateAssessmentAttemptCreate returns new AssessmentAttemptCreate from AssessmentExpressAttemptCreate.
|
|
func NewAssessmentExpressAttemptCreateAssessmentAttemptCreate(v AssessmentExpressAttemptCreate) AssessmentAttemptCreate {
|
|
var s AssessmentAttemptCreate
|
|
s.SetAssessmentExpressAttemptCreate(v)
|
|
return s
|
|
}
|
|
|
|
// AssessmentAttemptHeaders wraps AssessmentAttempt with response headers.
|
|
type AssessmentAttemptHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response AssessmentAttempt
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *AssessmentAttemptHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *AssessmentAttemptHeaders) GetResponse() AssessmentAttempt {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *AssessmentAttemptHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *AssessmentAttemptHeaders) SetResponse(val AssessmentAttempt) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*AssessmentAttemptHeaders) createMyAssessmentAttemptRes() {}
|
|
func (*AssessmentAttemptHeaders) finalizeMyAssessmentAttemptRes() {}
|
|
func (*AssessmentAttemptHeaders) getMyAssessmentAttemptRes() {}
|
|
func (*AssessmentAttemptHeaders) startMyAssessmentAttemptSessionRes() {}
|
|
func (*AssessmentAttemptHeaders) submitMyAssessmentAnswerRes() {}
|
|
|
|
// Start or resume a work session using the attempt version last read by the candidate.
|
|
// Ref: #/components/schemas/AssessmentAttemptSessionStart
|
|
type AssessmentAttemptSessionStart struct {
|
|
ExpectedVersion AssessmentAttemptVersion `json:"expected_version"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *AssessmentAttemptSessionStart) GetExpectedVersion() AssessmentAttemptVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *AssessmentAttemptSessionStart) SetExpectedVersion(val AssessmentAttemptVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// Lifecycle state of an attempt and the commands it accepts.
|
|
//
|
|
// - in_progress: items are being answered; `current_item` is the item to answer. Accepts
|
|
// SubmitMyAssessmentAnswer for that item.
|
|
// - practice_pending: the item part is finished, and the main practice has no finished verdict yet:
|
|
// it is not submitted, its verdict is pending in the sandbox, or the sandbox failed and the
|
|
// practice can be submitted again. Accepts SubmitMyAssessmentAnswer with the practice item while
|
|
// its status is `not_started` or `failed`. No grade is confirmed while the practice is unfinished,
|
|
// even when the adaptive stop rule has already ended the item part.
|
|
// - additional_practice_pending: adaptive only. Finalize found the probability of reaching the grade
|
|
// in the band below confirmation, so the attempt offers one additional practice without spending a
|
|
// new attempt; it keeps the time and session limits of the attempt. Accepts
|
|
// SubmitMyAssessmentAnswer with the additional practice item while its status is `not_started` or
|
|
// `failed`, and FinalizeMyAssessmentAttempt in the same statuses, which declines the offer and
|
|
// decides `not_confirmed` with the current evidence.
|
|
// - ready_to_finalize: every required part is done, including a submitted additional practice with a
|
|
// finished verdict. Accepts FinalizeMyAssessmentAttempt.
|
|
// - completed: a decision was made; the result is available.
|
|
// - expired: the time or session limit passed before the candidate finished the required parts. The
|
|
// result is available and confirms no grade.
|
|
// - insufficient_bank: the published bank could not supply the items required for coverage within the
|
|
// limit, and the attempt ended without a confirmed grade instead of repeating families. The result
|
|
// is available.
|
|
//
|
|
// When `expires_at` passes or the session limit is reached, a read returns the stored state without
|
|
// changing it. A command or background transition commits any due outcome and advances the version. A
|
|
// practice submitted before the limit and still `pending` is graded first. Then `ready_to_finalize`
|
|
// becomes `completed`; `additional_practice_pending` with the additional practice not submitted is
|
|
// finalized as declined and becomes `completed` with `not_confirmed`; `in_progress` and
|
|
// `practice_pending` become `expired`, with the result reason `expired` or `practice_incomplete`; and
|
|
// when the latest submission of a practice ended `failed`, the attempt becomes `expired` with the
|
|
// reason `sandbox_unavailable`, which is not the candidate's fault. `completed`, `expired`, and
|
|
// `insufficient_bank` are terminal and accept no command except the repeat of finalize described on
|
|
// FinalizeMyAssessmentAttempt. Adding a value is a contract change.
|
|
// Ref: #/components/schemas/AssessmentAttemptState
|
|
type AssessmentAttemptState string
|
|
|
|
const (
|
|
AssessmentAttemptStateInProgress AssessmentAttemptState = "in_progress"
|
|
AssessmentAttemptStatePracticePending AssessmentAttemptState = "practice_pending"
|
|
AssessmentAttemptStateAdditionalPracticePending AssessmentAttemptState = "additional_practice_pending"
|
|
AssessmentAttemptStateReadyToFinalize AssessmentAttemptState = "ready_to_finalize"
|
|
AssessmentAttemptStateCompleted AssessmentAttemptState = "completed"
|
|
AssessmentAttemptStateExpired AssessmentAttemptState = "expired"
|
|
AssessmentAttemptStateInsufficientBank AssessmentAttemptState = "insufficient_bank"
|
|
)
|
|
|
|
// AllValues returns all AssessmentAttemptState values.
|
|
func (AssessmentAttemptState) AllValues() []AssessmentAttemptState {
|
|
return []AssessmentAttemptState{
|
|
AssessmentAttemptStateInProgress,
|
|
AssessmentAttemptStatePracticePending,
|
|
AssessmentAttemptStateAdditionalPracticePending,
|
|
AssessmentAttemptStateReadyToFinalize,
|
|
AssessmentAttemptStateCompleted,
|
|
AssessmentAttemptStateExpired,
|
|
AssessmentAttemptStateInsufficientBank,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentAttemptState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentAttemptStateInProgress:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStatePracticePending:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStateAdditionalPracticePending:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStateReadyToFinalize:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStateCompleted:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStateExpired:
|
|
return []byte(s), nil
|
|
case AssessmentAttemptStateInsufficientBank:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentAttemptState) UnmarshalText(data []byte) error {
|
|
switch AssessmentAttemptState(data) {
|
|
case AssessmentAttemptStateInProgress:
|
|
*s = AssessmentAttemptStateInProgress
|
|
return nil
|
|
case AssessmentAttemptStatePracticePending:
|
|
*s = AssessmentAttemptStatePracticePending
|
|
return nil
|
|
case AssessmentAttemptStateAdditionalPracticePending:
|
|
*s = AssessmentAttemptStateAdditionalPracticePending
|
|
return nil
|
|
case AssessmentAttemptStateReadyToFinalize:
|
|
*s = AssessmentAttemptStateReadyToFinalize
|
|
return nil
|
|
case AssessmentAttemptStateCompleted:
|
|
*s = AssessmentAttemptStateCompleted
|
|
return nil
|
|
case AssessmentAttemptStateExpired:
|
|
*s = AssessmentAttemptStateExpired
|
|
return nil
|
|
case AssessmentAttemptStateInsufficientBank:
|
|
*s = AssessmentAttemptStateInsufficientBank
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentAttemptVersion int64
|
|
|
|
// Assessment availability for the specializations of the current candidate's questionnaire, derived at
|
|
// the time of the request.
|
|
// Ref: #/components/schemas/AssessmentAvailability
|
|
type AssessmentAvailability struct {
|
|
// Questionnaire specializations in questionnaire order.
|
|
Specializations []AssessmentSpecializationAvailability `json:"specializations"`
|
|
}
|
|
|
|
// GetSpecializations returns the value of Specializations.
|
|
func (s *AssessmentAvailability) GetSpecializations() []AssessmentSpecializationAvailability {
|
|
return s.Specializations
|
|
}
|
|
|
|
// SetSpecializations sets the value of Specializations.
|
|
func (s *AssessmentAvailability) SetSpecializations(val []AssessmentSpecializationAvailability) {
|
|
s.Specializations = val
|
|
}
|
|
|
|
// AssessmentAvailabilityHeaders wraps AssessmentAvailability with response headers.
|
|
type AssessmentAvailabilityHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response AssessmentAvailability
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *AssessmentAvailabilityHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *AssessmentAvailabilityHeaders) GetResponse() AssessmentAvailability {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *AssessmentAvailabilityHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *AssessmentAvailabilityHeaders) SetResponse(val AssessmentAvailability) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*AssessmentAvailabilityHeaders) getMyAssessmentAvailabilityRes() {}
|
|
|
|
// Merged schema.
|
|
// Ref: #/components/schemas/AssessmentCorrectiveAttempt
|
|
type AssessmentCorrectiveAttempt struct {
|
|
// Attempt identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Version AssessmentAttemptVersion `json:"version"`
|
|
// Merged property.
|
|
Specialization NilSpecializationCode `json:"specialization"`
|
|
// Merged property.
|
|
TargetGrade NilGradeCode `json:"target_grade"`
|
|
// Task language of the attempt, or null when none is selected.
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Merged property.
|
|
Kind AssessmentCorrectiveAttemptKind `json:"kind"`
|
|
// Merged property.
|
|
RootAttemptID NilUUID `json:"root_attempt_id"`
|
|
// Merged property.
|
|
ChainDeadline NilTimestamp `json:"chain_deadline"`
|
|
// Merged property.
|
|
Mode AssessmentCorrectiveAttemptMode `json:"mode"`
|
|
State AssessmentAttemptState `json:"state"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
StartedAt Timestamp `json:"started_at"`
|
|
// Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective
|
|
// assessment it does not exceed chain_deadline.
|
|
ExpiresAt Timestamp `json:"expires_at"`
|
|
// Session limit of the attempt, or null when its policy defines none.
|
|
Sessions NilAssessmentSessions `json:"sessions"`
|
|
// Time the attempt reached a terminal state, or null while it is active.
|
|
FinishedAt NilTimestamp `json:"finished_at"`
|
|
Progress AssessmentProgress `json:"progress"`
|
|
// Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending`
|
|
// or `additional_practice_pending` while that practice is `not_started` or `failed`, and null
|
|
// otherwise.
|
|
CurrentItem NilAssessmentItem `json:"current_item"`
|
|
// Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
|
Practices []AssessmentPractice `json:"practices"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *AssessmentCorrectiveAttempt) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *AssessmentCorrectiveAttempt) GetVersion() AssessmentAttemptVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentCorrectiveAttempt) GetSpecialization() NilSpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveAttempt) GetTargetGrade() NilGradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveAttempt) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentCorrectiveAttempt) GetKind() AssessmentCorrectiveAttemptKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveAttempt) GetRootAttemptID() NilUUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// GetChainDeadline returns the value of ChainDeadline.
|
|
func (s *AssessmentCorrectiveAttempt) GetChainDeadline() NilTimestamp {
|
|
return s.ChainDeadline
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentCorrectiveAttempt) GetMode() AssessmentCorrectiveAttemptMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *AssessmentCorrectiveAttempt) GetState() AssessmentAttemptState {
|
|
return s.State
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentCorrectiveAttempt) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetStartedAt returns the value of StartedAt.
|
|
func (s *AssessmentCorrectiveAttempt) GetStartedAt() Timestamp {
|
|
return s.StartedAt
|
|
}
|
|
|
|
// GetExpiresAt returns the value of ExpiresAt.
|
|
func (s *AssessmentCorrectiveAttempt) GetExpiresAt() Timestamp {
|
|
return s.ExpiresAt
|
|
}
|
|
|
|
// GetSessions returns the value of Sessions.
|
|
func (s *AssessmentCorrectiveAttempt) GetSessions() NilAssessmentSessions {
|
|
return s.Sessions
|
|
}
|
|
|
|
// GetFinishedAt returns the value of FinishedAt.
|
|
func (s *AssessmentCorrectiveAttempt) GetFinishedAt() NilTimestamp {
|
|
return s.FinishedAt
|
|
}
|
|
|
|
// GetProgress returns the value of Progress.
|
|
func (s *AssessmentCorrectiveAttempt) GetProgress() AssessmentProgress {
|
|
return s.Progress
|
|
}
|
|
|
|
// GetCurrentItem returns the value of CurrentItem.
|
|
func (s *AssessmentCorrectiveAttempt) GetCurrentItem() NilAssessmentItem {
|
|
return s.CurrentItem
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentCorrectiveAttempt) GetPractices() []AssessmentPractice {
|
|
return s.Practices
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *AssessmentCorrectiveAttempt) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *AssessmentCorrectiveAttempt) SetVersion(val AssessmentAttemptVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentCorrectiveAttempt) SetSpecialization(val NilSpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveAttempt) SetTargetGrade(val NilGradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveAttempt) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentCorrectiveAttempt) SetKind(val AssessmentCorrectiveAttemptKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveAttempt) SetRootAttemptID(val NilUUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// SetChainDeadline sets the value of ChainDeadline.
|
|
func (s *AssessmentCorrectiveAttempt) SetChainDeadline(val NilTimestamp) {
|
|
s.ChainDeadline = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentCorrectiveAttempt) SetMode(val AssessmentCorrectiveAttemptMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *AssessmentCorrectiveAttempt) SetState(val AssessmentAttemptState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentCorrectiveAttempt) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetStartedAt sets the value of StartedAt.
|
|
func (s *AssessmentCorrectiveAttempt) SetStartedAt(val Timestamp) {
|
|
s.StartedAt = val
|
|
}
|
|
|
|
// SetExpiresAt sets the value of ExpiresAt.
|
|
func (s *AssessmentCorrectiveAttempt) SetExpiresAt(val Timestamp) {
|
|
s.ExpiresAt = val
|
|
}
|
|
|
|
// SetSessions sets the value of Sessions.
|
|
func (s *AssessmentCorrectiveAttempt) SetSessions(val NilAssessmentSessions) {
|
|
s.Sessions = val
|
|
}
|
|
|
|
// SetFinishedAt sets the value of FinishedAt.
|
|
func (s *AssessmentCorrectiveAttempt) SetFinishedAt(val NilTimestamp) {
|
|
s.FinishedAt = val
|
|
}
|
|
|
|
// SetProgress sets the value of Progress.
|
|
func (s *AssessmentCorrectiveAttempt) SetProgress(val AssessmentProgress) {
|
|
s.Progress = val
|
|
}
|
|
|
|
// SetCurrentItem sets the value of CurrentItem.
|
|
func (s *AssessmentCorrectiveAttempt) SetCurrentItem(val NilAssessmentItem) {
|
|
s.CurrentItem = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentCorrectiveAttempt) SetPractices(val []AssessmentPractice) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// Start a corrective real assessment at a lower target grade in the chain rooted at root_attempt_id.
|
|
// The server validates that this grade is strictly below the preceding grade and that the chain
|
|
// remains within its existing deadline and quota. chain_deadline is derived from the root attempt and
|
|
// is never supplied by the client.
|
|
// Ref: #/components/schemas/AssessmentCorrectiveAttemptCreate
|
|
type AssessmentCorrectiveAttemptCreate struct {
|
|
// Continue the existing real-assessment chain without reserving another root slot.
|
|
Kind AssessmentCorrectiveAttemptCreateKind `json:"kind"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
TargetGrade GradeCode `json:"target_grade"`
|
|
// Task language of the attempt, or null when the bank offers no choice.
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Root real-assessment attempt whose quota and deadline this attempt shares.
|
|
RootAttemptID uuid.UUID `json:"root_attempt_id"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentCorrectiveAttemptCreate) GetKind() AssessmentCorrectiveAttemptCreateKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentCorrectiveAttemptCreate) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveAttemptCreate) GetTargetGrade() GradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveAttemptCreate) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveAttemptCreate) GetRootAttemptID() uuid.UUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentCorrectiveAttemptCreate) SetKind(val AssessmentCorrectiveAttemptCreateKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentCorrectiveAttemptCreate) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveAttemptCreate) SetTargetGrade(val GradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveAttemptCreate) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveAttemptCreate) SetRootAttemptID(val uuid.UUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// Continue the existing real-assessment chain without reserving another root slot.
|
|
type AssessmentCorrectiveAttemptCreateKind string
|
|
|
|
const (
|
|
AssessmentCorrectiveAttemptCreateKindCorrective AssessmentCorrectiveAttemptCreateKind = "corrective"
|
|
)
|
|
|
|
// AllValues returns all AssessmentCorrectiveAttemptCreateKind values.
|
|
func (AssessmentCorrectiveAttemptCreateKind) AllValues() []AssessmentCorrectiveAttemptCreateKind {
|
|
return []AssessmentCorrectiveAttemptCreateKind{
|
|
AssessmentCorrectiveAttemptCreateKindCorrective,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentCorrectiveAttemptCreateKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentCorrectiveAttemptCreateKindCorrective:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentCorrectiveAttemptCreateKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentCorrectiveAttemptCreateKind(data) {
|
|
case AssessmentCorrectiveAttemptCreateKindCorrective:
|
|
*s = AssessmentCorrectiveAttemptCreateKindCorrective
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentCorrectiveAttemptKind string
|
|
|
|
const (
|
|
AssessmentCorrectiveAttemptKindCorrective AssessmentCorrectiveAttemptKind = "corrective"
|
|
)
|
|
|
|
// AllValues returns all AssessmentCorrectiveAttemptKind values.
|
|
func (AssessmentCorrectiveAttemptKind) AllValues() []AssessmentCorrectiveAttemptKind {
|
|
return []AssessmentCorrectiveAttemptKind{
|
|
AssessmentCorrectiveAttemptKindCorrective,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentCorrectiveAttemptKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentCorrectiveAttemptKindCorrective:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentCorrectiveAttemptKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentCorrectiveAttemptKind(data) {
|
|
case AssessmentCorrectiveAttemptKindCorrective:
|
|
*s = AssessmentCorrectiveAttemptKindCorrective
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentCorrectiveAttemptMode string
|
|
|
|
const (
|
|
AssessmentCorrectiveAttemptModeDemoBasic AssessmentCorrectiveAttemptMode = "demo_basic"
|
|
AssessmentCorrectiveAttemptModeAdaptive AssessmentCorrectiveAttemptMode = "adaptive"
|
|
)
|
|
|
|
// AllValues returns all AssessmentCorrectiveAttemptMode values.
|
|
func (AssessmentCorrectiveAttemptMode) AllValues() []AssessmentCorrectiveAttemptMode {
|
|
return []AssessmentCorrectiveAttemptMode{
|
|
AssessmentCorrectiveAttemptModeDemoBasic,
|
|
AssessmentCorrectiveAttemptModeAdaptive,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentCorrectiveAttemptMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentCorrectiveAttemptModeDemoBasic:
|
|
return []byte(s), nil
|
|
case AssessmentCorrectiveAttemptModeAdaptive:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentCorrectiveAttemptMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentCorrectiveAttemptMode(data) {
|
|
case AssessmentCorrectiveAttemptModeDemoBasic:
|
|
*s = AssessmentCorrectiveAttemptModeDemoBasic
|
|
return nil
|
|
case AssessmentCorrectiveAttemptModeAdaptive:
|
|
*s = AssessmentCorrectiveAttemptModeAdaptive
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
// Ref: #/components/schemas/AssessmentCorrectiveResult
|
|
type AssessmentCorrectiveResult struct {
|
|
AttemptID uuid.UUID `json:"attempt_id"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
TargetGrade GradeCode `json:"target_grade"`
|
|
// Merged property.
|
|
RootAttemptID NilUUID `json:"root_attempt_id"`
|
|
// Merged property.
|
|
ChainDeadline NilTimestamp `json:"chain_deadline"`
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Merged property.
|
|
Kind AssessmentCorrectiveResultKind `json:"kind"`
|
|
Mode AssessmentCorrectiveResultMode `json:"mode"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
Outcome AssessmentOutcome `json:"outcome"`
|
|
// The reason when `outcome` is `not_determined`, otherwise null.
|
|
NotDeterminedReason NilAssessmentNotDeterminedReason `json:"not_determined_reason"`
|
|
// Grade that this attempt confirmed, the target grade, or null when it confirmed none. Together with
|
|
// the specialization it forms the category.
|
|
ConfirmedGrade NilGradeCode `json:"confirmed_grade"`
|
|
// Confirmed grade of the specialization before this attempt, or null. When the attempt confirmed
|
|
// nothing, this grade stays in force.
|
|
PreviousConfirmedGrade NilGradeCode `json:"previous_confirmed_grade"`
|
|
// Strength of an adaptive confirmation, otherwise null.
|
|
Strength NilAssessmentStrength `json:"strength"`
|
|
CalibrationStatus CalibrationStatus `json:"calibration_status"`
|
|
Limitations []AssessmentLimitation `json:"limitations"`
|
|
// Ability estimate and uncertainty of an adaptive attempt with a decision; null for demo_basic, which
|
|
// computes none, and for an attempt without a decision.
|
|
Uncertainty NilAssessmentUncertainty `json:"uncertainty"`
|
|
// Raw score of a demo_basic attempt with a decision, otherwise null.
|
|
BasicScore NilBasicScore `json:"basic_score"`
|
|
// Verdicts of the practices that have one, main first.
|
|
Practices []AssessmentPracticeResult `json:"practices"`
|
|
// Domains with weak evidence; empty when none were found or the method finds none.
|
|
Gaps []AssessmentGap `json:"gaps"`
|
|
Durations AssessmentDurations `json:"durations"`
|
|
NextSteps []AssessmentNextStep `json:"next_steps"`
|
|
DecidedAt Timestamp `json:"decided_at"`
|
|
}
|
|
|
|
// GetAttemptID returns the value of AttemptID.
|
|
func (s *AssessmentCorrectiveResult) GetAttemptID() uuid.UUID {
|
|
return s.AttemptID
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentCorrectiveResult) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveResult) GetTargetGrade() GradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveResult) GetRootAttemptID() NilUUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// GetChainDeadline returns the value of ChainDeadline.
|
|
func (s *AssessmentCorrectiveResult) GetChainDeadline() NilTimestamp {
|
|
return s.ChainDeadline
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveResult) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentCorrectiveResult) GetKind() AssessmentCorrectiveResultKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentCorrectiveResult) GetMode() AssessmentCorrectiveResultMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentCorrectiveResult) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetOutcome returns the value of Outcome.
|
|
func (s *AssessmentCorrectiveResult) GetOutcome() AssessmentOutcome {
|
|
return s.Outcome
|
|
}
|
|
|
|
// GetNotDeterminedReason returns the value of NotDeterminedReason.
|
|
func (s *AssessmentCorrectiveResult) GetNotDeterminedReason() NilAssessmentNotDeterminedReason {
|
|
return s.NotDeterminedReason
|
|
}
|
|
|
|
// GetConfirmedGrade returns the value of ConfirmedGrade.
|
|
func (s *AssessmentCorrectiveResult) GetConfirmedGrade() NilGradeCode {
|
|
return s.ConfirmedGrade
|
|
}
|
|
|
|
// GetPreviousConfirmedGrade returns the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentCorrectiveResult) GetPreviousConfirmedGrade() NilGradeCode {
|
|
return s.PreviousConfirmedGrade
|
|
}
|
|
|
|
// GetStrength returns the value of Strength.
|
|
func (s *AssessmentCorrectiveResult) GetStrength() NilAssessmentStrength {
|
|
return s.Strength
|
|
}
|
|
|
|
// GetCalibrationStatus returns the value of CalibrationStatus.
|
|
func (s *AssessmentCorrectiveResult) GetCalibrationStatus() CalibrationStatus {
|
|
return s.CalibrationStatus
|
|
}
|
|
|
|
// GetLimitations returns the value of Limitations.
|
|
func (s *AssessmentCorrectiveResult) GetLimitations() []AssessmentLimitation {
|
|
return s.Limitations
|
|
}
|
|
|
|
// GetUncertainty returns the value of Uncertainty.
|
|
func (s *AssessmentCorrectiveResult) GetUncertainty() NilAssessmentUncertainty {
|
|
return s.Uncertainty
|
|
}
|
|
|
|
// GetBasicScore returns the value of BasicScore.
|
|
func (s *AssessmentCorrectiveResult) GetBasicScore() NilBasicScore {
|
|
return s.BasicScore
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentCorrectiveResult) GetPractices() []AssessmentPracticeResult {
|
|
return s.Practices
|
|
}
|
|
|
|
// GetGaps returns the value of Gaps.
|
|
func (s *AssessmentCorrectiveResult) GetGaps() []AssessmentGap {
|
|
return s.Gaps
|
|
}
|
|
|
|
// GetDurations returns the value of Durations.
|
|
func (s *AssessmentCorrectiveResult) GetDurations() AssessmentDurations {
|
|
return s.Durations
|
|
}
|
|
|
|
// GetNextSteps returns the value of NextSteps.
|
|
func (s *AssessmentCorrectiveResult) GetNextSteps() []AssessmentNextStep {
|
|
return s.NextSteps
|
|
}
|
|
|
|
// GetDecidedAt returns the value of DecidedAt.
|
|
func (s *AssessmentCorrectiveResult) GetDecidedAt() Timestamp {
|
|
return s.DecidedAt
|
|
}
|
|
|
|
// SetAttemptID sets the value of AttemptID.
|
|
func (s *AssessmentCorrectiveResult) SetAttemptID(val uuid.UUID) {
|
|
s.AttemptID = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentCorrectiveResult) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentCorrectiveResult) SetTargetGrade(val GradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentCorrectiveResult) SetRootAttemptID(val NilUUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// SetChainDeadline sets the value of ChainDeadline.
|
|
func (s *AssessmentCorrectiveResult) SetChainDeadline(val NilTimestamp) {
|
|
s.ChainDeadline = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentCorrectiveResult) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentCorrectiveResult) SetKind(val AssessmentCorrectiveResultKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentCorrectiveResult) SetMode(val AssessmentCorrectiveResultMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentCorrectiveResult) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetOutcome sets the value of Outcome.
|
|
func (s *AssessmentCorrectiveResult) SetOutcome(val AssessmentOutcome) {
|
|
s.Outcome = val
|
|
}
|
|
|
|
// SetNotDeterminedReason sets the value of NotDeterminedReason.
|
|
func (s *AssessmentCorrectiveResult) SetNotDeterminedReason(val NilAssessmentNotDeterminedReason) {
|
|
s.NotDeterminedReason = val
|
|
}
|
|
|
|
// SetConfirmedGrade sets the value of ConfirmedGrade.
|
|
func (s *AssessmentCorrectiveResult) SetConfirmedGrade(val NilGradeCode) {
|
|
s.ConfirmedGrade = val
|
|
}
|
|
|
|
// SetPreviousConfirmedGrade sets the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentCorrectiveResult) SetPreviousConfirmedGrade(val NilGradeCode) {
|
|
s.PreviousConfirmedGrade = val
|
|
}
|
|
|
|
// SetStrength sets the value of Strength.
|
|
func (s *AssessmentCorrectiveResult) SetStrength(val NilAssessmentStrength) {
|
|
s.Strength = val
|
|
}
|
|
|
|
// SetCalibrationStatus sets the value of CalibrationStatus.
|
|
func (s *AssessmentCorrectiveResult) SetCalibrationStatus(val CalibrationStatus) {
|
|
s.CalibrationStatus = val
|
|
}
|
|
|
|
// SetLimitations sets the value of Limitations.
|
|
func (s *AssessmentCorrectiveResult) SetLimitations(val []AssessmentLimitation) {
|
|
s.Limitations = val
|
|
}
|
|
|
|
// SetUncertainty sets the value of Uncertainty.
|
|
func (s *AssessmentCorrectiveResult) SetUncertainty(val NilAssessmentUncertainty) {
|
|
s.Uncertainty = val
|
|
}
|
|
|
|
// SetBasicScore sets the value of BasicScore.
|
|
func (s *AssessmentCorrectiveResult) SetBasicScore(val NilBasicScore) {
|
|
s.BasicScore = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentCorrectiveResult) SetPractices(val []AssessmentPracticeResult) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// SetGaps sets the value of Gaps.
|
|
func (s *AssessmentCorrectiveResult) SetGaps(val []AssessmentGap) {
|
|
s.Gaps = val
|
|
}
|
|
|
|
// SetDurations sets the value of Durations.
|
|
func (s *AssessmentCorrectiveResult) SetDurations(val AssessmentDurations) {
|
|
s.Durations = val
|
|
}
|
|
|
|
// SetNextSteps sets the value of NextSteps.
|
|
func (s *AssessmentCorrectiveResult) SetNextSteps(val []AssessmentNextStep) {
|
|
s.NextSteps = val
|
|
}
|
|
|
|
// SetDecidedAt sets the value of DecidedAt.
|
|
func (s *AssessmentCorrectiveResult) SetDecidedAt(val Timestamp) {
|
|
s.DecidedAt = val
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentCorrectiveResultKind string
|
|
|
|
const (
|
|
AssessmentCorrectiveResultKindCorrective AssessmentCorrectiveResultKind = "corrective"
|
|
)
|
|
|
|
// AllValues returns all AssessmentCorrectiveResultKind values.
|
|
func (AssessmentCorrectiveResultKind) AllValues() []AssessmentCorrectiveResultKind {
|
|
return []AssessmentCorrectiveResultKind{
|
|
AssessmentCorrectiveResultKindCorrective,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentCorrectiveResultKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentCorrectiveResultKindCorrective:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentCorrectiveResultKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentCorrectiveResultKind(data) {
|
|
case AssessmentCorrectiveResultKindCorrective:
|
|
*s = AssessmentCorrectiveResultKindCorrective
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentCorrectiveResultMode string
|
|
|
|
const (
|
|
AssessmentCorrectiveResultModeDemoBasic AssessmentCorrectiveResultMode = "demo_basic"
|
|
AssessmentCorrectiveResultModeAdaptive AssessmentCorrectiveResultMode = "adaptive"
|
|
)
|
|
|
|
// AllValues returns all AssessmentCorrectiveResultMode values.
|
|
func (AssessmentCorrectiveResultMode) AllValues() []AssessmentCorrectiveResultMode {
|
|
return []AssessmentCorrectiveResultMode{
|
|
AssessmentCorrectiveResultModeDemoBasic,
|
|
AssessmentCorrectiveResultModeAdaptive,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentCorrectiveResultMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentCorrectiveResultModeDemoBasic:
|
|
return []byte(s), nil
|
|
case AssessmentCorrectiveResultModeAdaptive:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentCorrectiveResultMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentCorrectiveResultMode(data) {
|
|
case AssessmentCorrectiveResultModeDemoBasic:
|
|
*s = AssessmentCorrectiveResultModeDemoBasic
|
|
return nil
|
|
case AssessmentCorrectiveResultModeAdaptive:
|
|
*s = AssessmentCorrectiveResultModeAdaptive
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Working time recorded by the server. It is a separate label: it never enters the ability estimate or
|
|
// the grade decision.
|
|
// Ref: #/components/schemas/AssessmentDurations
|
|
type AssessmentDurations struct {
|
|
ItemsSeconds int32 `json:"items_seconds"`
|
|
// Time on all practices with a verdict, or null when no practice has one.
|
|
PracticeSeconds NilInt32 `json:"practice_seconds"`
|
|
}
|
|
|
|
// GetItemsSeconds returns the value of ItemsSeconds.
|
|
func (s *AssessmentDurations) GetItemsSeconds() int32 {
|
|
return s.ItemsSeconds
|
|
}
|
|
|
|
// GetPracticeSeconds returns the value of PracticeSeconds.
|
|
func (s *AssessmentDurations) GetPracticeSeconds() NilInt32 {
|
|
return s.PracticeSeconds
|
|
}
|
|
|
|
// SetItemsSeconds sets the value of ItemsSeconds.
|
|
func (s *AssessmentDurations) SetItemsSeconds(val int32) {
|
|
s.ItemsSeconds = val
|
|
}
|
|
|
|
// SetPracticeSeconds sets the value of PracticeSeconds.
|
|
func (s *AssessmentDurations) SetPracticeSeconds(val NilInt32) {
|
|
s.PracticeSeconds = val
|
|
}
|
|
|
|
// Merged schema.
|
|
// Ref: #/components/schemas/AssessmentExpressAttempt
|
|
type AssessmentExpressAttempt struct {
|
|
// Attempt identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Version AssessmentAttemptVersion `json:"version"`
|
|
// Merged property.
|
|
Specialization NilSpecializationCode `json:"specialization"`
|
|
// Merged property.
|
|
TargetGrade NilGradeCode `json:"target_grade"`
|
|
// Merged property.
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Merged property.
|
|
Kind AssessmentExpressAttemptKind `json:"kind"`
|
|
// Merged property.
|
|
RootAttemptID NilUUID `json:"root_attempt_id"`
|
|
// Merged property.
|
|
ChainDeadline NilTimestamp `json:"chain_deadline"`
|
|
// Merged property.
|
|
Mode AssessmentExpressAttemptMode `json:"mode"`
|
|
State AssessmentAttemptState `json:"state"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
StartedAt Timestamp `json:"started_at"`
|
|
// Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective
|
|
// assessment it does not exceed chain_deadline.
|
|
ExpiresAt Timestamp `json:"expires_at"`
|
|
// Session limit of the attempt, or null when its policy defines none.
|
|
Sessions NilAssessmentSessions `json:"sessions"`
|
|
// Time the attempt reached a terminal state, or null while it is active.
|
|
FinishedAt NilTimestamp `json:"finished_at"`
|
|
Progress AssessmentProgress `json:"progress"`
|
|
// Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending`
|
|
// or `additional_practice_pending` while that practice is `not_started` or `failed`, and null
|
|
// otherwise.
|
|
CurrentItem NilAssessmentItem `json:"current_item"`
|
|
// Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
|
Practices []AssessmentPractice `json:"practices"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *AssessmentExpressAttempt) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *AssessmentExpressAttempt) GetVersion() AssessmentAttemptVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentExpressAttempt) GetSpecialization() NilSpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentExpressAttempt) GetTargetGrade() NilGradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentExpressAttempt) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentExpressAttempt) GetKind() AssessmentExpressAttemptKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentExpressAttempt) GetRootAttemptID() NilUUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// GetChainDeadline returns the value of ChainDeadline.
|
|
func (s *AssessmentExpressAttempt) GetChainDeadline() NilTimestamp {
|
|
return s.ChainDeadline
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentExpressAttempt) GetMode() AssessmentExpressAttemptMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *AssessmentExpressAttempt) GetState() AssessmentAttemptState {
|
|
return s.State
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentExpressAttempt) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetStartedAt returns the value of StartedAt.
|
|
func (s *AssessmentExpressAttempt) GetStartedAt() Timestamp {
|
|
return s.StartedAt
|
|
}
|
|
|
|
// GetExpiresAt returns the value of ExpiresAt.
|
|
func (s *AssessmentExpressAttempt) GetExpiresAt() Timestamp {
|
|
return s.ExpiresAt
|
|
}
|
|
|
|
// GetSessions returns the value of Sessions.
|
|
func (s *AssessmentExpressAttempt) GetSessions() NilAssessmentSessions {
|
|
return s.Sessions
|
|
}
|
|
|
|
// GetFinishedAt returns the value of FinishedAt.
|
|
func (s *AssessmentExpressAttempt) GetFinishedAt() NilTimestamp {
|
|
return s.FinishedAt
|
|
}
|
|
|
|
// GetProgress returns the value of Progress.
|
|
func (s *AssessmentExpressAttempt) GetProgress() AssessmentProgress {
|
|
return s.Progress
|
|
}
|
|
|
|
// GetCurrentItem returns the value of CurrentItem.
|
|
func (s *AssessmentExpressAttempt) GetCurrentItem() NilAssessmentItem {
|
|
return s.CurrentItem
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentExpressAttempt) GetPractices() []AssessmentPractice {
|
|
return s.Practices
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *AssessmentExpressAttempt) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *AssessmentExpressAttempt) SetVersion(val AssessmentAttemptVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentExpressAttempt) SetSpecialization(val NilSpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentExpressAttempt) SetTargetGrade(val NilGradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentExpressAttempt) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentExpressAttempt) SetKind(val AssessmentExpressAttemptKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentExpressAttempt) SetRootAttemptID(val NilUUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// SetChainDeadline sets the value of ChainDeadline.
|
|
func (s *AssessmentExpressAttempt) SetChainDeadline(val NilTimestamp) {
|
|
s.ChainDeadline = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentExpressAttempt) SetMode(val AssessmentExpressAttemptMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *AssessmentExpressAttempt) SetState(val AssessmentAttemptState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentExpressAttempt) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetStartedAt sets the value of StartedAt.
|
|
func (s *AssessmentExpressAttempt) SetStartedAt(val Timestamp) {
|
|
s.StartedAt = val
|
|
}
|
|
|
|
// SetExpiresAt sets the value of ExpiresAt.
|
|
func (s *AssessmentExpressAttempt) SetExpiresAt(val Timestamp) {
|
|
s.ExpiresAt = val
|
|
}
|
|
|
|
// SetSessions sets the value of Sessions.
|
|
func (s *AssessmentExpressAttempt) SetSessions(val NilAssessmentSessions) {
|
|
s.Sessions = val
|
|
}
|
|
|
|
// SetFinishedAt sets the value of FinishedAt.
|
|
func (s *AssessmentExpressAttempt) SetFinishedAt(val NilTimestamp) {
|
|
s.FinishedAt = val
|
|
}
|
|
|
|
// SetProgress sets the value of Progress.
|
|
func (s *AssessmentExpressAttempt) SetProgress(val AssessmentProgress) {
|
|
s.Progress = val
|
|
}
|
|
|
|
// SetCurrentItem sets the value of CurrentItem.
|
|
func (s *AssessmentExpressAttempt) SetCurrentItem(val NilAssessmentItem) {
|
|
s.CurrentItem = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentExpressAttempt) SetPractices(val []AssessmentPractice) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// Explicitly start the short training run. It has no specialization or target grade, uses its separate
|
|
// demo policy, and does not consume a real-assessment attempt.
|
|
// Ref: #/components/schemas/AssessmentExpressAttemptCreate
|
|
type AssessmentExpressAttemptCreate struct {
|
|
// Explicitly request the training run; real modes cannot be selected by the client.
|
|
Kind AssessmentExpressAttemptCreateKind `json:"kind"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentExpressAttemptCreate) GetKind() AssessmentExpressAttemptCreateKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentExpressAttemptCreate) SetKind(val AssessmentExpressAttemptCreateKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// Explicitly request the training run; real modes cannot be selected by the client.
|
|
type AssessmentExpressAttemptCreateKind string
|
|
|
|
const (
|
|
AssessmentExpressAttemptCreateKindDemoExpress AssessmentExpressAttemptCreateKind = "demo_express"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressAttemptCreateKind values.
|
|
func (AssessmentExpressAttemptCreateKind) AllValues() []AssessmentExpressAttemptCreateKind {
|
|
return []AssessmentExpressAttemptCreateKind{
|
|
AssessmentExpressAttemptCreateKindDemoExpress,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressAttemptCreateKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressAttemptCreateKindDemoExpress:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressAttemptCreateKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressAttemptCreateKind(data) {
|
|
case AssessmentExpressAttemptCreateKindDemoExpress:
|
|
*s = AssessmentExpressAttemptCreateKindDemoExpress
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentExpressAttemptKind string
|
|
|
|
const (
|
|
AssessmentExpressAttemptKindDemoExpress AssessmentExpressAttemptKind = "demo_express"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressAttemptKind values.
|
|
func (AssessmentExpressAttemptKind) AllValues() []AssessmentExpressAttemptKind {
|
|
return []AssessmentExpressAttemptKind{
|
|
AssessmentExpressAttemptKindDemoExpress,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressAttemptKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressAttemptKindDemoExpress:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressAttemptKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressAttemptKind(data) {
|
|
case AssessmentExpressAttemptKindDemoExpress:
|
|
*s = AssessmentExpressAttemptKindDemoExpress
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentExpressAttemptMode string
|
|
|
|
const (
|
|
AssessmentExpressAttemptModeDemoExpress AssessmentExpressAttemptMode = "demo_express"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressAttemptMode values.
|
|
func (AssessmentExpressAttemptMode) AllValues() []AssessmentExpressAttemptMode {
|
|
return []AssessmentExpressAttemptMode{
|
|
AssessmentExpressAttemptModeDemoExpress,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressAttemptMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressAttemptModeDemoExpress:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressAttemptMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressAttemptMode(data) {
|
|
case AssessmentExpressAttemptModeDemoExpress:
|
|
*s = AssessmentExpressAttemptModeDemoExpress
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Immutable educational result of a demo_express run. It includes a short summary but cannot report a
|
|
// category, percentile, uncertainty, grade, strength, or qualification evidence. The result belongs
|
|
// only to the training mode and does not consume a real-assessment quota.
|
|
// Ref: #/components/schemas/AssessmentExpressResult
|
|
type AssessmentExpressResult struct {
|
|
AttemptID uuid.UUID `json:"attempt_id"`
|
|
// Express training does not assess a specialization.
|
|
Specialization struct{} `json:"specialization"`
|
|
// Express training does not assess a target grade.
|
|
TargetGrade struct{} `json:"target_grade"`
|
|
TaskLanguage struct{} `json:"task_language"`
|
|
Kind AssessmentExpressResultKind `json:"kind"`
|
|
Mode AssessmentExpressResultMode `json:"mode"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
Outcome AssessmentExpressResultOutcome `json:"outcome"`
|
|
NotDeterminedReason struct{} `json:"not_determined_reason"`
|
|
// Express training never confirms a grade.
|
|
ConfirmedGrade struct{} `json:"confirmed_grade"`
|
|
PreviousConfirmedGrade struct{} `json:"previous_confirmed_grade"`
|
|
Strength struct{} `json:"strength"`
|
|
CalibrationStatus AssessmentExpressResultCalibrationStatus `json:"calibration_status"`
|
|
Limitations []AssessmentExpressResultLimitationsItem `json:"limitations"`
|
|
// Express training computes no ability estimate or percentile.
|
|
Uncertainty struct{} `json:"uncertainty"`
|
|
BasicScore struct{} `json:"basic_score"`
|
|
Practices []AssessmentPracticeResult `json:"practices"`
|
|
Gaps []AssessmentGap `json:"gaps"`
|
|
Durations AssessmentDurations `json:"durations"`
|
|
NextSteps []AssessmentNextStep `json:"next_steps"`
|
|
// Short educational feedback about this training run.
|
|
Summary string `json:"summary"`
|
|
DecidedAt Timestamp `json:"decided_at"`
|
|
}
|
|
|
|
// GetAttemptID returns the value of AttemptID.
|
|
func (s *AssessmentExpressResult) GetAttemptID() uuid.UUID {
|
|
return s.AttemptID
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentExpressResult) GetSpecialization() struct{} {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentExpressResult) GetTargetGrade() struct{} {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentExpressResult) GetTaskLanguage() struct{} {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentExpressResult) GetKind() AssessmentExpressResultKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentExpressResult) GetMode() AssessmentExpressResultMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentExpressResult) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetOutcome returns the value of Outcome.
|
|
func (s *AssessmentExpressResult) GetOutcome() AssessmentExpressResultOutcome {
|
|
return s.Outcome
|
|
}
|
|
|
|
// GetNotDeterminedReason returns the value of NotDeterminedReason.
|
|
func (s *AssessmentExpressResult) GetNotDeterminedReason() struct{} {
|
|
return s.NotDeterminedReason
|
|
}
|
|
|
|
// GetConfirmedGrade returns the value of ConfirmedGrade.
|
|
func (s *AssessmentExpressResult) GetConfirmedGrade() struct{} {
|
|
return s.ConfirmedGrade
|
|
}
|
|
|
|
// GetPreviousConfirmedGrade returns the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentExpressResult) GetPreviousConfirmedGrade() struct{} {
|
|
return s.PreviousConfirmedGrade
|
|
}
|
|
|
|
// GetStrength returns the value of Strength.
|
|
func (s *AssessmentExpressResult) GetStrength() struct{} {
|
|
return s.Strength
|
|
}
|
|
|
|
// GetCalibrationStatus returns the value of CalibrationStatus.
|
|
func (s *AssessmentExpressResult) GetCalibrationStatus() AssessmentExpressResultCalibrationStatus {
|
|
return s.CalibrationStatus
|
|
}
|
|
|
|
// GetLimitations returns the value of Limitations.
|
|
func (s *AssessmentExpressResult) GetLimitations() []AssessmentExpressResultLimitationsItem {
|
|
return s.Limitations
|
|
}
|
|
|
|
// GetUncertainty returns the value of Uncertainty.
|
|
func (s *AssessmentExpressResult) GetUncertainty() struct{} {
|
|
return s.Uncertainty
|
|
}
|
|
|
|
// GetBasicScore returns the value of BasicScore.
|
|
func (s *AssessmentExpressResult) GetBasicScore() struct{} {
|
|
return s.BasicScore
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentExpressResult) GetPractices() []AssessmentPracticeResult {
|
|
return s.Practices
|
|
}
|
|
|
|
// GetGaps returns the value of Gaps.
|
|
func (s *AssessmentExpressResult) GetGaps() []AssessmentGap {
|
|
return s.Gaps
|
|
}
|
|
|
|
// GetDurations returns the value of Durations.
|
|
func (s *AssessmentExpressResult) GetDurations() AssessmentDurations {
|
|
return s.Durations
|
|
}
|
|
|
|
// GetNextSteps returns the value of NextSteps.
|
|
func (s *AssessmentExpressResult) GetNextSteps() []AssessmentNextStep {
|
|
return s.NextSteps
|
|
}
|
|
|
|
// GetSummary returns the value of Summary.
|
|
func (s *AssessmentExpressResult) GetSummary() string {
|
|
return s.Summary
|
|
}
|
|
|
|
// GetDecidedAt returns the value of DecidedAt.
|
|
func (s *AssessmentExpressResult) GetDecidedAt() Timestamp {
|
|
return s.DecidedAt
|
|
}
|
|
|
|
// SetAttemptID sets the value of AttemptID.
|
|
func (s *AssessmentExpressResult) SetAttemptID(val uuid.UUID) {
|
|
s.AttemptID = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentExpressResult) SetSpecialization(val struct{}) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentExpressResult) SetTargetGrade(val struct{}) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentExpressResult) SetTaskLanguage(val struct{}) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentExpressResult) SetKind(val AssessmentExpressResultKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentExpressResult) SetMode(val AssessmentExpressResultMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentExpressResult) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetOutcome sets the value of Outcome.
|
|
func (s *AssessmentExpressResult) SetOutcome(val AssessmentExpressResultOutcome) {
|
|
s.Outcome = val
|
|
}
|
|
|
|
// SetNotDeterminedReason sets the value of NotDeterminedReason.
|
|
func (s *AssessmentExpressResult) SetNotDeterminedReason(val struct{}) {
|
|
s.NotDeterminedReason = val
|
|
}
|
|
|
|
// SetConfirmedGrade sets the value of ConfirmedGrade.
|
|
func (s *AssessmentExpressResult) SetConfirmedGrade(val struct{}) {
|
|
s.ConfirmedGrade = val
|
|
}
|
|
|
|
// SetPreviousConfirmedGrade sets the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentExpressResult) SetPreviousConfirmedGrade(val struct{}) {
|
|
s.PreviousConfirmedGrade = val
|
|
}
|
|
|
|
// SetStrength sets the value of Strength.
|
|
func (s *AssessmentExpressResult) SetStrength(val struct{}) {
|
|
s.Strength = val
|
|
}
|
|
|
|
// SetCalibrationStatus sets the value of CalibrationStatus.
|
|
func (s *AssessmentExpressResult) SetCalibrationStatus(val AssessmentExpressResultCalibrationStatus) {
|
|
s.CalibrationStatus = val
|
|
}
|
|
|
|
// SetLimitations sets the value of Limitations.
|
|
func (s *AssessmentExpressResult) SetLimitations(val []AssessmentExpressResultLimitationsItem) {
|
|
s.Limitations = val
|
|
}
|
|
|
|
// SetUncertainty sets the value of Uncertainty.
|
|
func (s *AssessmentExpressResult) SetUncertainty(val struct{}) {
|
|
s.Uncertainty = val
|
|
}
|
|
|
|
// SetBasicScore sets the value of BasicScore.
|
|
func (s *AssessmentExpressResult) SetBasicScore(val struct{}) {
|
|
s.BasicScore = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentExpressResult) SetPractices(val []AssessmentPracticeResult) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// SetGaps sets the value of Gaps.
|
|
func (s *AssessmentExpressResult) SetGaps(val []AssessmentGap) {
|
|
s.Gaps = val
|
|
}
|
|
|
|
// SetDurations sets the value of Durations.
|
|
func (s *AssessmentExpressResult) SetDurations(val AssessmentDurations) {
|
|
s.Durations = val
|
|
}
|
|
|
|
// SetNextSteps sets the value of NextSteps.
|
|
func (s *AssessmentExpressResult) SetNextSteps(val []AssessmentNextStep) {
|
|
s.NextSteps = val
|
|
}
|
|
|
|
// SetSummary sets the value of Summary.
|
|
func (s *AssessmentExpressResult) SetSummary(val string) {
|
|
s.Summary = val
|
|
}
|
|
|
|
// SetDecidedAt sets the value of DecidedAt.
|
|
func (s *AssessmentExpressResult) SetDecidedAt(val Timestamp) {
|
|
s.DecidedAt = val
|
|
}
|
|
|
|
type AssessmentExpressResultCalibrationStatus string
|
|
|
|
const (
|
|
AssessmentExpressResultCalibrationStatusUncalibrated AssessmentExpressResultCalibrationStatus = "uncalibrated"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressResultCalibrationStatus values.
|
|
func (AssessmentExpressResultCalibrationStatus) AllValues() []AssessmentExpressResultCalibrationStatus {
|
|
return []AssessmentExpressResultCalibrationStatus{
|
|
AssessmentExpressResultCalibrationStatusUncalibrated,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressResultCalibrationStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressResultCalibrationStatusUncalibrated:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressResultCalibrationStatus) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressResultCalibrationStatus(data) {
|
|
case AssessmentExpressResultCalibrationStatusUncalibrated:
|
|
*s = AssessmentExpressResultCalibrationStatusUncalibrated
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentExpressResultKind string
|
|
|
|
const (
|
|
AssessmentExpressResultKindDemoExpress AssessmentExpressResultKind = "demo_express"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressResultKind values.
|
|
func (AssessmentExpressResultKind) AllValues() []AssessmentExpressResultKind {
|
|
return []AssessmentExpressResultKind{
|
|
AssessmentExpressResultKindDemoExpress,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressResultKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressResultKindDemoExpress:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressResultKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressResultKind(data) {
|
|
case AssessmentExpressResultKindDemoExpress:
|
|
*s = AssessmentExpressResultKindDemoExpress
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentExpressResultLimitationsItem string
|
|
|
|
const (
|
|
AssessmentExpressResultLimitationsItemDemonstrationOnly AssessmentExpressResultLimitationsItem = "demonstration_only"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressResultLimitationsItem values.
|
|
func (AssessmentExpressResultLimitationsItem) AllValues() []AssessmentExpressResultLimitationsItem {
|
|
return []AssessmentExpressResultLimitationsItem{
|
|
AssessmentExpressResultLimitationsItemDemonstrationOnly,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressResultLimitationsItem) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressResultLimitationsItemDemonstrationOnly:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressResultLimitationsItem) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressResultLimitationsItem(data) {
|
|
case AssessmentExpressResultLimitationsItemDemonstrationOnly:
|
|
*s = AssessmentExpressResultLimitationsItemDemonstrationOnly
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentExpressResultMode string
|
|
|
|
const (
|
|
AssessmentExpressResultModeDemoExpress AssessmentExpressResultMode = "demo_express"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressResultMode values.
|
|
func (AssessmentExpressResultMode) AllValues() []AssessmentExpressResultMode {
|
|
return []AssessmentExpressResultMode{
|
|
AssessmentExpressResultModeDemoExpress,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressResultMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressResultModeDemoExpress:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressResultMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressResultMode(data) {
|
|
case AssessmentExpressResultModeDemoExpress:
|
|
*s = AssessmentExpressResultModeDemoExpress
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentExpressResultOutcome string
|
|
|
|
const (
|
|
AssessmentExpressResultOutcomeDemonstration AssessmentExpressResultOutcome = "demonstration"
|
|
)
|
|
|
|
// AllValues returns all AssessmentExpressResultOutcome values.
|
|
func (AssessmentExpressResultOutcome) AllValues() []AssessmentExpressResultOutcome {
|
|
return []AssessmentExpressResultOutcome{
|
|
AssessmentExpressResultOutcomeDemonstration,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentExpressResultOutcome) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentExpressResultOutcomeDemonstration:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentExpressResultOutcome) UnmarshalText(data []byte) error {
|
|
switch AssessmentExpressResultOutcome(data) {
|
|
case AssessmentExpressResultOutcomeDemonstration:
|
|
*s = AssessmentExpressResultOutcomeDemonstration
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Command to finalize the attempt.
|
|
// Ref: #/components/schemas/AssessmentFinalization
|
|
type AssessmentFinalization struct {
|
|
ExpectedVersion AssessmentAttemptVersion `json:"expected_version"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *AssessmentFinalization) GetExpectedVersion() AssessmentAttemptVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *AssessmentFinalization) SetExpectedVersion(val AssessmentAttemptVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// Domain of the specialization where the evidence was weak.
|
|
// Ref: #/components/schemas/AssessmentGap
|
|
type AssessmentGap struct {
|
|
// Stable domain code of the bank blueprint.
|
|
Domain string `json:"domain"`
|
|
// Display name in Russian. Plain text.
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// GetDomain returns the value of Domain.
|
|
func (s *AssessmentGap) GetDomain() string {
|
|
return s.Domain
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *AssessmentGap) GetTitle() string {
|
|
return s.Title
|
|
}
|
|
|
|
// SetDomain sets the value of Domain.
|
|
func (s *AssessmentGap) SetDomain(val string) {
|
|
s.Domain = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *AssessmentGap) SetTitle(val string) {
|
|
s.Title = val
|
|
}
|
|
|
|
// Availability of an attempt for one grade of a specialization, with the limits that an attempt would
|
|
// have, so the client can show them before the start. The limit fields are null when the status is
|
|
// `insufficient_bank` or the policy defines no such limit.
|
|
// Ref: #/components/schemas/AssessmentGradeAvailability
|
|
type AssessmentGradeAvailability struct {
|
|
Grade GradeCode `json:"grade"`
|
|
Status AssessmentGradeAvailabilityStatus `json:"status"`
|
|
// Real-assessment mode that the server would use, or null when the status is `insufficient_bank`.
|
|
// `demo_express` is not a category assessment and is never returned here.
|
|
Mode NilAssessmentRealMode `json:"mode"`
|
|
// When the status is `cooldown`, the first time the attempt can start; otherwise null.
|
|
AvailableAt NilTimestamp `json:"available_at"`
|
|
// Time from the start to `expires_at`.
|
|
TimeLimitSeconds NilInt32 `json:"time_limit_seconds"`
|
|
// Session limit within the time limit.
|
|
MaxSessions NilInt32 `json:"max_sessions"`
|
|
// Item limit, as in `AssessmentProgress.max_items`.
|
|
MaxItems NilInt32 `json:"max_items"`
|
|
// Whether the attempt would include a main code practice.
|
|
PracticeRequired NilBool `json:"practice_required"`
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *AssessmentGradeAvailability) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *AssessmentGradeAvailability) GetStatus() AssessmentGradeAvailabilityStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentGradeAvailability) GetMode() NilAssessmentRealMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetAvailableAt returns the value of AvailableAt.
|
|
func (s *AssessmentGradeAvailability) GetAvailableAt() NilTimestamp {
|
|
return s.AvailableAt
|
|
}
|
|
|
|
// GetTimeLimitSeconds returns the value of TimeLimitSeconds.
|
|
func (s *AssessmentGradeAvailability) GetTimeLimitSeconds() NilInt32 {
|
|
return s.TimeLimitSeconds
|
|
}
|
|
|
|
// GetMaxSessions returns the value of MaxSessions.
|
|
func (s *AssessmentGradeAvailability) GetMaxSessions() NilInt32 {
|
|
return s.MaxSessions
|
|
}
|
|
|
|
// GetMaxItems returns the value of MaxItems.
|
|
func (s *AssessmentGradeAvailability) GetMaxItems() NilInt32 {
|
|
return s.MaxItems
|
|
}
|
|
|
|
// GetPracticeRequired returns the value of PracticeRequired.
|
|
func (s *AssessmentGradeAvailability) GetPracticeRequired() NilBool {
|
|
return s.PracticeRequired
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *AssessmentGradeAvailability) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *AssessmentGradeAvailability) SetStatus(val AssessmentGradeAvailabilityStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentGradeAvailability) SetMode(val NilAssessmentRealMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetAvailableAt sets the value of AvailableAt.
|
|
func (s *AssessmentGradeAvailability) SetAvailableAt(val NilTimestamp) {
|
|
s.AvailableAt = val
|
|
}
|
|
|
|
// SetTimeLimitSeconds sets the value of TimeLimitSeconds.
|
|
func (s *AssessmentGradeAvailability) SetTimeLimitSeconds(val NilInt32) {
|
|
s.TimeLimitSeconds = val
|
|
}
|
|
|
|
// SetMaxSessions sets the value of MaxSessions.
|
|
func (s *AssessmentGradeAvailability) SetMaxSessions(val NilInt32) {
|
|
s.MaxSessions = val
|
|
}
|
|
|
|
// SetMaxItems sets the value of MaxItems.
|
|
func (s *AssessmentGradeAvailability) SetMaxItems(val NilInt32) {
|
|
s.MaxItems = val
|
|
}
|
|
|
|
// SetPracticeRequired sets the value of PracticeRequired.
|
|
func (s *AssessmentGradeAvailability) SetPracticeRequired(val NilBool) {
|
|
s.PracticeRequired = val
|
|
}
|
|
|
|
// Whether an attempt for the grade can start now.
|
|
//
|
|
// - available: CreateMyAssessmentAttempt can start it.
|
|
// - active_attempt: the specialization has an active attempt; resume it by `active_attempt_id`.
|
|
// - cooldown: a retry or promotion interval or the attempt limit of the policy blocks it until
|
|
// `available_at`. Attempts that ended as `insufficient_bank` or `sandbox_unavailable` never cause
|
|
// it.
|
|
// - insufficient_bank: no published bank of the category, or not enough unseen families to cover the
|
|
// blueprint for this candidate. The server never fills the gap by repeating families.
|
|
//
|
|
// Ref: #/components/schemas/AssessmentGradeAvailabilityStatus
|
|
type AssessmentGradeAvailabilityStatus string
|
|
|
|
const (
|
|
AssessmentGradeAvailabilityStatusAvailable AssessmentGradeAvailabilityStatus = "available"
|
|
AssessmentGradeAvailabilityStatusActiveAttempt AssessmentGradeAvailabilityStatus = "active_attempt"
|
|
AssessmentGradeAvailabilityStatusCooldown AssessmentGradeAvailabilityStatus = "cooldown"
|
|
AssessmentGradeAvailabilityStatusInsufficientBank AssessmentGradeAvailabilityStatus = "insufficient_bank"
|
|
)
|
|
|
|
// AllValues returns all AssessmentGradeAvailabilityStatus values.
|
|
func (AssessmentGradeAvailabilityStatus) AllValues() []AssessmentGradeAvailabilityStatus {
|
|
return []AssessmentGradeAvailabilityStatus{
|
|
AssessmentGradeAvailabilityStatusAvailable,
|
|
AssessmentGradeAvailabilityStatusActiveAttempt,
|
|
AssessmentGradeAvailabilityStatusCooldown,
|
|
AssessmentGradeAvailabilityStatusInsufficientBank,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentGradeAvailabilityStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentGradeAvailabilityStatusAvailable:
|
|
return []byte(s), nil
|
|
case AssessmentGradeAvailabilityStatusActiveAttempt:
|
|
return []byte(s), nil
|
|
case AssessmentGradeAvailabilityStatusCooldown:
|
|
return []byte(s), nil
|
|
case AssessmentGradeAvailabilityStatusInsufficientBank:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentGradeAvailabilityStatus) UnmarshalText(data []byte) error {
|
|
switch AssessmentGradeAvailabilityStatus(data) {
|
|
case AssessmentGradeAvailabilityStatusAvailable:
|
|
*s = AssessmentGradeAvailabilityStatusAvailable
|
|
return nil
|
|
case AssessmentGradeAvailabilityStatusActiveAttempt:
|
|
*s = AssessmentGradeAvailabilityStatusActiveAttempt
|
|
return nil
|
|
case AssessmentGradeAvailabilityStatusCooldown:
|
|
*s = AssessmentGradeAvailabilityStatusCooldown
|
|
return nil
|
|
case AssessmentGradeAvailabilityStatusInsufficientBank:
|
|
*s = AssessmentGradeAvailabilityStatusInsufficientBank
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Interval on the ability scale.
|
|
// Ref: #/components/schemas/AssessmentInterval
|
|
type AssessmentInterval struct {
|
|
Low float64 `json:"low"`
|
|
High float64 `json:"high"`
|
|
}
|
|
|
|
// GetLow returns the value of Low.
|
|
func (s *AssessmentInterval) GetLow() float64 {
|
|
return s.Low
|
|
}
|
|
|
|
// GetHigh returns the value of High.
|
|
func (s *AssessmentInterval) GetHigh() float64 {
|
|
return s.High
|
|
}
|
|
|
|
// SetLow sets the value of Low.
|
|
func (s *AssessmentInterval) SetLow(val float64) {
|
|
s.Low = val
|
|
}
|
|
|
|
// SetHigh sets the value of High.
|
|
func (s *AssessmentInterval) SetHigh(val float64) {
|
|
s.High = val
|
|
}
|
|
|
|
// Item instance served to the candidate. The variant is fixed when it is first served: a reload, a
|
|
// retried request, or a resumed session returns the same instance with the same text and option order.
|
|
// The item never says whether an earlier answer was correct, and seed items, which are not scored, are
|
|
// indistinguishable from scored ones.
|
|
// Ref: #/components/schemas/AssessmentItem
|
|
type AssessmentItem struct {
|
|
ID AssessmentItemId `json:"id"`
|
|
// Position of the item in the attempt, from 1.
|
|
Sequence int32 `json:"sequence"`
|
|
// Statement in Russian. Plain text with line breaks; the client shows it as text, never as HTML.
|
|
Prompt string `json:"prompt"`
|
|
Content ItemContent `json:"content"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *AssessmentItem) GetID() AssessmentItemId {
|
|
return s.ID
|
|
}
|
|
|
|
// GetSequence returns the value of Sequence.
|
|
func (s *AssessmentItem) GetSequence() int32 {
|
|
return s.Sequence
|
|
}
|
|
|
|
// GetPrompt returns the value of Prompt.
|
|
func (s *AssessmentItem) GetPrompt() string {
|
|
return s.Prompt
|
|
}
|
|
|
|
// GetContent returns the value of Content.
|
|
func (s *AssessmentItem) GetContent() ItemContent {
|
|
return s.Content
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *AssessmentItem) SetID(val AssessmentItemId) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetSequence sets the value of Sequence.
|
|
func (s *AssessmentItem) SetSequence(val int32) {
|
|
s.Sequence = val
|
|
}
|
|
|
|
// SetPrompt sets the value of Prompt.
|
|
func (s *AssessmentItem) SetPrompt(val string) {
|
|
s.Prompt = val
|
|
}
|
|
|
|
// SetContent sets the value of Content.
|
|
func (s *AssessmentItem) SetContent(val ItemContent) {
|
|
s.Content = val
|
|
}
|
|
|
|
type AssessmentItemId uuid.UUID
|
|
|
|
// Known limitation of the method behind a real-assessment result, shown with the result.
|
|
//
|
|
// - uncalibrated_thresholds: the thresholds are not yet validated on a pilot.
|
|
// - demo_bank: the result comes from the small reviewed demo bank.
|
|
// - practice_not_included: the attempt had no code practice because the sandbox was not enabled.
|
|
// - unproctored: the attempt was taken online without supervision. Adding a value is a contract
|
|
// change.
|
|
//
|
|
// Ref: #/components/schemas/AssessmentLimitation
|
|
type AssessmentLimitation string
|
|
|
|
const (
|
|
AssessmentLimitationUncalibratedThresholds AssessmentLimitation = "uncalibrated_thresholds"
|
|
AssessmentLimitationDemoBank AssessmentLimitation = "demo_bank"
|
|
AssessmentLimitationPracticeNotIncluded AssessmentLimitation = "practice_not_included"
|
|
AssessmentLimitationUnproctored AssessmentLimitation = "unproctored"
|
|
)
|
|
|
|
// AllValues returns all AssessmentLimitation values.
|
|
func (AssessmentLimitation) AllValues() []AssessmentLimitation {
|
|
return []AssessmentLimitation{
|
|
AssessmentLimitationUncalibratedThresholds,
|
|
AssessmentLimitationDemoBank,
|
|
AssessmentLimitationPracticeNotIncluded,
|
|
AssessmentLimitationUnproctored,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentLimitation) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentLimitationUncalibratedThresholds:
|
|
return []byte(s), nil
|
|
case AssessmentLimitationDemoBank:
|
|
return []byte(s), nil
|
|
case AssessmentLimitationPracticeNotIncluded:
|
|
return []byte(s), nil
|
|
case AssessmentLimitationUnproctored:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentLimitation) UnmarshalText(data []byte) error {
|
|
switch AssessmentLimitation(data) {
|
|
case AssessmentLimitationUncalibratedThresholds:
|
|
*s = AssessmentLimitationUncalibratedThresholds
|
|
return nil
|
|
case AssessmentLimitationDemoBank:
|
|
*s = AssessmentLimitationDemoBank
|
|
return nil
|
|
case AssessmentLimitationPracticeNotIncluded:
|
|
*s = AssessmentLimitationPracticeNotIncluded
|
|
return nil
|
|
case AssessmentLimitationUnproctored:
|
|
*s = AssessmentLimitationUnproctored
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Step that the candidate may take next.
|
|
//
|
|
// - retake_same_grade: test the same grade again from `available_at`.
|
|
// - take_lower_grade: test the lower `grade`. After a failure, including the first test, it is
|
|
// allowed at once, outside the same-grade retry interval.
|
|
// - accept_lower_grade: accept the lower `grade` on the evidence of this attempt, when the data are
|
|
// sufficient (the command is planned).
|
|
// - take_higher_grade: test the higher `grade` from `available_at`. A first confirmation is not a
|
|
// promotion, so after it `available_at` is null; after a promotion the next one waits for the
|
|
// promotion interval of the policy.
|
|
//
|
|
// Ref: #/components/schemas/AssessmentNextAction
|
|
type AssessmentNextAction string
|
|
|
|
const (
|
|
AssessmentNextActionRetakeSameGrade AssessmentNextAction = "retake_same_grade"
|
|
AssessmentNextActionTakeLowerGrade AssessmentNextAction = "take_lower_grade"
|
|
AssessmentNextActionAcceptLowerGrade AssessmentNextAction = "accept_lower_grade"
|
|
AssessmentNextActionTakeHigherGrade AssessmentNextAction = "take_higher_grade"
|
|
)
|
|
|
|
// AllValues returns all AssessmentNextAction values.
|
|
func (AssessmentNextAction) AllValues() []AssessmentNextAction {
|
|
return []AssessmentNextAction{
|
|
AssessmentNextActionRetakeSameGrade,
|
|
AssessmentNextActionTakeLowerGrade,
|
|
AssessmentNextActionAcceptLowerGrade,
|
|
AssessmentNextActionTakeHigherGrade,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentNextAction) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentNextActionRetakeSameGrade:
|
|
return []byte(s), nil
|
|
case AssessmentNextActionTakeLowerGrade:
|
|
return []byte(s), nil
|
|
case AssessmentNextActionAcceptLowerGrade:
|
|
return []byte(s), nil
|
|
case AssessmentNextActionTakeHigherGrade:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentNextAction) UnmarshalText(data []byte) error {
|
|
switch AssessmentNextAction(data) {
|
|
case AssessmentNextActionRetakeSameGrade:
|
|
*s = AssessmentNextActionRetakeSameGrade
|
|
return nil
|
|
case AssessmentNextActionTakeLowerGrade:
|
|
*s = AssessmentNextActionTakeLowerGrade
|
|
return nil
|
|
case AssessmentNextActionAcceptLowerGrade:
|
|
*s = AssessmentNextActionAcceptLowerGrade
|
|
return nil
|
|
case AssessmentNextActionTakeHigherGrade:
|
|
*s = AssessmentNextActionTakeHigherGrade
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Step that the server allows after this result, computed when it was decided.
|
|
// Ref: #/components/schemas/AssessmentNextStep
|
|
type AssessmentNextStep struct {
|
|
Action AssessmentNextAction `json:"action"`
|
|
Grade GradeCode `json:"grade"`
|
|
// First time the step is allowed, or null when it is allowed now.
|
|
AvailableAt NilTimestamp `json:"available_at"`
|
|
}
|
|
|
|
// GetAction returns the value of Action.
|
|
func (s *AssessmentNextStep) GetAction() AssessmentNextAction {
|
|
return s.Action
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *AssessmentNextStep) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetAvailableAt returns the value of AvailableAt.
|
|
func (s *AssessmentNextStep) GetAvailableAt() NilTimestamp {
|
|
return s.AvailableAt
|
|
}
|
|
|
|
// SetAction sets the value of Action.
|
|
func (s *AssessmentNextStep) SetAction(val AssessmentNextAction) {
|
|
s.Action = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *AssessmentNextStep) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetAvailableAt sets the value of AvailableAt.
|
|
func (s *AssessmentNextStep) SetAvailableAt(val NilTimestamp) {
|
|
s.AvailableAt = val
|
|
}
|
|
|
|
// Why an attempt gives no decision. One root quota slot is reserved when a real root attempt starts;
|
|
// corrective checks in its chain do not reserve another slot.
|
|
//
|
|
// - expired: the time or session limit passed before the candidate finished the item part. Retry
|
|
// timing follows the recorded policy; a correction uses the existing root slot and does not reset
|
|
// the chain deadline or 30/90-day timers.
|
|
// - practice_incomplete: the item part was done, but the candidate did not submit the main practice
|
|
// before the limit. Retry timing follows the recorded policy; a correction uses the existing root
|
|
// slot and does not reset the chain deadline or 30/90-day timers.
|
|
// - insufficient_bank: the bank could not supply required coverage. A preflight refusal creates no
|
|
// attempt or root slot; a bank failure in an existing chain does not create a free new chain or
|
|
// another root slot.
|
|
// - sandbox_unavailable: the latest submission of a required or additional practice ended `failed`
|
|
// because of the sandbox infrastructure, and the limit passed before a verdict. It is a platform
|
|
// fault and does not create a new root slot or a free chain.
|
|
//
|
|
// Ref: #/components/schemas/AssessmentNotDeterminedReason
|
|
type AssessmentNotDeterminedReason string
|
|
|
|
const (
|
|
AssessmentNotDeterminedReasonExpired AssessmentNotDeterminedReason = "expired"
|
|
AssessmentNotDeterminedReasonPracticeIncomplete AssessmentNotDeterminedReason = "practice_incomplete"
|
|
AssessmentNotDeterminedReasonInsufficientBank AssessmentNotDeterminedReason = "insufficient_bank"
|
|
AssessmentNotDeterminedReasonSandboxUnavailable AssessmentNotDeterminedReason = "sandbox_unavailable"
|
|
)
|
|
|
|
// AllValues returns all AssessmentNotDeterminedReason values.
|
|
func (AssessmentNotDeterminedReason) AllValues() []AssessmentNotDeterminedReason {
|
|
return []AssessmentNotDeterminedReason{
|
|
AssessmentNotDeterminedReasonExpired,
|
|
AssessmentNotDeterminedReasonPracticeIncomplete,
|
|
AssessmentNotDeterminedReasonInsufficientBank,
|
|
AssessmentNotDeterminedReasonSandboxUnavailable,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentNotDeterminedReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentNotDeterminedReasonExpired:
|
|
return []byte(s), nil
|
|
case AssessmentNotDeterminedReasonPracticeIncomplete:
|
|
return []byte(s), nil
|
|
case AssessmentNotDeterminedReasonInsufficientBank:
|
|
return []byte(s), nil
|
|
case AssessmentNotDeterminedReasonSandboxUnavailable:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentNotDeterminedReason) UnmarshalText(data []byte) error {
|
|
switch AssessmentNotDeterminedReason(data) {
|
|
case AssessmentNotDeterminedReasonExpired:
|
|
*s = AssessmentNotDeterminedReasonExpired
|
|
return nil
|
|
case AssessmentNotDeterminedReasonPracticeIncomplete:
|
|
*s = AssessmentNotDeterminedReasonPracticeIncomplete
|
|
return nil
|
|
case AssessmentNotDeterminedReasonInsufficientBank:
|
|
*s = AssessmentNotDeterminedReasonInsufficientBank
|
|
return nil
|
|
case AssessmentNotDeterminedReasonSandboxUnavailable:
|
|
*s = AssessmentNotDeterminedReasonSandboxUnavailable
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Choice option or order element. Plain text.
|
|
// Ref: #/components/schemas/AssessmentOption
|
|
type AssessmentOption struct {
|
|
ID AssessmentOptionId `json:"id"`
|
|
// Text of the option; the client shows it as text, never as HTML.
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *AssessmentOption) GetID() AssessmentOptionId {
|
|
return s.ID
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *AssessmentOption) GetText() string {
|
|
return s.Text
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *AssessmentOption) SetID(val AssessmentOptionId) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *AssessmentOption) SetText(val string) {
|
|
s.Text = val
|
|
}
|
|
|
|
type AssessmentOptionId string
|
|
|
|
// Grade decision of the attempt.
|
|
//
|
|
// - confirmed: the target grade is confirmed by the rule of the recorded policy version.
|
|
// - not_confirmed: the evidence is below the rule, including an adaptive attempt whose probability
|
|
// stayed below confirmation after the additional practice, or whose additional practice was
|
|
// declined or not submitted in time. The previously confirmed grade, if any, stays in force.
|
|
// - not_determined: the attempt gives no decision; `not_determined_reason` says why. The previously
|
|
// confirmed grade stays in force.
|
|
//
|
|
// A failed, expired, or flagged attempt never lowers a confirmed grade.
|
|
// Ref: #/components/schemas/AssessmentOutcome
|
|
type AssessmentOutcome string
|
|
|
|
const (
|
|
AssessmentOutcomeConfirmed AssessmentOutcome = "confirmed"
|
|
AssessmentOutcomeNotConfirmed AssessmentOutcome = "not_confirmed"
|
|
AssessmentOutcomeNotDetermined AssessmentOutcome = "not_determined"
|
|
)
|
|
|
|
// AllValues returns all AssessmentOutcome values.
|
|
func (AssessmentOutcome) AllValues() []AssessmentOutcome {
|
|
return []AssessmentOutcome{
|
|
AssessmentOutcomeConfirmed,
|
|
AssessmentOutcomeNotConfirmed,
|
|
AssessmentOutcomeNotDetermined,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentOutcome) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentOutcomeConfirmed:
|
|
return []byte(s), nil
|
|
case AssessmentOutcomeNotConfirmed:
|
|
return []byte(s), nil
|
|
case AssessmentOutcomeNotDetermined:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentOutcome) UnmarshalText(data []byte) error {
|
|
switch AssessmentOutcome(data) {
|
|
case AssessmentOutcomeConfirmed:
|
|
*s = AssessmentOutcomeConfirmed
|
|
return nil
|
|
case AssessmentOutcomeNotConfirmed:
|
|
*s = AssessmentOutcomeNotConfirmed
|
|
return nil
|
|
case AssessmentOutcomeNotDetermined:
|
|
*s = AssessmentOutcomeNotDetermined
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Practice of the attempt. Its verdict is shown only after the submission; the solution time is kept
|
|
// as a separate label and never enters the ability estimate or the grade decision.
|
|
// Ref: #/components/schemas/AssessmentPractice
|
|
type AssessmentPractice struct {
|
|
Kind PracticeKind `json:"kind"`
|
|
ItemID AssessmentItemId `json:"item_id"`
|
|
Status PracticeStatus `json:"status"`
|
|
// Time of the latest submission, or null before the first one.
|
|
SubmittedAt NilTimestamp `json:"submitted_at"`
|
|
// The verdict when `status` is `finished`, otherwise null.
|
|
Verdict NilPracticeVerdict `json:"verdict"`
|
|
// The reason when `status` is `failed`, otherwise null.
|
|
FailureReason NilPracticeFailureReason `json:"failure_reason"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentPractice) GetKind() PracticeKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetItemID returns the value of ItemID.
|
|
func (s *AssessmentPractice) GetItemID() AssessmentItemId {
|
|
return s.ItemID
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *AssessmentPractice) GetStatus() PracticeStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSubmittedAt returns the value of SubmittedAt.
|
|
func (s *AssessmentPractice) GetSubmittedAt() NilTimestamp {
|
|
return s.SubmittedAt
|
|
}
|
|
|
|
// GetVerdict returns the value of Verdict.
|
|
func (s *AssessmentPractice) GetVerdict() NilPracticeVerdict {
|
|
return s.Verdict
|
|
}
|
|
|
|
// GetFailureReason returns the value of FailureReason.
|
|
func (s *AssessmentPractice) GetFailureReason() NilPracticeFailureReason {
|
|
return s.FailureReason
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentPractice) SetKind(val PracticeKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetItemID sets the value of ItemID.
|
|
func (s *AssessmentPractice) SetItemID(val AssessmentItemId) {
|
|
s.ItemID = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *AssessmentPractice) SetStatus(val PracticeStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSubmittedAt sets the value of SubmittedAt.
|
|
func (s *AssessmentPractice) SetSubmittedAt(val NilTimestamp) {
|
|
s.SubmittedAt = val
|
|
}
|
|
|
|
// SetVerdict sets the value of Verdict.
|
|
func (s *AssessmentPractice) SetVerdict(val NilPracticeVerdict) {
|
|
s.Verdict = val
|
|
}
|
|
|
|
// SetFailureReason sets the value of FailureReason.
|
|
func (s *AssessmentPractice) SetFailureReason(val NilPracticeFailureReason) {
|
|
s.FailureReason = val
|
|
}
|
|
|
|
// Verdict of one practice of the attempt.
|
|
// Ref: #/components/schemas/AssessmentPracticeResult
|
|
type AssessmentPracticeResult struct {
|
|
Kind PracticeKind `json:"kind"`
|
|
Verdict PracticeVerdict `json:"verdict"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentPracticeResult) GetKind() PracticeKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetVerdict returns the value of Verdict.
|
|
func (s *AssessmentPracticeResult) GetVerdict() PracticeVerdict {
|
|
return s.Verdict
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentPracticeResult) SetKind(val PracticeKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetVerdict sets the value of Verdict.
|
|
func (s *AssessmentPracticeResult) SetVerdict(val PracticeVerdict) {
|
|
s.Verdict = val
|
|
}
|
|
|
|
// Progress of the item part. It counts seed items like scored ones, so it does not reveal which items
|
|
// are scored. An adaptive attempt may end its item part before `max_items` by its stop rule. A
|
|
// finalize refused as premature does not list the unfinished parts; the client reads them here, in
|
|
// `current_item`, and in `practices`.
|
|
// Ref: #/components/schemas/AssessmentProgress
|
|
type AssessmentProgress struct {
|
|
AnsweredItems int32 `json:"answered_items"`
|
|
// Item limit of the attempt: the form size in demo_basic, or the policy limit of scored and seed items
|
|
// together in adaptive.
|
|
MaxItems int32 `json:"max_items"`
|
|
}
|
|
|
|
// GetAnsweredItems returns the value of AnsweredItems.
|
|
func (s *AssessmentProgress) GetAnsweredItems() int32 {
|
|
return s.AnsweredItems
|
|
}
|
|
|
|
// GetMaxItems returns the value of MaxItems.
|
|
func (s *AssessmentProgress) GetMaxItems() int32 {
|
|
return s.MaxItems
|
|
}
|
|
|
|
// SetAnsweredItems sets the value of AnsweredItems.
|
|
func (s *AssessmentProgress) SetAnsweredItems(val int32) {
|
|
s.AnsweredItems = val
|
|
}
|
|
|
|
// SetMaxItems sets the value of MaxItems.
|
|
func (s *AssessmentProgress) SetMaxItems(val int32) {
|
|
s.MaxItems = val
|
|
}
|
|
|
|
// Merged schema.
|
|
// Ref: #/components/schemas/AssessmentQualifiedAttempt
|
|
type AssessmentQualifiedAttempt struct {
|
|
// Attempt identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Version AssessmentAttemptVersion `json:"version"`
|
|
// Merged property.
|
|
Specialization NilSpecializationCode `json:"specialization"`
|
|
// Merged property.
|
|
TargetGrade NilGradeCode `json:"target_grade"`
|
|
// Task language of the attempt, or null when none is selected.
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Merged property.
|
|
Kind AssessmentQualifiedAttemptKind `json:"kind"`
|
|
// Merged property.
|
|
RootAttemptID NilUUID `json:"root_attempt_id"`
|
|
// Merged property.
|
|
ChainDeadline NilTimestamp `json:"chain_deadline"`
|
|
// Merged property.
|
|
Mode AssessmentQualifiedAttemptMode `json:"mode"`
|
|
State AssessmentAttemptState `json:"state"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
StartedAt Timestamp `json:"started_at"`
|
|
// Server deadline. For demo_express it is 180 to 300 seconds after started_at; for a corrective
|
|
// assessment it does not exceed chain_deadline.
|
|
ExpiresAt Timestamp `json:"expires_at"`
|
|
// Session limit of the attempt, or null when its policy defines none.
|
|
Sessions NilAssessmentSessions `json:"sessions"`
|
|
// Time the attempt reached a terminal state, or null while it is active.
|
|
FinishedAt NilTimestamp `json:"finished_at"`
|
|
Progress AssessmentProgress `json:"progress"`
|
|
// Item to answer now: a test item in `in_progress`, the practice item to submit in `practice_pending`
|
|
// or `additional_practice_pending` while that practice is `not_started` or `failed`, and null
|
|
// otherwise.
|
|
CurrentItem NilAssessmentItem `json:"current_item"`
|
|
// Practices in the order assigned by the mode policy. The list exposes verdicts only after submission.
|
|
Practices []AssessmentPractice `json:"practices"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *AssessmentQualifiedAttempt) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *AssessmentQualifiedAttempt) GetVersion() AssessmentAttemptVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentQualifiedAttempt) GetSpecialization() NilSpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentQualifiedAttempt) GetTargetGrade() NilGradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedAttempt) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentQualifiedAttempt) GetKind() AssessmentQualifiedAttemptKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentQualifiedAttempt) GetRootAttemptID() NilUUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// GetChainDeadline returns the value of ChainDeadline.
|
|
func (s *AssessmentQualifiedAttempt) GetChainDeadline() NilTimestamp {
|
|
return s.ChainDeadline
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentQualifiedAttempt) GetMode() AssessmentQualifiedAttemptMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *AssessmentQualifiedAttempt) GetState() AssessmentAttemptState {
|
|
return s.State
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentQualifiedAttempt) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetStartedAt returns the value of StartedAt.
|
|
func (s *AssessmentQualifiedAttempt) GetStartedAt() Timestamp {
|
|
return s.StartedAt
|
|
}
|
|
|
|
// GetExpiresAt returns the value of ExpiresAt.
|
|
func (s *AssessmentQualifiedAttempt) GetExpiresAt() Timestamp {
|
|
return s.ExpiresAt
|
|
}
|
|
|
|
// GetSessions returns the value of Sessions.
|
|
func (s *AssessmentQualifiedAttempt) GetSessions() NilAssessmentSessions {
|
|
return s.Sessions
|
|
}
|
|
|
|
// GetFinishedAt returns the value of FinishedAt.
|
|
func (s *AssessmentQualifiedAttempt) GetFinishedAt() NilTimestamp {
|
|
return s.FinishedAt
|
|
}
|
|
|
|
// GetProgress returns the value of Progress.
|
|
func (s *AssessmentQualifiedAttempt) GetProgress() AssessmentProgress {
|
|
return s.Progress
|
|
}
|
|
|
|
// GetCurrentItem returns the value of CurrentItem.
|
|
func (s *AssessmentQualifiedAttempt) GetCurrentItem() NilAssessmentItem {
|
|
return s.CurrentItem
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentQualifiedAttempt) GetPractices() []AssessmentPractice {
|
|
return s.Practices
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *AssessmentQualifiedAttempt) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *AssessmentQualifiedAttempt) SetVersion(val AssessmentAttemptVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentQualifiedAttempt) SetSpecialization(val NilSpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentQualifiedAttempt) SetTargetGrade(val NilGradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedAttempt) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentQualifiedAttempt) SetKind(val AssessmentQualifiedAttemptKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentQualifiedAttempt) SetRootAttemptID(val NilUUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// SetChainDeadline sets the value of ChainDeadline.
|
|
func (s *AssessmentQualifiedAttempt) SetChainDeadline(val NilTimestamp) {
|
|
s.ChainDeadline = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentQualifiedAttempt) SetMode(val AssessmentQualifiedAttemptMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *AssessmentQualifiedAttempt) SetState(val AssessmentAttemptState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentQualifiedAttempt) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetStartedAt sets the value of StartedAt.
|
|
func (s *AssessmentQualifiedAttempt) SetStartedAt(val Timestamp) {
|
|
s.StartedAt = val
|
|
}
|
|
|
|
// SetExpiresAt sets the value of ExpiresAt.
|
|
func (s *AssessmentQualifiedAttempt) SetExpiresAt(val Timestamp) {
|
|
s.ExpiresAt = val
|
|
}
|
|
|
|
// SetSessions sets the value of Sessions.
|
|
func (s *AssessmentQualifiedAttempt) SetSessions(val NilAssessmentSessions) {
|
|
s.Sessions = val
|
|
}
|
|
|
|
// SetFinishedAt sets the value of FinishedAt.
|
|
func (s *AssessmentQualifiedAttempt) SetFinishedAt(val NilTimestamp) {
|
|
s.FinishedAt = val
|
|
}
|
|
|
|
// SetProgress sets the value of Progress.
|
|
func (s *AssessmentQualifiedAttempt) SetProgress(val AssessmentProgress) {
|
|
s.Progress = val
|
|
}
|
|
|
|
// SetCurrentItem sets the value of CurrentItem.
|
|
func (s *AssessmentQualifiedAttempt) SetCurrentItem(val NilAssessmentItem) {
|
|
s.CurrentItem = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentQualifiedAttempt) SetPractices(val []AssessmentPractice) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// Start a real assessment for a specialization and target grade, with the task language. The candidate
|
|
// comes from the session. The server chooses demo_basic or adaptive and fixes the policy, bank, and
|
|
// algorithm versions. Unknown fields such as `mode`, `seed`, or `score` are rejected.
|
|
// Ref: #/components/schemas/AssessmentQualifiedAttemptCreate
|
|
type AssessmentQualifiedAttemptCreate struct {
|
|
// Start a real-assessment chain and reserve one root quota slot.
|
|
Kind AssessmentQualifiedAttemptCreateKind `json:"kind"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
TargetGrade GradeCode `json:"target_grade"`
|
|
// Task language of the attempt, one of the `task_languages` of the published bank, or null when the
|
|
// bank offers no choice of language. The questionnaire choice is the value the client offers first.
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentQualifiedAttemptCreate) GetKind() AssessmentQualifiedAttemptCreateKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentQualifiedAttemptCreate) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentQualifiedAttemptCreate) GetTargetGrade() GradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedAttemptCreate) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentQualifiedAttemptCreate) SetKind(val AssessmentQualifiedAttemptCreateKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentQualifiedAttemptCreate) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentQualifiedAttemptCreate) SetTargetGrade(val GradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedAttemptCreate) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// Start a real-assessment chain and reserve one root quota slot.
|
|
type AssessmentQualifiedAttemptCreateKind string
|
|
|
|
const (
|
|
AssessmentQualifiedAttemptCreateKindRoot AssessmentQualifiedAttemptCreateKind = "root"
|
|
)
|
|
|
|
// AllValues returns all AssessmentQualifiedAttemptCreateKind values.
|
|
func (AssessmentQualifiedAttemptCreateKind) AllValues() []AssessmentQualifiedAttemptCreateKind {
|
|
return []AssessmentQualifiedAttemptCreateKind{
|
|
AssessmentQualifiedAttemptCreateKindRoot,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentQualifiedAttemptCreateKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentQualifiedAttemptCreateKindRoot:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentQualifiedAttemptCreateKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentQualifiedAttemptCreateKind(data) {
|
|
case AssessmentQualifiedAttemptCreateKindRoot:
|
|
*s = AssessmentQualifiedAttemptCreateKindRoot
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentQualifiedAttemptKind string
|
|
|
|
const (
|
|
AssessmentQualifiedAttemptKindRoot AssessmentQualifiedAttemptKind = "root"
|
|
)
|
|
|
|
// AllValues returns all AssessmentQualifiedAttemptKind values.
|
|
func (AssessmentQualifiedAttemptKind) AllValues() []AssessmentQualifiedAttemptKind {
|
|
return []AssessmentQualifiedAttemptKind{
|
|
AssessmentQualifiedAttemptKindRoot,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentQualifiedAttemptKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentQualifiedAttemptKindRoot:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentQualifiedAttemptKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentQualifiedAttemptKind(data) {
|
|
case AssessmentQualifiedAttemptKindRoot:
|
|
*s = AssessmentQualifiedAttemptKindRoot
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentQualifiedAttemptMode string
|
|
|
|
const (
|
|
AssessmentQualifiedAttemptModeDemoBasic AssessmentQualifiedAttemptMode = "demo_basic"
|
|
AssessmentQualifiedAttemptModeAdaptive AssessmentQualifiedAttemptMode = "adaptive"
|
|
)
|
|
|
|
// AllValues returns all AssessmentQualifiedAttemptMode values.
|
|
func (AssessmentQualifiedAttemptMode) AllValues() []AssessmentQualifiedAttemptMode {
|
|
return []AssessmentQualifiedAttemptMode{
|
|
AssessmentQualifiedAttemptModeDemoBasic,
|
|
AssessmentQualifiedAttemptModeAdaptive,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentQualifiedAttemptMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentQualifiedAttemptModeDemoBasic:
|
|
return []byte(s), nil
|
|
case AssessmentQualifiedAttemptModeAdaptive:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentQualifiedAttemptMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentQualifiedAttemptMode(data) {
|
|
case AssessmentQualifiedAttemptModeDemoBasic:
|
|
*s = AssessmentQualifiedAttemptModeDemoBasic
|
|
return nil
|
|
case AssessmentQualifiedAttemptModeAdaptive:
|
|
*s = AssessmentQualifiedAttemptModeAdaptive
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Merged schema.
|
|
// Ref: #/components/schemas/AssessmentQualifiedResult
|
|
type AssessmentQualifiedResult struct {
|
|
AttemptID uuid.UUID `json:"attempt_id"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
TargetGrade GradeCode `json:"target_grade"`
|
|
// Merged property.
|
|
RootAttemptID NilUUID `json:"root_attempt_id"`
|
|
// Merged property.
|
|
ChainDeadline NilTimestamp `json:"chain_deadline"`
|
|
TaskLanguage NilTaskLanguage `json:"task_language"`
|
|
// Merged property.
|
|
Kind AssessmentQualifiedResultKind `json:"kind"`
|
|
Mode AssessmentQualifiedResultMode `json:"mode"`
|
|
Versions AssessmentVersions `json:"versions"`
|
|
Outcome AssessmentOutcome `json:"outcome"`
|
|
// The reason when `outcome` is `not_determined`, otherwise null.
|
|
NotDeterminedReason NilAssessmentNotDeterminedReason `json:"not_determined_reason"`
|
|
// Grade that this attempt confirmed, the target grade, or null when it confirmed none. Together with
|
|
// the specialization it forms the category.
|
|
ConfirmedGrade NilGradeCode `json:"confirmed_grade"`
|
|
// Confirmed grade of the specialization before this attempt, or null. When the attempt confirmed
|
|
// nothing, this grade stays in force.
|
|
PreviousConfirmedGrade NilGradeCode `json:"previous_confirmed_grade"`
|
|
// Strength of an adaptive confirmation, otherwise null.
|
|
Strength NilAssessmentStrength `json:"strength"`
|
|
CalibrationStatus CalibrationStatus `json:"calibration_status"`
|
|
Limitations []AssessmentLimitation `json:"limitations"`
|
|
// Ability estimate and uncertainty of an adaptive attempt with a decision; null for demo_basic, which
|
|
// computes none, and for an attempt without a decision.
|
|
Uncertainty NilAssessmentUncertainty `json:"uncertainty"`
|
|
// Raw score of a demo_basic attempt with a decision, otherwise null.
|
|
BasicScore NilBasicScore `json:"basic_score"`
|
|
// Verdicts of the practices that have one, main first.
|
|
Practices []AssessmentPracticeResult `json:"practices"`
|
|
// Domains with weak evidence; empty when none were found or the method finds none.
|
|
Gaps []AssessmentGap `json:"gaps"`
|
|
Durations AssessmentDurations `json:"durations"`
|
|
NextSteps []AssessmentNextStep `json:"next_steps"`
|
|
DecidedAt Timestamp `json:"decided_at"`
|
|
}
|
|
|
|
// GetAttemptID returns the value of AttemptID.
|
|
func (s *AssessmentQualifiedResult) GetAttemptID() uuid.UUID {
|
|
return s.AttemptID
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentQualifiedResult) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetTargetGrade returns the value of TargetGrade.
|
|
func (s *AssessmentQualifiedResult) GetTargetGrade() GradeCode {
|
|
return s.TargetGrade
|
|
}
|
|
|
|
// GetRootAttemptID returns the value of RootAttemptID.
|
|
func (s *AssessmentQualifiedResult) GetRootAttemptID() NilUUID {
|
|
return s.RootAttemptID
|
|
}
|
|
|
|
// GetChainDeadline returns the value of ChainDeadline.
|
|
func (s *AssessmentQualifiedResult) GetChainDeadline() NilTimestamp {
|
|
return s.ChainDeadline
|
|
}
|
|
|
|
// GetTaskLanguage returns the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedResult) GetTaskLanguage() NilTaskLanguage {
|
|
return s.TaskLanguage
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *AssessmentQualifiedResult) GetKind() AssessmentQualifiedResultKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetMode returns the value of Mode.
|
|
func (s *AssessmentQualifiedResult) GetMode() AssessmentQualifiedResultMode {
|
|
return s.Mode
|
|
}
|
|
|
|
// GetVersions returns the value of Versions.
|
|
func (s *AssessmentQualifiedResult) GetVersions() AssessmentVersions {
|
|
return s.Versions
|
|
}
|
|
|
|
// GetOutcome returns the value of Outcome.
|
|
func (s *AssessmentQualifiedResult) GetOutcome() AssessmentOutcome {
|
|
return s.Outcome
|
|
}
|
|
|
|
// GetNotDeterminedReason returns the value of NotDeterminedReason.
|
|
func (s *AssessmentQualifiedResult) GetNotDeterminedReason() NilAssessmentNotDeterminedReason {
|
|
return s.NotDeterminedReason
|
|
}
|
|
|
|
// GetConfirmedGrade returns the value of ConfirmedGrade.
|
|
func (s *AssessmentQualifiedResult) GetConfirmedGrade() NilGradeCode {
|
|
return s.ConfirmedGrade
|
|
}
|
|
|
|
// GetPreviousConfirmedGrade returns the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentQualifiedResult) GetPreviousConfirmedGrade() NilGradeCode {
|
|
return s.PreviousConfirmedGrade
|
|
}
|
|
|
|
// GetStrength returns the value of Strength.
|
|
func (s *AssessmentQualifiedResult) GetStrength() NilAssessmentStrength {
|
|
return s.Strength
|
|
}
|
|
|
|
// GetCalibrationStatus returns the value of CalibrationStatus.
|
|
func (s *AssessmentQualifiedResult) GetCalibrationStatus() CalibrationStatus {
|
|
return s.CalibrationStatus
|
|
}
|
|
|
|
// GetLimitations returns the value of Limitations.
|
|
func (s *AssessmentQualifiedResult) GetLimitations() []AssessmentLimitation {
|
|
return s.Limitations
|
|
}
|
|
|
|
// GetUncertainty returns the value of Uncertainty.
|
|
func (s *AssessmentQualifiedResult) GetUncertainty() NilAssessmentUncertainty {
|
|
return s.Uncertainty
|
|
}
|
|
|
|
// GetBasicScore returns the value of BasicScore.
|
|
func (s *AssessmentQualifiedResult) GetBasicScore() NilBasicScore {
|
|
return s.BasicScore
|
|
}
|
|
|
|
// GetPractices returns the value of Practices.
|
|
func (s *AssessmentQualifiedResult) GetPractices() []AssessmentPracticeResult {
|
|
return s.Practices
|
|
}
|
|
|
|
// GetGaps returns the value of Gaps.
|
|
func (s *AssessmentQualifiedResult) GetGaps() []AssessmentGap {
|
|
return s.Gaps
|
|
}
|
|
|
|
// GetDurations returns the value of Durations.
|
|
func (s *AssessmentQualifiedResult) GetDurations() AssessmentDurations {
|
|
return s.Durations
|
|
}
|
|
|
|
// GetNextSteps returns the value of NextSteps.
|
|
func (s *AssessmentQualifiedResult) GetNextSteps() []AssessmentNextStep {
|
|
return s.NextSteps
|
|
}
|
|
|
|
// GetDecidedAt returns the value of DecidedAt.
|
|
func (s *AssessmentQualifiedResult) GetDecidedAt() Timestamp {
|
|
return s.DecidedAt
|
|
}
|
|
|
|
// SetAttemptID sets the value of AttemptID.
|
|
func (s *AssessmentQualifiedResult) SetAttemptID(val uuid.UUID) {
|
|
s.AttemptID = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentQualifiedResult) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetTargetGrade sets the value of TargetGrade.
|
|
func (s *AssessmentQualifiedResult) SetTargetGrade(val GradeCode) {
|
|
s.TargetGrade = val
|
|
}
|
|
|
|
// SetRootAttemptID sets the value of RootAttemptID.
|
|
func (s *AssessmentQualifiedResult) SetRootAttemptID(val NilUUID) {
|
|
s.RootAttemptID = val
|
|
}
|
|
|
|
// SetChainDeadline sets the value of ChainDeadline.
|
|
func (s *AssessmentQualifiedResult) SetChainDeadline(val NilTimestamp) {
|
|
s.ChainDeadline = val
|
|
}
|
|
|
|
// SetTaskLanguage sets the value of TaskLanguage.
|
|
func (s *AssessmentQualifiedResult) SetTaskLanguage(val NilTaskLanguage) {
|
|
s.TaskLanguage = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *AssessmentQualifiedResult) SetKind(val AssessmentQualifiedResultKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetMode sets the value of Mode.
|
|
func (s *AssessmentQualifiedResult) SetMode(val AssessmentQualifiedResultMode) {
|
|
s.Mode = val
|
|
}
|
|
|
|
// SetVersions sets the value of Versions.
|
|
func (s *AssessmentQualifiedResult) SetVersions(val AssessmentVersions) {
|
|
s.Versions = val
|
|
}
|
|
|
|
// SetOutcome sets the value of Outcome.
|
|
func (s *AssessmentQualifiedResult) SetOutcome(val AssessmentOutcome) {
|
|
s.Outcome = val
|
|
}
|
|
|
|
// SetNotDeterminedReason sets the value of NotDeterminedReason.
|
|
func (s *AssessmentQualifiedResult) SetNotDeterminedReason(val NilAssessmentNotDeterminedReason) {
|
|
s.NotDeterminedReason = val
|
|
}
|
|
|
|
// SetConfirmedGrade sets the value of ConfirmedGrade.
|
|
func (s *AssessmentQualifiedResult) SetConfirmedGrade(val NilGradeCode) {
|
|
s.ConfirmedGrade = val
|
|
}
|
|
|
|
// SetPreviousConfirmedGrade sets the value of PreviousConfirmedGrade.
|
|
func (s *AssessmentQualifiedResult) SetPreviousConfirmedGrade(val NilGradeCode) {
|
|
s.PreviousConfirmedGrade = val
|
|
}
|
|
|
|
// SetStrength sets the value of Strength.
|
|
func (s *AssessmentQualifiedResult) SetStrength(val NilAssessmentStrength) {
|
|
s.Strength = val
|
|
}
|
|
|
|
// SetCalibrationStatus sets the value of CalibrationStatus.
|
|
func (s *AssessmentQualifiedResult) SetCalibrationStatus(val CalibrationStatus) {
|
|
s.CalibrationStatus = val
|
|
}
|
|
|
|
// SetLimitations sets the value of Limitations.
|
|
func (s *AssessmentQualifiedResult) SetLimitations(val []AssessmentLimitation) {
|
|
s.Limitations = val
|
|
}
|
|
|
|
// SetUncertainty sets the value of Uncertainty.
|
|
func (s *AssessmentQualifiedResult) SetUncertainty(val NilAssessmentUncertainty) {
|
|
s.Uncertainty = val
|
|
}
|
|
|
|
// SetBasicScore sets the value of BasicScore.
|
|
func (s *AssessmentQualifiedResult) SetBasicScore(val NilBasicScore) {
|
|
s.BasicScore = val
|
|
}
|
|
|
|
// SetPractices sets the value of Practices.
|
|
func (s *AssessmentQualifiedResult) SetPractices(val []AssessmentPracticeResult) {
|
|
s.Practices = val
|
|
}
|
|
|
|
// SetGaps sets the value of Gaps.
|
|
func (s *AssessmentQualifiedResult) SetGaps(val []AssessmentGap) {
|
|
s.Gaps = val
|
|
}
|
|
|
|
// SetDurations sets the value of Durations.
|
|
func (s *AssessmentQualifiedResult) SetDurations(val AssessmentDurations) {
|
|
s.Durations = val
|
|
}
|
|
|
|
// SetNextSteps sets the value of NextSteps.
|
|
func (s *AssessmentQualifiedResult) SetNextSteps(val []AssessmentNextStep) {
|
|
s.NextSteps = val
|
|
}
|
|
|
|
// SetDecidedAt sets the value of DecidedAt.
|
|
func (s *AssessmentQualifiedResult) SetDecidedAt(val Timestamp) {
|
|
s.DecidedAt = val
|
|
}
|
|
|
|
// Merged schema.
|
|
type AssessmentQualifiedResultKind string
|
|
|
|
const (
|
|
AssessmentQualifiedResultKindRoot AssessmentQualifiedResultKind = "root"
|
|
)
|
|
|
|
// AllValues returns all AssessmentQualifiedResultKind values.
|
|
func (AssessmentQualifiedResultKind) AllValues() []AssessmentQualifiedResultKind {
|
|
return []AssessmentQualifiedResultKind{
|
|
AssessmentQualifiedResultKindRoot,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentQualifiedResultKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentQualifiedResultKindRoot:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentQualifiedResultKind) UnmarshalText(data []byte) error {
|
|
switch AssessmentQualifiedResultKind(data) {
|
|
case AssessmentQualifiedResultKindRoot:
|
|
*s = AssessmentQualifiedResultKindRoot
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type AssessmentQualifiedResultMode string
|
|
|
|
const (
|
|
AssessmentQualifiedResultModeDemoBasic AssessmentQualifiedResultMode = "demo_basic"
|
|
AssessmentQualifiedResultModeAdaptive AssessmentQualifiedResultMode = "adaptive"
|
|
)
|
|
|
|
// AllValues returns all AssessmentQualifiedResultMode values.
|
|
func (AssessmentQualifiedResultMode) AllValues() []AssessmentQualifiedResultMode {
|
|
return []AssessmentQualifiedResultMode{
|
|
AssessmentQualifiedResultModeDemoBasic,
|
|
AssessmentQualifiedResultModeAdaptive,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentQualifiedResultMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentQualifiedResultModeDemoBasic:
|
|
return []byte(s), nil
|
|
case AssessmentQualifiedResultModeAdaptive:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentQualifiedResultMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentQualifiedResultMode(data) {
|
|
case AssessmentQualifiedResultModeDemoBasic:
|
|
*s = AssessmentQualifiedResultModeDemoBasic
|
|
return nil
|
|
case AssessmentQualifiedResultModeAdaptive:
|
|
*s = AssessmentQualifiedResultModeAdaptive
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Server-selected mode available to a real category assessment.
|
|
// Ref: #/components/schemas/AssessmentRealMode
|
|
type AssessmentRealMode string
|
|
|
|
const (
|
|
AssessmentRealModeDemoBasic AssessmentRealMode = "demo_basic"
|
|
AssessmentRealModeAdaptive AssessmentRealMode = "adaptive"
|
|
)
|
|
|
|
// AllValues returns all AssessmentRealMode values.
|
|
func (AssessmentRealMode) AllValues() []AssessmentRealMode {
|
|
return []AssessmentRealMode{
|
|
AssessmentRealModeDemoBasic,
|
|
AssessmentRealModeAdaptive,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentRealMode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentRealModeDemoBasic:
|
|
return []byte(s), nil
|
|
case AssessmentRealModeAdaptive:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentRealMode) UnmarshalText(data []byte) error {
|
|
switch AssessmentRealMode(data) {
|
|
case AssessmentRealModeDemoBasic:
|
|
*s = AssessmentRealModeDemoBasic
|
|
return nil
|
|
case AssessmentRealModeAdaptive:
|
|
*s = AssessmentRealModeAdaptive
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Immutable result of a terminal assessment attempt. The result shape distinguishes real grade
|
|
// decisions from demo_express training output.
|
|
// Ref: #/components/schemas/AssessmentResult
|
|
// AssessmentResult represents sum type.
|
|
type AssessmentResult struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type AssessmentResultType
|
|
AssessmentQualifiedResult AssessmentQualifiedResult
|
|
AssessmentCorrectiveResult AssessmentCorrectiveResult
|
|
AssessmentExpressResult AssessmentExpressResult
|
|
}
|
|
|
|
// AssessmentResultType is oneOf type of AssessmentResult.
|
|
type AssessmentResultType string
|
|
|
|
// Possible values for AssessmentResultType.
|
|
const (
|
|
AssessmentQualifiedResultAssessmentResult AssessmentResultType = "root"
|
|
AssessmentCorrectiveResultAssessmentResult AssessmentResultType = "corrective"
|
|
AssessmentExpressResultAssessmentResult AssessmentResultType = "demo_express"
|
|
)
|
|
|
|
// IsAssessmentQualifiedResult reports whether AssessmentResult is AssessmentQualifiedResult.
|
|
func (s AssessmentResult) IsAssessmentQualifiedResult() bool {
|
|
return s.Type == AssessmentQualifiedResultAssessmentResult
|
|
}
|
|
|
|
// IsAssessmentCorrectiveResult reports whether AssessmentResult is AssessmentCorrectiveResult.
|
|
func (s AssessmentResult) IsAssessmentCorrectiveResult() bool {
|
|
return s.Type == AssessmentCorrectiveResultAssessmentResult
|
|
}
|
|
|
|
// IsAssessmentExpressResult reports whether AssessmentResult is AssessmentExpressResult.
|
|
func (s AssessmentResult) IsAssessmentExpressResult() bool {
|
|
return s.Type == AssessmentExpressResultAssessmentResult
|
|
}
|
|
|
|
// SetAssessmentQualifiedResult sets AssessmentResult to AssessmentQualifiedResult.
|
|
func (s *AssessmentResult) SetAssessmentQualifiedResult(v AssessmentQualifiedResult) {
|
|
s.Type = AssessmentQualifiedResultAssessmentResult
|
|
s.AssessmentQualifiedResult = v
|
|
}
|
|
|
|
// GetAssessmentQualifiedResult returns AssessmentQualifiedResult and true boolean if AssessmentResult is AssessmentQualifiedResult.
|
|
func (s AssessmentResult) GetAssessmentQualifiedResult() (v AssessmentQualifiedResult, ok bool) {
|
|
if !s.IsAssessmentQualifiedResult() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentQualifiedResult, true
|
|
}
|
|
|
|
// NewAssessmentQualifiedResultAssessmentResult returns new AssessmentResult from AssessmentQualifiedResult.
|
|
func NewAssessmentQualifiedResultAssessmentResult(v AssessmentQualifiedResult) AssessmentResult {
|
|
var s AssessmentResult
|
|
s.SetAssessmentQualifiedResult(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentCorrectiveResult sets AssessmentResult to AssessmentCorrectiveResult.
|
|
func (s *AssessmentResult) SetAssessmentCorrectiveResult(v AssessmentCorrectiveResult) {
|
|
s.Type = AssessmentCorrectiveResultAssessmentResult
|
|
s.AssessmentCorrectiveResult = v
|
|
}
|
|
|
|
// GetAssessmentCorrectiveResult returns AssessmentCorrectiveResult and true boolean if AssessmentResult is AssessmentCorrectiveResult.
|
|
func (s AssessmentResult) GetAssessmentCorrectiveResult() (v AssessmentCorrectiveResult, ok bool) {
|
|
if !s.IsAssessmentCorrectiveResult() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentCorrectiveResult, true
|
|
}
|
|
|
|
// NewAssessmentCorrectiveResultAssessmentResult returns new AssessmentResult from AssessmentCorrectiveResult.
|
|
func NewAssessmentCorrectiveResultAssessmentResult(v AssessmentCorrectiveResult) AssessmentResult {
|
|
var s AssessmentResult
|
|
s.SetAssessmentCorrectiveResult(v)
|
|
return s
|
|
}
|
|
|
|
// SetAssessmentExpressResult sets AssessmentResult to AssessmentExpressResult.
|
|
func (s *AssessmentResult) SetAssessmentExpressResult(v AssessmentExpressResult) {
|
|
s.Type = AssessmentExpressResultAssessmentResult
|
|
s.AssessmentExpressResult = v
|
|
}
|
|
|
|
// GetAssessmentExpressResult returns AssessmentExpressResult and true boolean if AssessmentResult is AssessmentExpressResult.
|
|
func (s AssessmentResult) GetAssessmentExpressResult() (v AssessmentExpressResult, ok bool) {
|
|
if !s.IsAssessmentExpressResult() {
|
|
return v, false
|
|
}
|
|
return s.AssessmentExpressResult, true
|
|
}
|
|
|
|
// NewAssessmentExpressResultAssessmentResult returns new AssessmentResult from AssessmentExpressResult.
|
|
func NewAssessmentExpressResultAssessmentResult(v AssessmentExpressResult) AssessmentResult {
|
|
var s AssessmentResult
|
|
s.SetAssessmentExpressResult(v)
|
|
return s
|
|
}
|
|
|
|
// AssessmentResultHeaders wraps AssessmentResult with response headers.
|
|
type AssessmentResultHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response AssessmentResult
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *AssessmentResultHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *AssessmentResultHeaders) GetResponse() AssessmentResult {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *AssessmentResultHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *AssessmentResultHeaders) SetResponse(val AssessmentResult) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*AssessmentResultHeaders) getMyAssessmentResultRes() {}
|
|
|
|
// Work sessions of the attempt, as the policy version limits them, for example two sessions within the
|
|
// time limit.
|
|
//
|
|
// Session 1 starts with attempt creation. After it ends due to `idle_timeout_seconds` of inactivity,
|
|
// the candidate explicitly starts or resumes work with StartMyAssessmentAttemptSession.
|
|
// GetMyAssessmentAttempt and GetMyAssessmentResult are read-only and never start a session. The
|
|
// session command checks the attempt deadline and `max_sessions`; when either limit has passed, it
|
|
// records the due terminal transition and returns the resulting attempt. Reads of terminal attempts do
|
|
// not change them.
|
|
// Ref: #/components/schemas/AssessmentSessions
|
|
type AssessmentSessions struct {
|
|
// Sessions started so far, including the current one.
|
|
Used int32 `json:"used"`
|
|
Max int32 `json:"max"`
|
|
// Inactivity after which the current session ends.
|
|
IdleTimeoutSeconds int32 `json:"idle_timeout_seconds"`
|
|
}
|
|
|
|
// GetUsed returns the value of Used.
|
|
func (s *AssessmentSessions) GetUsed() int32 {
|
|
return s.Used
|
|
}
|
|
|
|
// GetMax returns the value of Max.
|
|
func (s *AssessmentSessions) GetMax() int32 {
|
|
return s.Max
|
|
}
|
|
|
|
// GetIdleTimeoutSeconds returns the value of IdleTimeoutSeconds.
|
|
func (s *AssessmentSessions) GetIdleTimeoutSeconds() int32 {
|
|
return s.IdleTimeoutSeconds
|
|
}
|
|
|
|
// SetUsed sets the value of Used.
|
|
func (s *AssessmentSessions) SetUsed(val int32) {
|
|
s.Used = val
|
|
}
|
|
|
|
// SetMax sets the value of Max.
|
|
func (s *AssessmentSessions) SetMax(val int32) {
|
|
s.Max = val
|
|
}
|
|
|
|
// SetIdleTimeoutSeconds sets the value of IdleTimeoutSeconds.
|
|
func (s *AssessmentSessions) SetIdleTimeoutSeconds(val int32) {
|
|
s.IdleTimeoutSeconds = val
|
|
}
|
|
|
|
// Assessment state of one questionnaire specialization. Specializations are assessed independently,
|
|
// with independent retry intervals.
|
|
// Ref: #/components/schemas/AssessmentSpecializationAvailability
|
|
type AssessmentSpecializationAvailability struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
// Currently confirmed grade of the specialization, or null.
|
|
ConfirmedGrade NilGradeCode `json:"confirmed_grade"`
|
|
// Identifier of the active attempt of the specialization, or null.
|
|
ActiveAttemptID NilUUID `json:"active_attempt_id"`
|
|
// Every grade of the scale in ascending order.
|
|
Grades []AssessmentGradeAvailability `json:"grades"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *AssessmentSpecializationAvailability) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetConfirmedGrade returns the value of ConfirmedGrade.
|
|
func (s *AssessmentSpecializationAvailability) GetConfirmedGrade() NilGradeCode {
|
|
return s.ConfirmedGrade
|
|
}
|
|
|
|
// GetActiveAttemptID returns the value of ActiveAttemptID.
|
|
func (s *AssessmentSpecializationAvailability) GetActiveAttemptID() NilUUID {
|
|
return s.ActiveAttemptID
|
|
}
|
|
|
|
// GetGrades returns the value of Grades.
|
|
func (s *AssessmentSpecializationAvailability) GetGrades() []AssessmentGradeAvailability {
|
|
return s.Grades
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *AssessmentSpecializationAvailability) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetConfirmedGrade sets the value of ConfirmedGrade.
|
|
func (s *AssessmentSpecializationAvailability) SetConfirmedGrade(val NilGradeCode) {
|
|
s.ConfirmedGrade = val
|
|
}
|
|
|
|
// SetActiveAttemptID sets the value of ActiveAttemptID.
|
|
func (s *AssessmentSpecializationAvailability) SetActiveAttemptID(val NilUUID) {
|
|
s.ActiveAttemptID = val
|
|
}
|
|
|
|
// SetGrades sets the value of Grades.
|
|
func (s *AssessmentSpecializationAvailability) SetGrades(val []AssessmentGradeAvailability) {
|
|
s.Grades = val
|
|
}
|
|
|
|
// Strength of an adaptive confirmation: `high` or `medium`, by the probability bands of the recorded
|
|
// policy version.
|
|
// Ref: #/components/schemas/AssessmentStrength
|
|
type AssessmentStrength string
|
|
|
|
const (
|
|
AssessmentStrengthHigh AssessmentStrength = "high"
|
|
AssessmentStrengthMedium AssessmentStrength = "medium"
|
|
)
|
|
|
|
// AllValues returns all AssessmentStrength values.
|
|
func (AssessmentStrength) AllValues() []AssessmentStrength {
|
|
return []AssessmentStrength{
|
|
AssessmentStrengthHigh,
|
|
AssessmentStrengthMedium,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s AssessmentStrength) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case AssessmentStrengthHigh:
|
|
return []byte(s), nil
|
|
case AssessmentStrengthMedium:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *AssessmentStrength) UnmarshalText(data []byte) error {
|
|
switch AssessmentStrength(data) {
|
|
case AssessmentStrengthHigh:
|
|
*s = AssessmentStrengthHigh
|
|
return nil
|
|
case AssessmentStrengthMedium:
|
|
*s = AssessmentStrengthMedium
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Ability estimate of an adaptive attempt and its uncertainty: the EAP estimate on the specialization
|
|
// scale, its standard error, the 95% interval, and the probability of reaching the target grade
|
|
// threshold. The interval is reported but is not a separate stop condition.
|
|
// Ref: #/components/schemas/AssessmentUncertainty
|
|
type AssessmentUncertainty struct {
|
|
Theta float64 `json:"theta"`
|
|
StandardError float64 `json:"standard_error"`
|
|
Interval95 AssessmentInterval `json:"interval_95"`
|
|
// Probability of reaching the threshold of the target grade.
|
|
PGrade float64 `json:"p_grade"`
|
|
}
|
|
|
|
// GetTheta returns the value of Theta.
|
|
func (s *AssessmentUncertainty) GetTheta() float64 {
|
|
return s.Theta
|
|
}
|
|
|
|
// GetStandardError returns the value of StandardError.
|
|
func (s *AssessmentUncertainty) GetStandardError() float64 {
|
|
return s.StandardError
|
|
}
|
|
|
|
// GetInterval95 returns the value of Interval95.
|
|
func (s *AssessmentUncertainty) GetInterval95() AssessmentInterval {
|
|
return s.Interval95
|
|
}
|
|
|
|
// GetPGrade returns the value of PGrade.
|
|
func (s *AssessmentUncertainty) GetPGrade() float64 {
|
|
return s.PGrade
|
|
}
|
|
|
|
// SetTheta sets the value of Theta.
|
|
func (s *AssessmentUncertainty) SetTheta(val float64) {
|
|
s.Theta = val
|
|
}
|
|
|
|
// SetStandardError sets the value of StandardError.
|
|
func (s *AssessmentUncertainty) SetStandardError(val float64) {
|
|
s.StandardError = val
|
|
}
|
|
|
|
// SetInterval95 sets the value of Interval95.
|
|
func (s *AssessmentUncertainty) SetInterval95(val AssessmentInterval) {
|
|
s.Interval95 = val
|
|
}
|
|
|
|
// SetPGrade sets the value of PGrade.
|
|
func (s *AssessmentUncertainty) SetPGrade(val float64) {
|
|
s.PGrade = val
|
|
}
|
|
|
|
type AssessmentVersionLabel string
|
|
|
|
// Versions fixed when the attempt was created. They never change during the attempt, and a result is
|
|
// always reproduced from the stored answers with these versions; a later policy, bank, or algorithm
|
|
// version does not rewrite it.
|
|
// Ref: #/components/schemas/AssessmentVersions
|
|
type AssessmentVersions struct {
|
|
// Number of the `product` policy version whose assessment rules apply: thresholds, stop rules, item
|
|
// limits, time and session limits, and retry intervals.
|
|
PolicyVersion int32 `json:"policy_version"`
|
|
BankVersion AssessmentVersionLabel `json:"bank_version"`
|
|
AlgorithmVersion AssessmentVersionLabel `json:"algorithm_version"`
|
|
}
|
|
|
|
// GetPolicyVersion returns the value of PolicyVersion.
|
|
func (s *AssessmentVersions) GetPolicyVersion() int32 {
|
|
return s.PolicyVersion
|
|
}
|
|
|
|
// GetBankVersion returns the value of BankVersion.
|
|
func (s *AssessmentVersions) GetBankVersion() AssessmentVersionLabel {
|
|
return s.BankVersion
|
|
}
|
|
|
|
// GetAlgorithmVersion returns the value of AlgorithmVersion.
|
|
func (s *AssessmentVersions) GetAlgorithmVersion() AssessmentVersionLabel {
|
|
return s.AlgorithmVersion
|
|
}
|
|
|
|
// SetPolicyVersion sets the value of PolicyVersion.
|
|
func (s *AssessmentVersions) SetPolicyVersion(val int32) {
|
|
s.PolicyVersion = val
|
|
}
|
|
|
|
// SetBankVersion sets the value of BankVersion.
|
|
func (s *AssessmentVersions) SetBankVersion(val AssessmentVersionLabel) {
|
|
s.BankVersion = val
|
|
}
|
|
|
|
// SetAlgorithmVersion sets the value of AlgorithmVersion.
|
|
func (s *AssessmentVersions) SetAlgorithmVersion(val AssessmentVersionLabel) {
|
|
s.AlgorithmVersion = val
|
|
}
|
|
|
|
// Raw score of a demo_basic attempt and the pass mark of the recorded basic grading policy. The pass
|
|
// mark comes from that policy version and never from the handler.
|
|
// Ref: #/components/schemas/BasicScore
|
|
type BasicScore struct {
|
|
Points int32 `json:"points"`
|
|
MaxPoints int32 `json:"max_points"`
|
|
PassPoints int32 `json:"pass_points"`
|
|
}
|
|
|
|
// GetPoints returns the value of Points.
|
|
func (s *BasicScore) GetPoints() int32 {
|
|
return s.Points
|
|
}
|
|
|
|
// GetMaxPoints returns the value of MaxPoints.
|
|
func (s *BasicScore) GetMaxPoints() int32 {
|
|
return s.MaxPoints
|
|
}
|
|
|
|
// GetPassPoints returns the value of PassPoints.
|
|
func (s *BasicScore) GetPassPoints() int32 {
|
|
return s.PassPoints
|
|
}
|
|
|
|
// SetPoints sets the value of Points.
|
|
func (s *BasicScore) SetPoints(val int32) {
|
|
s.Points = val
|
|
}
|
|
|
|
// SetMaxPoints sets the value of MaxPoints.
|
|
func (s *BasicScore) SetMaxPoints(val int32) {
|
|
s.MaxPoints = val
|
|
}
|
|
|
|
// SetPassPoints sets the value of PassPoints.
|
|
func (s *BasicScore) SetPassPoints(val int32) {
|
|
s.PassPoints = val
|
|
}
|
|
|
|
type CacheControlNoStore string
|
|
|
|
const (
|
|
CacheControlNoStoreNoStore CacheControlNoStore = "no-store"
|
|
)
|
|
|
|
// AllValues returns all CacheControlNoStore values.
|
|
func (CacheControlNoStore) AllValues() []CacheControlNoStore {
|
|
return []CacheControlNoStore{
|
|
CacheControlNoStoreNoStore,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s CacheControlNoStore) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case CacheControlNoStoreNoStore:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *CacheControlNoStore) UnmarshalText(data []byte) error {
|
|
switch CacheControlNoStore(data) {
|
|
case CacheControlNoStoreNoStore:
|
|
*s = CacheControlNoStoreNoStore
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Whether the thresholds of the recorded policy version are empirically calibrated. `uncalibrated`
|
|
// results are provisional: their thresholds come from expert judgement, and their probabilities are
|
|
// not claimed to be calibrated.
|
|
// Ref: #/components/schemas/CalibrationStatus
|
|
type CalibrationStatus string
|
|
|
|
const (
|
|
CalibrationStatusUncalibrated CalibrationStatus = "uncalibrated"
|
|
CalibrationStatusCalibrated CalibrationStatus = "calibrated"
|
|
)
|
|
|
|
// AllValues returns all CalibrationStatus values.
|
|
func (CalibrationStatus) AllValues() []CalibrationStatus {
|
|
return []CalibrationStatus{
|
|
CalibrationStatusUncalibrated,
|
|
CalibrationStatusCalibrated,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s CalibrationStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case CalibrationStatusUncalibrated:
|
|
return []byte(s), nil
|
|
case CalibrationStatusCalibrated:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *CalibrationStatus) UnmarshalText(data []byte) error {
|
|
switch CalibrationStatus(data) {
|
|
case CalibrationStatusUncalibrated:
|
|
*s = CalibrationStatusUncalibrated
|
|
return nil
|
|
case CalibrationStatusCalibrated:
|
|
*s = CalibrationStatusCalibrated
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type CancelMyInvitationBadRequest Problem
|
|
|
|
func (*CancelMyInvitationBadRequest) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationConflict Problem
|
|
|
|
func (*CancelMyInvitationConflict) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationForbidden Problem
|
|
|
|
func (*CancelMyInvitationForbidden) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationNotFound Problem
|
|
|
|
func (*CancelMyInvitationNotFound) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationPreconditionFailed Problem
|
|
|
|
func (*CancelMyInvitationPreconditionFailed) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationUnauthorized Problem
|
|
|
|
func (*CancelMyInvitationUnauthorized) cancelMyInvitationRes() {}
|
|
|
|
type CancelMyInvitationUnprocessableEntity Problem
|
|
|
|
func (*CancelMyInvitationUnprocessableEntity) cancelMyInvitationRes() {}
|
|
|
|
// Experience that the candidate states for one specialization, in whole months. It is self-reported
|
|
// context: it never adds assessment points and never confirms a grade. The work history entries of the
|
|
// candidate profile (`ProfileExperienceItem`) are a different, detailed claim: the two are saved
|
|
// separately and the server neither adds the entries up nor fills them from these totals.
|
|
// Ref: #/components/schemas/CandidateExperience
|
|
type CandidateExperience struct {
|
|
// Months of commercial work in the specialization.
|
|
CommercialMonths int32 `json:"commercial_months"`
|
|
// Months of study, internships, or academic projects in the specialization.
|
|
AcademicMonths int32 `json:"academic_months"`
|
|
}
|
|
|
|
// GetCommercialMonths returns the value of CommercialMonths.
|
|
func (s *CandidateExperience) GetCommercialMonths() int32 {
|
|
return s.CommercialMonths
|
|
}
|
|
|
|
// GetAcademicMonths returns the value of AcademicMonths.
|
|
func (s *CandidateExperience) GetAcademicMonths() int32 {
|
|
return s.AcademicMonths
|
|
}
|
|
|
|
// SetCommercialMonths sets the value of CommercialMonths.
|
|
func (s *CandidateExperience) SetCommercialMonths(val int32) {
|
|
s.CommercialMonths = val
|
|
}
|
|
|
|
// SetAcademicMonths sets the value of AcademicMonths.
|
|
func (s *CandidateExperience) SetAcademicMonths(val int32) {
|
|
s.AcademicMonths = val
|
|
}
|
|
|
|
type CandidateHandle string
|
|
|
|
// Invitation as the addressed candidate reads it: the organization, the current terms with their
|
|
// version, the state and the deadline, the text and the choice of the consent C4 while an acceptance
|
|
// is possible, the candidate's own decline, and the contact grant that the acceptance created. It has
|
|
// no candidate handle, no need, no salary indicator, and no contact value: the candidate's own
|
|
// contacts and salary minimum stay in the profile.
|
|
// Ref: #/components/schemas/CandidateInvitation
|
|
type CandidateInvitation struct {
|
|
// Identifier of the invitation.
|
|
ID uuid.UUID `json:"id"`
|
|
Organization InvitationOrganization `json:"organization"`
|
|
State InvitationState `json:"state"`
|
|
ExpiryReason NilInvitationExpiryReason `json:"expiry_reason"`
|
|
Version InvitationVersion `json:"version"`
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
Terms InvitationTerms `json:"terms"`
|
|
ResponseDeadlineAt Timestamp `json:"response_deadline_at"`
|
|
DeliveredAt Timestamp `json:"delivered_at"`
|
|
// Moment of the first view recorded by ViewMyInvitation, or null when the candidate has not opened the
|
|
// terms.
|
|
ViewedAt NilTimestamp `json:"viewed_at"`
|
|
RespondedAt NilTimestamp `json:"responded_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
// Text and choice of the consent C4 for an acceptance, or null when an acceptance is impossible now:
|
|
// the state does not allow it, the deadline has passed, or the profile holds no contact to disclose.
|
|
// In the last case the client tells the candidate to add a contact to the profile first, because a
|
|
// grant must cover at least one field.
|
|
ContactConsent NilContactConsentOffer `json:"contact_consent"`
|
|
// The candidate's decline, or null unless `state` is `declined`.
|
|
Decline NilInvitationDeclineRecord `json:"decline"`
|
|
// Contact grant that the acceptance of this invitation created, or null when the invitation was never
|
|
// accepted. It stays after a revocation, with its status and reason.
|
|
ContactGrant NilContactGrant `json:"contact_grant"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *CandidateInvitation) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *CandidateInvitation) GetOrganization() InvitationOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *CandidateInvitation) GetState() InvitationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetExpiryReason returns the value of ExpiryReason.
|
|
func (s *CandidateInvitation) GetExpiryReason() NilInvitationExpiryReason {
|
|
return s.ExpiryReason
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *CandidateInvitation) GetVersion() InvitationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *CandidateInvitation) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *CandidateInvitation) GetTerms() InvitationTerms {
|
|
return s.Terms
|
|
}
|
|
|
|
// GetResponseDeadlineAt returns the value of ResponseDeadlineAt.
|
|
func (s *CandidateInvitation) GetResponseDeadlineAt() Timestamp {
|
|
return s.ResponseDeadlineAt
|
|
}
|
|
|
|
// GetDeliveredAt returns the value of DeliveredAt.
|
|
func (s *CandidateInvitation) GetDeliveredAt() Timestamp {
|
|
return s.DeliveredAt
|
|
}
|
|
|
|
// GetViewedAt returns the value of ViewedAt.
|
|
func (s *CandidateInvitation) GetViewedAt() NilTimestamp {
|
|
return s.ViewedAt
|
|
}
|
|
|
|
// GetRespondedAt returns the value of RespondedAt.
|
|
func (s *CandidateInvitation) GetRespondedAt() NilTimestamp {
|
|
return s.RespondedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *CandidateInvitation) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// GetContactConsent returns the value of ContactConsent.
|
|
func (s *CandidateInvitation) GetContactConsent() NilContactConsentOffer {
|
|
return s.ContactConsent
|
|
}
|
|
|
|
// GetDecline returns the value of Decline.
|
|
func (s *CandidateInvitation) GetDecline() NilInvitationDeclineRecord {
|
|
return s.Decline
|
|
}
|
|
|
|
// GetContactGrant returns the value of ContactGrant.
|
|
func (s *CandidateInvitation) GetContactGrant() NilContactGrant {
|
|
return s.ContactGrant
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *CandidateInvitation) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *CandidateInvitation) SetOrganization(val InvitationOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *CandidateInvitation) SetState(val InvitationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetExpiryReason sets the value of ExpiryReason.
|
|
func (s *CandidateInvitation) SetExpiryReason(val NilInvitationExpiryReason) {
|
|
s.ExpiryReason = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *CandidateInvitation) SetVersion(val InvitationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *CandidateInvitation) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *CandidateInvitation) SetTerms(val InvitationTerms) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// SetResponseDeadlineAt sets the value of ResponseDeadlineAt.
|
|
func (s *CandidateInvitation) SetResponseDeadlineAt(val Timestamp) {
|
|
s.ResponseDeadlineAt = val
|
|
}
|
|
|
|
// SetDeliveredAt sets the value of DeliveredAt.
|
|
func (s *CandidateInvitation) SetDeliveredAt(val Timestamp) {
|
|
s.DeliveredAt = val
|
|
}
|
|
|
|
// SetViewedAt sets the value of ViewedAt.
|
|
func (s *CandidateInvitation) SetViewedAt(val NilTimestamp) {
|
|
s.ViewedAt = val
|
|
}
|
|
|
|
// SetRespondedAt sets the value of RespondedAt.
|
|
func (s *CandidateInvitation) SetRespondedAt(val NilTimestamp) {
|
|
s.RespondedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *CandidateInvitation) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// SetContactConsent sets the value of ContactConsent.
|
|
func (s *CandidateInvitation) SetContactConsent(val NilContactConsentOffer) {
|
|
s.ContactConsent = val
|
|
}
|
|
|
|
// SetDecline sets the value of Decline.
|
|
func (s *CandidateInvitation) SetDecline(val NilInvitationDeclineRecord) {
|
|
s.Decline = val
|
|
}
|
|
|
|
// SetContactGrant sets the value of ContactGrant.
|
|
func (s *CandidateInvitation) SetContactGrant(val NilContactGrant) {
|
|
s.ContactGrant = val
|
|
}
|
|
|
|
// CandidateInvitationHeaders wraps CandidateInvitation with response headers.
|
|
type CandidateInvitationHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CandidateInvitation
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CandidateInvitationHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CandidateInvitationHeaders) GetResponse() CandidateInvitation {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CandidateInvitationHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CandidateInvitationHeaders) SetResponse(val CandidateInvitation) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CandidateInvitationHeaders) acceptMyInvitationRes() {}
|
|
func (*CandidateInvitationHeaders) cancelMyInvitationRes() {}
|
|
func (*CandidateInvitationHeaders) declineMyInvitationRes() {}
|
|
func (*CandidateInvitationHeaders) getMyInvitationRes() {}
|
|
func (*CandidateInvitationHeaders) viewMyInvitationRes() {}
|
|
|
|
// One page of the candidate's invitations, newest first by delivery time.
|
|
// Ref: #/components/schemas/CandidateInvitationList
|
|
type CandidateInvitationList struct {
|
|
// Invitations of the page.
|
|
Items []CandidateInvitationSummary `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *CandidateInvitationList) GetItems() []CandidateInvitationSummary {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *CandidateInvitationList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *CandidateInvitationList) SetItems(val []CandidateInvitationSummary) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *CandidateInvitationList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// CandidateInvitationListHeaders wraps CandidateInvitationList with response headers.
|
|
type CandidateInvitationListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CandidateInvitationList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CandidateInvitationListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CandidateInvitationListHeaders) GetResponse() CandidateInvitationList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CandidateInvitationListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CandidateInvitationListHeaders) SetResponse(val CandidateInvitationList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CandidateInvitationListHeaders) listMyInvitationsRes() {}
|
|
|
|
// Invitation in the candidate's inbox: the organization, the state, the versions, the role, the salary
|
|
// range, and the deadline. Listing never records a view; GetMyInvitation returns the full terms, and
|
|
// ViewMyInvitation records the view.
|
|
// Ref: #/components/schemas/CandidateInvitationSummary
|
|
type CandidateInvitationSummary struct {
|
|
// Identifier of the invitation.
|
|
ID uuid.UUID `json:"id"`
|
|
Organization InvitationOrganization `json:"organization"`
|
|
State InvitationState `json:"state"`
|
|
ExpiryReason NilInvitationExpiryReason `json:"expiry_reason"`
|
|
Version InvitationVersion `json:"version"`
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
RoleTitle InvitationRoleTitle `json:"role_title"`
|
|
Salary SalaryRange `json:"salary"`
|
|
WorkFormats []WorkFormat `json:"work_formats"`
|
|
ResponseDeadlineAt Timestamp `json:"response_deadline_at"`
|
|
DeliveredAt Timestamp `json:"delivered_at"`
|
|
ViewedAt NilTimestamp `json:"viewed_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *CandidateInvitationSummary) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *CandidateInvitationSummary) GetOrganization() InvitationOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *CandidateInvitationSummary) GetState() InvitationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetExpiryReason returns the value of ExpiryReason.
|
|
func (s *CandidateInvitationSummary) GetExpiryReason() NilInvitationExpiryReason {
|
|
return s.ExpiryReason
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *CandidateInvitationSummary) GetVersion() InvitationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *CandidateInvitationSummary) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetRoleTitle returns the value of RoleTitle.
|
|
func (s *CandidateInvitationSummary) GetRoleTitle() InvitationRoleTitle {
|
|
return s.RoleTitle
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *CandidateInvitationSummary) GetSalary() SalaryRange {
|
|
return s.Salary
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *CandidateInvitationSummary) GetWorkFormats() []WorkFormat {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// GetResponseDeadlineAt returns the value of ResponseDeadlineAt.
|
|
func (s *CandidateInvitationSummary) GetResponseDeadlineAt() Timestamp {
|
|
return s.ResponseDeadlineAt
|
|
}
|
|
|
|
// GetDeliveredAt returns the value of DeliveredAt.
|
|
func (s *CandidateInvitationSummary) GetDeliveredAt() Timestamp {
|
|
return s.DeliveredAt
|
|
}
|
|
|
|
// GetViewedAt returns the value of ViewedAt.
|
|
func (s *CandidateInvitationSummary) GetViewedAt() NilTimestamp {
|
|
return s.ViewedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *CandidateInvitationSummary) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *CandidateInvitationSummary) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *CandidateInvitationSummary) SetOrganization(val InvitationOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *CandidateInvitationSummary) SetState(val InvitationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetExpiryReason sets the value of ExpiryReason.
|
|
func (s *CandidateInvitationSummary) SetExpiryReason(val NilInvitationExpiryReason) {
|
|
s.ExpiryReason = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *CandidateInvitationSummary) SetVersion(val InvitationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *CandidateInvitationSummary) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetRoleTitle sets the value of RoleTitle.
|
|
func (s *CandidateInvitationSummary) SetRoleTitle(val InvitationRoleTitle) {
|
|
s.RoleTitle = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *CandidateInvitationSummary) SetSalary(val SalaryRange) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *CandidateInvitationSummary) SetWorkFormats(val []WorkFormat) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// SetResponseDeadlineAt sets the value of ResponseDeadlineAt.
|
|
func (s *CandidateInvitationSummary) SetResponseDeadlineAt(val Timestamp) {
|
|
s.ResponseDeadlineAt = val
|
|
}
|
|
|
|
// SetDeliveredAt sets the value of DeliveredAt.
|
|
func (s *CandidateInvitationSummary) SetDeliveredAt(val Timestamp) {
|
|
s.DeliveredAt = val
|
|
}
|
|
|
|
// SetViewedAt sets the value of ViewedAt.
|
|
func (s *CandidateInvitationSummary) SetViewedAt(val NilTimestamp) {
|
|
s.ViewedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *CandidateInvitationSummary) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// The card of an organization as a candidate sees it: what an invitation shows before the candidate
|
|
// decides. The server builds it from the profile and the verification level and returns it to the
|
|
// owner as the preview of PRD FR07 ("through the eyes of the candidate"); a client never sends it. It
|
|
// holds no membership, no role, no account, no version, and no ground of the verification: a member's
|
|
// email address, the number of members, and the history of the organization stay out of it. The card
|
|
// is the same object that the candidate side will return (planned in the invitation contract). Only a
|
|
// candidate who received an invitation from the organization sees it; it is not a public page, and no
|
|
// operation shows it to anyone else until the open question about publishing the names of
|
|
// representatives is decided (152-FZ). The server may leave `representatives` out, and a card without
|
|
// them means that the representatives are not published, not that the organization has none.
|
|
// Ref: #/components/schemas/CandidateOrganizationCard
|
|
type CandidateOrganizationCard struct {
|
|
// Identifier of the organization.
|
|
ID uuid.UUID `json:"id"`
|
|
Name OrganizationName `json:"name"`
|
|
// Description of the organization, or null.
|
|
Description NilOrganizationDescription `json:"description"`
|
|
// Field of business of the organization, or null.
|
|
Sphere NilOrganizationSphere `json:"sphere"`
|
|
Contacts OrganizationContactChannels `json:"contacts"`
|
|
// Representatives in the order the owner gave them. Absent or null means that they are not published
|
|
// on this card, which says nothing about whether the organization has any.
|
|
Representatives OptNilOrganizationRepresentativeArray `json:"representatives"`
|
|
VerificationLevel OrganizationVerificationLevel `json:"verification_level"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *CandidateOrganizationCard) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *CandidateOrganizationCard) GetName() OrganizationName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *CandidateOrganizationCard) GetDescription() NilOrganizationDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetSphere returns the value of Sphere.
|
|
func (s *CandidateOrganizationCard) GetSphere() NilOrganizationSphere {
|
|
return s.Sphere
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *CandidateOrganizationCard) GetContacts() OrganizationContactChannels {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetRepresentatives returns the value of Representatives.
|
|
func (s *CandidateOrganizationCard) GetRepresentatives() OptNilOrganizationRepresentativeArray {
|
|
return s.Representatives
|
|
}
|
|
|
|
// GetVerificationLevel returns the value of VerificationLevel.
|
|
func (s *CandidateOrganizationCard) GetVerificationLevel() OrganizationVerificationLevel {
|
|
return s.VerificationLevel
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *CandidateOrganizationCard) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *CandidateOrganizationCard) SetName(val OrganizationName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *CandidateOrganizationCard) SetDescription(val NilOrganizationDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetSphere sets the value of Sphere.
|
|
func (s *CandidateOrganizationCard) SetSphere(val NilOrganizationSphere) {
|
|
s.Sphere = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *CandidateOrganizationCard) SetContacts(val OrganizationContactChannels) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetRepresentatives sets the value of Representatives.
|
|
func (s *CandidateOrganizationCard) SetRepresentatives(val OptNilOrganizationRepresentativeArray) {
|
|
s.Representatives = val
|
|
}
|
|
|
|
// SetVerificationLevel sets the value of VerificationLevel.
|
|
func (s *CandidateOrganizationCard) SetVerificationLevel(val OrganizationVerificationLevel) {
|
|
s.VerificationLevel = val
|
|
}
|
|
|
|
// The private profile of the current candidate: full name and contacts, stack, roles, work experience,
|
|
// soft skills, and desired terms, each value with its confirmation state and provenance. It is
|
|
// personal data that only the candidate reads. It is never an organization-visible schema: an
|
|
// organization sees a candidate only through the anonymous card and, after an accepted invitation,
|
|
// through the contact grant, and no organization schema refers to this one. Every value is a claim of
|
|
// trust level 0. The `self_assessed_grade` of a role is what the candidate says; the
|
|
// `confirmed_categories` list is what assessment results established, and the two are never mixed. A
|
|
// candidate who has not saved the profile gets version 0, every single field `unknown`, empty lists,
|
|
// and null `updated_at`. The profile is manual by nature and complete without a file: no field
|
|
// requires a resume, the ML service, or an FSP account, and a candidate with none of them has the same
|
|
// fields. Work formats live in the questionnaire; a candidate's assessment starts from the
|
|
// questionnaire, not from this profile.
|
|
// Ref: #/components/schemas/CandidateProfile
|
|
type CandidateProfile struct {
|
|
Version ProfileVersion `json:"version"`
|
|
FullName ProfileFullNameClaim `json:"full_name"`
|
|
Contacts ProfileContacts `json:"contacts"`
|
|
// Technology tags in the order the candidate gave them, each tag at most once without regard to letter
|
|
// case.
|
|
Stack []ProfileStackItem `json:"stack"`
|
|
// Roles in the order the candidate gave them, each specialization at most once.
|
|
Roles []ProfileRoleItem `json:"roles"`
|
|
// Work history entries in the order the candidate gave them.
|
|
Experience []ProfileExperienceItem `json:"experience"`
|
|
// Every pair of overlapping experience periods, with its confirmation status. The indices refer to
|
|
// this version's experience array.
|
|
ExperienceOverlaps []ProfileExperienceOverlap `json:"experience_overlaps"`
|
|
// Soft skills in the order the candidate gave them, each skill at most once without regard to letter
|
|
// case.
|
|
SoftSkills []ProfileSoftSkillItem `json:"soft_skills"`
|
|
Terms ProfileTerms `json:"terms"`
|
|
// Categories that assessment results confirmed, at most one per specialization, in catalog order.
|
|
// Read-only and empty until an assessment confirms a grade.
|
|
ConfirmedCategories []ProfileConfirmedCategory `json:"confirmed_categories"`
|
|
// Time of the last change, or null before the first save.
|
|
UpdatedAt NilTimestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *CandidateProfile) GetVersion() ProfileVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetFullName returns the value of FullName.
|
|
func (s *CandidateProfile) GetFullName() ProfileFullNameClaim {
|
|
return s.FullName
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *CandidateProfile) GetContacts() ProfileContacts {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetStack returns the value of Stack.
|
|
func (s *CandidateProfile) GetStack() []ProfileStackItem {
|
|
return s.Stack
|
|
}
|
|
|
|
// GetRoles returns the value of Roles.
|
|
func (s *CandidateProfile) GetRoles() []ProfileRoleItem {
|
|
return s.Roles
|
|
}
|
|
|
|
// GetExperience returns the value of Experience.
|
|
func (s *CandidateProfile) GetExperience() []ProfileExperienceItem {
|
|
return s.Experience
|
|
}
|
|
|
|
// GetExperienceOverlaps returns the value of ExperienceOverlaps.
|
|
func (s *CandidateProfile) GetExperienceOverlaps() []ProfileExperienceOverlap {
|
|
return s.ExperienceOverlaps
|
|
}
|
|
|
|
// GetSoftSkills returns the value of SoftSkills.
|
|
func (s *CandidateProfile) GetSoftSkills() []ProfileSoftSkillItem {
|
|
return s.SoftSkills
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *CandidateProfile) GetTerms() ProfileTerms {
|
|
return s.Terms
|
|
}
|
|
|
|
// GetConfirmedCategories returns the value of ConfirmedCategories.
|
|
func (s *CandidateProfile) GetConfirmedCategories() []ProfileConfirmedCategory {
|
|
return s.ConfirmedCategories
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *CandidateProfile) GetUpdatedAt() NilTimestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *CandidateProfile) SetVersion(val ProfileVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetFullName sets the value of FullName.
|
|
func (s *CandidateProfile) SetFullName(val ProfileFullNameClaim) {
|
|
s.FullName = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *CandidateProfile) SetContacts(val ProfileContacts) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetStack sets the value of Stack.
|
|
func (s *CandidateProfile) SetStack(val []ProfileStackItem) {
|
|
s.Stack = val
|
|
}
|
|
|
|
// SetRoles sets the value of Roles.
|
|
func (s *CandidateProfile) SetRoles(val []ProfileRoleItem) {
|
|
s.Roles = val
|
|
}
|
|
|
|
// SetExperience sets the value of Experience.
|
|
func (s *CandidateProfile) SetExperience(val []ProfileExperienceItem) {
|
|
s.Experience = val
|
|
}
|
|
|
|
// SetExperienceOverlaps sets the value of ExperienceOverlaps.
|
|
func (s *CandidateProfile) SetExperienceOverlaps(val []ProfileExperienceOverlap) {
|
|
s.ExperienceOverlaps = val
|
|
}
|
|
|
|
// SetSoftSkills sets the value of SoftSkills.
|
|
func (s *CandidateProfile) SetSoftSkills(val []ProfileSoftSkillItem) {
|
|
s.SoftSkills = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *CandidateProfile) SetTerms(val ProfileTerms) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// SetConfirmedCategories sets the value of ConfirmedCategories.
|
|
func (s *CandidateProfile) SetConfirmedCategories(val []ProfileConfirmedCategory) {
|
|
s.ConfirmedCategories = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *CandidateProfile) SetUpdatedAt(val NilTimestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// CandidateProfileHeaders wraps CandidateProfile with response headers.
|
|
type CandidateProfileHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CandidateProfile
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CandidateProfileHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CandidateProfileHeaders) GetResponse() CandidateProfile {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CandidateProfileHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CandidateProfileHeaders) SetResponse(val CandidateProfile) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CandidateProfileHeaders) getMyProfileRes() {}
|
|
func (*CandidateProfileHeaders) saveMyProfileRes() {}
|
|
|
|
// Complete new state of the candidate profile. It replaces every stored value as a whole: a single
|
|
// field sent as null is unknown and is removed, and a list replaces the stored list. The body is
|
|
// personal data. Each value carries a decision `status`. `confirmed` sets a manual value or confirms a
|
|
// stored suggestion; confirming a suggestion with exactly its stored value keeps its origin and quote,
|
|
// and any other value makes the claim manual. `extracted` keeps a stored suggestion unconfirmed and is
|
|
// accepted only with exactly the stored value; any other use answers 400 with the pointer of that
|
|
// status, for example `/stack/1/status`. The provenance, the trust level, and the confirmed categories
|
|
// are not part of the request, and unknown fields are rejected, so a request can neither mark a claim
|
|
// as verified nor write a confirmed grade or a category.
|
|
// Ref: #/components/schemas/CandidateProfileUpdate
|
|
type CandidateProfileUpdate struct {
|
|
ExpectedVersion ProfileVersion `json:"expected_version"`
|
|
FullName NilProfileFullNameInput `json:"full_name"`
|
|
Contacts ProfileContactsInput `json:"contacts"`
|
|
// Technology tags. The schema limits the count; the server also answers 400 with the pointer of a tag
|
|
// that repeats an earlier one without regard to letter case, for example `/stack/2/tag`.
|
|
Stack []ProfileStackItemInput `json:"stack"`
|
|
// Roles. The server answers 400 with the pointer of a role whose specialization repeats an earlier
|
|
// one, for example `/roles/1/specialization`.
|
|
Roles []ProfileRoleItemInput `json:"roles"`
|
|
// Work history entries.
|
|
Experience []ProfileExperienceItemInput `json:"experience"`
|
|
// Explicit acknowledgements for overlapping periods. Each pair must use distinct in-range indices and
|
|
// repeat the exact normalized started_on and ended_on values of those entries in this body. A changed
|
|
// or reordered period needs a new acknowledgement. The server retains a previous acknowledgement only
|
|
// for the same indices and dates. Duplicate pairs and pairs that do not overlap are rejected.
|
|
ConfirmedParallelPeriods []ProfileParallelPeriodConfirmation `json:"confirmed_parallel_periods"`
|
|
// Soft skills. The server answers 400 with the pointer of a skill that repeats an earlier one without
|
|
// regard to letter case.
|
|
SoftSkills []ProfileSoftSkillItemInput `json:"soft_skills"`
|
|
Terms ProfileTermsInput `json:"terms"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *CandidateProfileUpdate) GetExpectedVersion() ProfileVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetFullName returns the value of FullName.
|
|
func (s *CandidateProfileUpdate) GetFullName() NilProfileFullNameInput {
|
|
return s.FullName
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *CandidateProfileUpdate) GetContacts() ProfileContactsInput {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetStack returns the value of Stack.
|
|
func (s *CandidateProfileUpdate) GetStack() []ProfileStackItemInput {
|
|
return s.Stack
|
|
}
|
|
|
|
// GetRoles returns the value of Roles.
|
|
func (s *CandidateProfileUpdate) GetRoles() []ProfileRoleItemInput {
|
|
return s.Roles
|
|
}
|
|
|
|
// GetExperience returns the value of Experience.
|
|
func (s *CandidateProfileUpdate) GetExperience() []ProfileExperienceItemInput {
|
|
return s.Experience
|
|
}
|
|
|
|
// GetConfirmedParallelPeriods returns the value of ConfirmedParallelPeriods.
|
|
func (s *CandidateProfileUpdate) GetConfirmedParallelPeriods() []ProfileParallelPeriodConfirmation {
|
|
return s.ConfirmedParallelPeriods
|
|
}
|
|
|
|
// GetSoftSkills returns the value of SoftSkills.
|
|
func (s *CandidateProfileUpdate) GetSoftSkills() []ProfileSoftSkillItemInput {
|
|
return s.SoftSkills
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *CandidateProfileUpdate) GetTerms() ProfileTermsInput {
|
|
return s.Terms
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *CandidateProfileUpdate) SetExpectedVersion(val ProfileVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetFullName sets the value of FullName.
|
|
func (s *CandidateProfileUpdate) SetFullName(val NilProfileFullNameInput) {
|
|
s.FullName = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *CandidateProfileUpdate) SetContacts(val ProfileContactsInput) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetStack sets the value of Stack.
|
|
func (s *CandidateProfileUpdate) SetStack(val []ProfileStackItemInput) {
|
|
s.Stack = val
|
|
}
|
|
|
|
// SetRoles sets the value of Roles.
|
|
func (s *CandidateProfileUpdate) SetRoles(val []ProfileRoleItemInput) {
|
|
s.Roles = val
|
|
}
|
|
|
|
// SetExperience sets the value of Experience.
|
|
func (s *CandidateProfileUpdate) SetExperience(val []ProfileExperienceItemInput) {
|
|
s.Experience = val
|
|
}
|
|
|
|
// SetConfirmedParallelPeriods sets the value of ConfirmedParallelPeriods.
|
|
func (s *CandidateProfileUpdate) SetConfirmedParallelPeriods(val []ProfileParallelPeriodConfirmation) {
|
|
s.ConfirmedParallelPeriods = val
|
|
}
|
|
|
|
// SetSoftSkills sets the value of SoftSkills.
|
|
func (s *CandidateProfileUpdate) SetSoftSkills(val []ProfileSoftSkillItemInput) {
|
|
s.SoftSkills = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *CandidateProfileUpdate) SetTerms(val ProfileTermsInput) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// Questionnaire of the current candidate: the chosen specializations with self-assessed grades and the
|
|
// working context. It never contains a confirmed grade or a category; those come only from assessment
|
|
// results. A candidate who has not saved the questionnaire yet gets version 0, no specializations, and
|
|
// null `work_context` and `updated_at`.
|
|
// Ref: #/components/schemas/CandidateQuestionnaire
|
|
type CandidateQuestionnaire struct {
|
|
Version QuestionnaireVersion `json:"version"`
|
|
// Chosen specializations in the order the candidate gave them, each specialization at most once. Each
|
|
// one is assessed independently.
|
|
Specializations []QuestionnaireSpecialization `json:"specializations"`
|
|
// Working context, or null before the first save.
|
|
WorkContext NilWorkContext `json:"work_context"`
|
|
// Time of the last change, or null before the first save.
|
|
UpdatedAt NilTimestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *CandidateQuestionnaire) GetVersion() QuestionnaireVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetSpecializations returns the value of Specializations.
|
|
func (s *CandidateQuestionnaire) GetSpecializations() []QuestionnaireSpecialization {
|
|
return s.Specializations
|
|
}
|
|
|
|
// GetWorkContext returns the value of WorkContext.
|
|
func (s *CandidateQuestionnaire) GetWorkContext() NilWorkContext {
|
|
return s.WorkContext
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *CandidateQuestionnaire) GetUpdatedAt() NilTimestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *CandidateQuestionnaire) SetVersion(val QuestionnaireVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetSpecializations sets the value of Specializations.
|
|
func (s *CandidateQuestionnaire) SetSpecializations(val []QuestionnaireSpecialization) {
|
|
s.Specializations = val
|
|
}
|
|
|
|
// SetWorkContext sets the value of WorkContext.
|
|
func (s *CandidateQuestionnaire) SetWorkContext(val NilWorkContext) {
|
|
s.WorkContext = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *CandidateQuestionnaire) SetUpdatedAt(val NilTimestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// CandidateQuestionnaireHeaders wraps CandidateQuestionnaire with response headers.
|
|
type CandidateQuestionnaireHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CandidateQuestionnaire
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CandidateQuestionnaireHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CandidateQuestionnaireHeaders) GetResponse() CandidateQuestionnaire {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CandidateQuestionnaireHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CandidateQuestionnaireHeaders) SetResponse(val CandidateQuestionnaire) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CandidateQuestionnaireHeaders) getMyQuestionnaireRes() {}
|
|
func (*CandidateQuestionnaireHeaders) saveMyQuestionnaireRes() {}
|
|
|
|
// Complete new state of the questionnaire. It replaces the stored specializations and working context
|
|
// as a whole. Unknown fields are rejected, so a request cannot set a confirmed grade or a category.
|
|
// Ref: #/components/schemas/CandidateQuestionnaireUpdate
|
|
type CandidateQuestionnaireUpdate struct {
|
|
ExpectedVersion QuestionnaireVersion `json:"expected_version"`
|
|
// One or two chosen specializations. The schema limits the count; the server also requires each
|
|
// specialization to appear at most once and answers a repeated one with 400 validation_failed and the
|
|
// pointer of the repeated item's `specialization`, for example `/specializations/1/specialization`.
|
|
Specializations []QuestionnaireSpecialization `json:"specializations"`
|
|
WorkContext WorkContext `json:"work_context"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *CandidateQuestionnaireUpdate) GetExpectedVersion() QuestionnaireVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetSpecializations returns the value of Specializations.
|
|
func (s *CandidateQuestionnaireUpdate) GetSpecializations() []QuestionnaireSpecialization {
|
|
return s.Specializations
|
|
}
|
|
|
|
// GetWorkContext returns the value of WorkContext.
|
|
func (s *CandidateQuestionnaireUpdate) GetWorkContext() WorkContext {
|
|
return s.WorkContext
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *CandidateQuestionnaireUpdate) SetExpectedVersion(val QuestionnaireVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetSpecializations sets the value of Specializations.
|
|
func (s *CandidateQuestionnaireUpdate) SetSpecializations(val []QuestionnaireSpecialization) {
|
|
s.Specializations = val
|
|
}
|
|
|
|
// SetWorkContext sets the value of WorkContext.
|
|
func (s *CandidateQuestionnaireUpdate) SetWorkContext(val WorkContext) {
|
|
s.WorkContext = val
|
|
}
|
|
|
|
// One access of an organization to the card or the contacts of the current candidate. `organization`
|
|
// is null for a view by an organization that has no invitation relation with the candidate, so the
|
|
// history shows that the card was viewed without naming a company that the candidate cannot otherwise
|
|
// see; whether the candidate should learn the name is an open product question. The record carries no
|
|
// query, ranking, or search filter of the organization.
|
|
// Ref: #/components/schemas/CardAccess
|
|
type CardAccess struct {
|
|
// Identifier of the access record.
|
|
ID uuid.UUID `json:"id"`
|
|
Kind CardAccessKind `json:"kind"`
|
|
OccurredAt Timestamp `json:"occurred_at"`
|
|
Organization NilPrivacyOrganization `json:"organization"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *CardAccess) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *CardAccess) GetKind() CardAccessKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetOccurredAt returns the value of OccurredAt.
|
|
func (s *CardAccess) GetOccurredAt() Timestamp {
|
|
return s.OccurredAt
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *CardAccess) GetOrganization() NilPrivacyOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *CardAccess) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *CardAccess) SetKind(val CardAccessKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetOccurredAt sets the value of OccurredAt.
|
|
func (s *CardAccess) SetOccurredAt(val Timestamp) {
|
|
s.OccurredAt = val
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *CardAccess) SetOrganization(val NilPrivacyOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// How an organization reached the candidate.
|
|
//
|
|
// - card_viewed: an organization read the anonymous card in a search result.
|
|
// - contact_read: an organization read the contacts through the contact grant of an accepted
|
|
// invitation.
|
|
//
|
|
// Ref: #/components/schemas/CardAccessKind
|
|
type CardAccessKind string
|
|
|
|
const (
|
|
CardAccessKindCardViewed CardAccessKind = "card_viewed"
|
|
CardAccessKindContactRead CardAccessKind = "contact_read"
|
|
)
|
|
|
|
// AllValues returns all CardAccessKind values.
|
|
func (CardAccessKind) AllValues() []CardAccessKind {
|
|
return []CardAccessKind{
|
|
CardAccessKindCardViewed,
|
|
CardAccessKindContactRead,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s CardAccessKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case CardAccessKindCardViewed:
|
|
return []byte(s), nil
|
|
case CardAccessKindContactRead:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *CardAccessKind) UnmarshalText(data []byte) error {
|
|
switch CardAccessKind(data) {
|
|
case CardAccessKindCardViewed:
|
|
*s = CardAccessKindCardViewed
|
|
return nil
|
|
case CardAccessKindContactRead:
|
|
*s = CardAccessKindContactRead
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One page of the accesses to the card of the current candidate, newest first.
|
|
// Ref: #/components/schemas/CardAccessList
|
|
type CardAccessList struct {
|
|
// Accesses of the page.
|
|
Items []CardAccess `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *CardAccessList) GetItems() []CardAccess {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *CardAccessList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *CardAccessList) SetItems(val []CardAccess) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *CardAccessList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// CardAccessListHeaders wraps CardAccessList with response headers.
|
|
type CardAccessListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CardAccessList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CardAccessListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CardAccessListHeaders) GetResponse() CardAccessList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CardAccessListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CardAccessListHeaders) SetResponse(val CardAccessList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CardAccessListHeaders) listMyCardAccessHistoryRes() {}
|
|
|
|
// A category confirmed by assessment results, as the card shows it.
|
|
// Ref: #/components/schemas/CardCategory
|
|
type CardCategory struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
Grade GradeCode `json:"grade"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *CardCategory) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *CardCategory) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *CardCategory) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *CardCategory) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// A group of values of the anonymous candidate card that the candidate chooses to publish. The set is
|
|
// closed and has no value for the full name, a contact, or the lowest salary: the card never carries
|
|
// them, so no choice and no later contract change in this list can publish them by accident. Contacts
|
|
// leave only through the contact grant of an accepted invitation (C4), and the lowest salary never
|
|
// leaves.
|
|
//
|
|
// - categories: the categories confirmed by assessment results (specialization and confirmed grade).
|
|
// A self-assessed grade is not a category and is never published.
|
|
// - stack: the technology tags of the profile.
|
|
// - experience: the total months of work experience, without employers, periods, or descriptions.
|
|
// - soft_skills: the soft skills of the profile.
|
|
// - location: the city or region of the profile.
|
|
// - relocation: whether the candidate is ready to relocate.
|
|
//
|
|
// Only values that the candidate confirmed ever reach the card: an unconfirmed suggestion (status
|
|
// `extracted`) and an unknown value never do, whatever the field set says.
|
|
//
|
|
// Adding a value is a contract change that lets a candidate publish more, and it is also a migration
|
|
// (the function `candidate_card_fields_are_canonical` and the CHECK constraints of the publication and
|
|
// event tables list the codes). A client treats an unknown value as a reason to ask for an update, and
|
|
// the server never adds a new value to a published set on its own.
|
|
// Ref: #/components/schemas/CardField
|
|
type CardField string
|
|
|
|
const (
|
|
CardFieldCategories CardField = "categories"
|
|
CardFieldStack CardField = "stack"
|
|
CardFieldExperience CardField = "experience"
|
|
CardFieldSoftSkills CardField = "soft_skills"
|
|
CardFieldLocation CardField = "location"
|
|
CardFieldRelocation CardField = "relocation"
|
|
)
|
|
|
|
// AllValues returns all CardField values.
|
|
func (CardField) AllValues() []CardField {
|
|
return []CardField{
|
|
CardFieldCategories,
|
|
CardFieldStack,
|
|
CardFieldExperience,
|
|
CardFieldSoftSkills,
|
|
CardFieldLocation,
|
|
CardFieldRelocation,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s CardField) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case CardFieldCategories:
|
|
return []byte(s), nil
|
|
case CardFieldStack:
|
|
return []byte(s), nil
|
|
case CardFieldExperience:
|
|
return []byte(s), nil
|
|
case CardFieldSoftSkills:
|
|
return []byte(s), nil
|
|
case CardFieldLocation:
|
|
return []byte(s), nil
|
|
case CardFieldRelocation:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *CardField) UnmarshalText(data []byte) error {
|
|
switch CardField(data) {
|
|
case CardFieldCategories:
|
|
*s = CardFieldCategories
|
|
return nil
|
|
case CardFieldStack:
|
|
*s = CardFieldStack
|
|
return nil
|
|
case CardFieldExperience:
|
|
*s = CardFieldExperience
|
|
return nil
|
|
case CardFieldSoftSkills:
|
|
*s = CardFieldSoftSkills
|
|
return nil
|
|
case CardFieldLocation:
|
|
*s = CardFieldLocation
|
|
return nil
|
|
case CardFieldRelocation:
|
|
*s = CardFieldRelocation
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type CardFieldSet []CardField
|
|
|
|
// What an organization that the candidate does not hide the profile from would read now, computed from
|
|
// the current profile, the current publication, and the consent ledger. It is a read for the
|
|
// candidate: it creates no view and no history record, and it never reaches an organization. `card` is
|
|
// null while the profile is closed.
|
|
// Ref: #/components/schemas/CardPreview
|
|
type CardPreview struct {
|
|
State PublicationState `json:"state"`
|
|
Fields CardFieldSet `json:"fields"`
|
|
Card NilAnonymousCardContent `json:"card"`
|
|
GeneratedAt Timestamp `json:"generated_at"`
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *CardPreview) GetState() PublicationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *CardPreview) GetFields() CardFieldSet {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetCard returns the value of Card.
|
|
func (s *CardPreview) GetCard() NilAnonymousCardContent {
|
|
return s.Card
|
|
}
|
|
|
|
// GetGeneratedAt returns the value of GeneratedAt.
|
|
func (s *CardPreview) GetGeneratedAt() Timestamp {
|
|
return s.GeneratedAt
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *CardPreview) SetState(val PublicationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *CardPreview) SetFields(val CardFieldSet) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetCard sets the value of Card.
|
|
func (s *CardPreview) SetCard(val NilAnonymousCardContent) {
|
|
s.Card = val
|
|
}
|
|
|
|
// SetGeneratedAt sets the value of GeneratedAt.
|
|
func (s *CardPreview) SetGeneratedAt(val Timestamp) {
|
|
s.GeneratedAt = val
|
|
}
|
|
|
|
// CardPreviewHeaders wraps CardPreview with response headers.
|
|
type CardPreviewHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response CardPreview
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *CardPreviewHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *CardPreviewHeaders) GetResponse() CardPreview {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *CardPreviewHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *CardPreviewHeaders) SetResponse(val CardPreview) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*CardPreviewHeaders) getMyCardPreviewRes() {}
|
|
|
|
// Professional direction with its specializations. Each specialization belongs to exactly one
|
|
// direction.
|
|
// Ref: #/components/schemas/CatalogDirection
|
|
type CatalogDirection struct {
|
|
Code DirectionCode `json:"code"`
|
|
// Display name in Russian. Plain text.
|
|
Title string `json:"title"`
|
|
// Specializations of the direction in display order.
|
|
Specializations []CatalogSpecialization `json:"specializations"`
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *CatalogDirection) GetCode() DirectionCode {
|
|
return s.Code
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *CatalogDirection) GetTitle() string {
|
|
return s.Title
|
|
}
|
|
|
|
// GetSpecializations returns the value of Specializations.
|
|
func (s *CatalogDirection) GetSpecializations() []CatalogSpecialization {
|
|
return s.Specializations
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *CatalogDirection) SetCode(val DirectionCode) {
|
|
s.Code = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *CatalogDirection) SetTitle(val string) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetSpecializations sets the value of Specializations.
|
|
func (s *CatalogDirection) SetSpecializations(val []CatalogSpecialization) {
|
|
s.Specializations = val
|
|
}
|
|
|
|
// Grade of the scale with its display name.
|
|
// Ref: #/components/schemas/CatalogGrade
|
|
type CatalogGrade struct {
|
|
Code GradeCode `json:"code"`
|
|
// Display name in Russian. Plain text.
|
|
Title string `json:"title"`
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *CatalogGrade) GetCode() GradeCode {
|
|
return s.Code
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *CatalogGrade) GetTitle() string {
|
|
return s.Title
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *CatalogGrade) SetCode(val GradeCode) {
|
|
s.Code = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *CatalogGrade) SetTitle(val string) {
|
|
s.Title = val
|
|
}
|
|
|
|
// Specialization in the catalog with its assessment availability.
|
|
// Ref: #/components/schemas/CatalogSpecialization
|
|
type CatalogSpecialization struct {
|
|
Code SpecializationCode `json:"code"`
|
|
// Display name in Russian. Plain text.
|
|
Title string `json:"title"`
|
|
TestAvailability TestAvailability `json:"test_availability"`
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *CatalogSpecialization) GetCode() SpecializationCode {
|
|
return s.Code
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *CatalogSpecialization) GetTitle() string {
|
|
return s.Title
|
|
}
|
|
|
|
// GetTestAvailability returns the value of TestAvailability.
|
|
func (s *CatalogSpecialization) GetTestAvailability() TestAvailability {
|
|
return s.TestAvailability
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *CatalogSpecialization) SetCode(val SpecializationCode) {
|
|
s.Code = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *CatalogSpecialization) SetTitle(val string) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetTestAvailability sets the value of TestAvailability.
|
|
func (s *CatalogSpecialization) SetTestAvailability(val TestAvailability) {
|
|
s.TestAvailability = val
|
|
}
|
|
|
|
// Selected options of a choice item: exactly one unless the item allows several. Two answers are equal
|
|
// when they select the same set of options, in any order.
|
|
// Ref: #/components/schemas/ChoiceAnswer
|
|
type ChoiceAnswer struct {
|
|
Format ChoiceAnswerFormat `json:"format"`
|
|
OptionIds []AssessmentOptionId `json:"option_ids"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *ChoiceAnswer) GetFormat() ChoiceAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetOptionIds returns the value of OptionIds.
|
|
func (s *ChoiceAnswer) GetOptionIds() []AssessmentOptionId {
|
|
return s.OptionIds
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *ChoiceAnswer) SetFormat(val ChoiceAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetOptionIds sets the value of OptionIds.
|
|
func (s *ChoiceAnswer) SetOptionIds(val []AssessmentOptionId) {
|
|
s.OptionIds = val
|
|
}
|
|
|
|
type ChoiceAnswerFormat string
|
|
|
|
const (
|
|
ChoiceAnswerFormatChoice ChoiceAnswerFormat = "choice"
|
|
)
|
|
|
|
// AllValues returns all ChoiceAnswerFormat values.
|
|
func (ChoiceAnswerFormat) AllValues() []ChoiceAnswerFormat {
|
|
return []ChoiceAnswerFormat{
|
|
ChoiceAnswerFormatChoice,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ChoiceAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ChoiceAnswerFormatChoice:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ChoiceAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch ChoiceAnswerFormat(data) {
|
|
case ChoiceAnswerFormatChoice:
|
|
*s = ChoiceAnswerFormatChoice
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Choose one option, or several when `multiple` is true. The content never says which options are
|
|
// correct or how many are.
|
|
// Ref: #/components/schemas/ChoiceItemContent
|
|
type ChoiceItemContent struct {
|
|
Format ChoiceItemContentFormat `json:"format"`
|
|
// Options in the order of this instance.
|
|
Options []AssessmentOption `json:"options"`
|
|
// Whether more than one option may be selected. It is a property of the task family, fixed for every
|
|
// variant, and never derived from the key: a multiple-choice variant may have a single correct option.
|
|
Multiple bool `json:"multiple"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *ChoiceItemContent) GetFormat() ChoiceItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetOptions returns the value of Options.
|
|
func (s *ChoiceItemContent) GetOptions() []AssessmentOption {
|
|
return s.Options
|
|
}
|
|
|
|
// GetMultiple returns the value of Multiple.
|
|
func (s *ChoiceItemContent) GetMultiple() bool {
|
|
return s.Multiple
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *ChoiceItemContent) SetFormat(val ChoiceItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetOptions sets the value of Options.
|
|
func (s *ChoiceItemContent) SetOptions(val []AssessmentOption) {
|
|
s.Options = val
|
|
}
|
|
|
|
// SetMultiple sets the value of Multiple.
|
|
func (s *ChoiceItemContent) SetMultiple(val bool) {
|
|
s.Multiple = val
|
|
}
|
|
|
|
type ChoiceItemContentFormat string
|
|
|
|
const (
|
|
ChoiceItemContentFormatChoice ChoiceItemContentFormat = "choice"
|
|
)
|
|
|
|
// AllValues returns all ChoiceItemContentFormat values.
|
|
func (ChoiceItemContentFormat) AllValues() []ChoiceItemContentFormat {
|
|
return []ChoiceItemContentFormat{
|
|
ChoiceItemContentFormatChoice,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ChoiceItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ChoiceItemContentFormatChoice:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ChoiceItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch ChoiceItemContentFormat(data) {
|
|
case ChoiceItemContentFormatChoice:
|
|
*s = ChoiceItemContentFormatChoice
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One numbered line of a code or configuration fragment. Plain text.
|
|
// Ref: #/components/schemas/CodeLine
|
|
type CodeLine struct {
|
|
Number int32 `json:"number"`
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// GetNumber returns the value of Number.
|
|
func (s *CodeLine) GetNumber() int32 {
|
|
return s.Number
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *CodeLine) GetText() string {
|
|
return s.Text
|
|
}
|
|
|
|
// SetNumber sets the value of Number.
|
|
func (s *CodeLine) SetNumber(val int32) {
|
|
s.Number = val
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *CodeLine) SetText(val string) {
|
|
s.Text = val
|
|
}
|
|
|
|
// Submitted configuration text, at most the `max_length` of the item. Two answers are equal only when
|
|
// their texts are identical, including whitespace and line breaks.
|
|
// Ref: #/components/schemas/ConfigurationAnswer
|
|
type ConfigurationAnswer struct {
|
|
Format ConfigurationAnswerFormat `json:"format"`
|
|
Config string `json:"config"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *ConfigurationAnswer) GetFormat() ConfigurationAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetConfig returns the value of Config.
|
|
func (s *ConfigurationAnswer) GetConfig() string {
|
|
return s.Config
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *ConfigurationAnswer) SetFormat(val ConfigurationAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetConfig sets the value of Config.
|
|
func (s *ConfigurationAnswer) SetConfig(val string) {
|
|
s.Config = val
|
|
}
|
|
|
|
type ConfigurationAnswerFormat string
|
|
|
|
const (
|
|
ConfigurationAnswerFormatConfiguration ConfigurationAnswerFormat = "configuration"
|
|
)
|
|
|
|
// AllValues returns all ConfigurationAnswerFormat values.
|
|
func (ConfigurationAnswerFormat) AllValues() []ConfigurationAnswerFormat {
|
|
return []ConfigurationAnswerFormat{
|
|
ConfigurationAnswerFormatConfiguration,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConfigurationAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConfigurationAnswerFormatConfiguration:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConfigurationAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch ConfigurationAnswerFormat(data) {
|
|
case ConfigurationAnswerFormatConfiguration:
|
|
*s = ConfigurationAnswerFormatConfiguration
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Write or fix a configuration. The server checks the submitted text with the computed key or
|
|
// reference check of the task family; it never executes it as code.
|
|
// Ref: #/components/schemas/ConfigurationItemContent
|
|
type ConfigurationItemContent struct {
|
|
Format ConfigurationItemContentFormat `json:"format"`
|
|
// Configuration syntax such as `cisco_ios`, `nginx`, or `yaml`.
|
|
Syntax string `json:"syntax"`
|
|
// Starting text to edit; empty when the candidate writes it from scratch.
|
|
InitialConfig string `json:"initial_config"`
|
|
// Maximum length of the submitted configuration in characters, an input limit of the task family that
|
|
// is never derived from the key.
|
|
MaxLength int32 `json:"max_length"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *ConfigurationItemContent) GetFormat() ConfigurationItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetSyntax returns the value of Syntax.
|
|
func (s *ConfigurationItemContent) GetSyntax() string {
|
|
return s.Syntax
|
|
}
|
|
|
|
// GetInitialConfig returns the value of InitialConfig.
|
|
func (s *ConfigurationItemContent) GetInitialConfig() string {
|
|
return s.InitialConfig
|
|
}
|
|
|
|
// GetMaxLength returns the value of MaxLength.
|
|
func (s *ConfigurationItemContent) GetMaxLength() int32 {
|
|
return s.MaxLength
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *ConfigurationItemContent) SetFormat(val ConfigurationItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetSyntax sets the value of Syntax.
|
|
func (s *ConfigurationItemContent) SetSyntax(val string) {
|
|
s.Syntax = val
|
|
}
|
|
|
|
// SetInitialConfig sets the value of InitialConfig.
|
|
func (s *ConfigurationItemContent) SetInitialConfig(val string) {
|
|
s.InitialConfig = val
|
|
}
|
|
|
|
// SetMaxLength sets the value of MaxLength.
|
|
func (s *ConfigurationItemContent) SetMaxLength(val int32) {
|
|
s.MaxLength = val
|
|
}
|
|
|
|
type ConfigurationItemContentFormat string
|
|
|
|
const (
|
|
ConfigurationItemContentFormatConfiguration ConfigurationItemContentFormat = "configuration"
|
|
)
|
|
|
|
// AllValues returns all ConfigurationItemContentFormat values.
|
|
func (ConfigurationItemContentFormat) AllValues() []ConfigurationItemContentFormat {
|
|
return []ConfigurationItemContentFormat{
|
|
ConfigurationItemContentFormatConfiguration,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConfigurationItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConfigurationItemContentFormatConfiguration:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConfigurationItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch ConfigurationItemContentFormat(data) {
|
|
case ConfigurationItemContentFormatConfiguration:
|
|
*s = ConfigurationItemContentFormatConfiguration
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ConfirmEmailBadRequest Problem
|
|
|
|
func (*ConfirmEmailBadRequest) confirmEmailRes() {}
|
|
|
|
type ConfirmEmailForbidden Problem
|
|
|
|
func (*ConfirmEmailForbidden) confirmEmailRes() {}
|
|
|
|
// Durable request to delete the account and its personal data. The request is recorded before
|
|
// asynchronous processing starts; it does not mean deletion has completed.
|
|
// Ref: #/components/schemas/ConsentDeletionRequest
|
|
type ConsentDeletionRequest struct {
|
|
// Identifier of the durable deletion request.
|
|
ID uuid.UUID `json:"id"`
|
|
// Current state of the deletion request.
|
|
Status ConsentDeletionRequestStatus `json:"status"`
|
|
RequestedAt Timestamp `json:"requested_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *ConsentDeletionRequest) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ConsentDeletionRequest) GetStatus() ConsentDeletionRequestStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetRequestedAt returns the value of RequestedAt.
|
|
func (s *ConsentDeletionRequest) GetRequestedAt() Timestamp {
|
|
return s.RequestedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *ConsentDeletionRequest) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ConsentDeletionRequest) SetStatus(val ConsentDeletionRequestStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetRequestedAt sets the value of RequestedAt.
|
|
func (s *ConsentDeletionRequest) SetRequestedAt(val Timestamp) {
|
|
s.RequestedAt = val
|
|
}
|
|
|
|
// ConsentDeletionRequestHeaders wraps ConsentDeletionRequest with response headers.
|
|
type ConsentDeletionRequestHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response ConsentDeletionRequest
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *ConsentDeletionRequestHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ConsentDeletionRequestHeaders) GetResponse() ConsentDeletionRequest {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *ConsentDeletionRequestHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ConsentDeletionRequestHeaders) SetResponse(val ConsentDeletionRequest) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ConsentDeletionRequestHeaders) requestMyAccountDeletionRes() {}
|
|
|
|
// Current state of the deletion request.
|
|
type ConsentDeletionRequestStatus string
|
|
|
|
const (
|
|
ConsentDeletionRequestStatusRequested ConsentDeletionRequestStatus = "requested"
|
|
ConsentDeletionRequestStatusProcessing ConsentDeletionRequestStatus = "processing"
|
|
)
|
|
|
|
// AllValues returns all ConsentDeletionRequestStatus values.
|
|
func (ConsentDeletionRequestStatus) AllValues() []ConsentDeletionRequestStatus {
|
|
return []ConsentDeletionRequestStatus{
|
|
ConsentDeletionRequestStatusRequested,
|
|
ConsentDeletionRequestStatusProcessing,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentDeletionRequestStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentDeletionRequestStatusRequested:
|
|
return []byte(s), nil
|
|
case ConsentDeletionRequestStatusProcessing:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentDeletionRequestStatus) UnmarshalText(data []byte) error {
|
|
switch ConsentDeletionRequestStatus(data) {
|
|
case ConsentDeletionRequestStatusRequested:
|
|
*s = ConsentDeletionRequestStatusRequested
|
|
return nil
|
|
case ConsentDeletionRequestStatusProcessing:
|
|
*s = ConsentDeletionRequestStatusProcessing
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Organization of a c4 consent as the consent recorded it. `name` is a snapshot of the name that the
|
|
// shown consent text carried at the time of the consent, and the stored text hash proves that text
|
|
// with this name; a later rename of the organization does not change it, so it can differ from the
|
|
// current name.
|
|
// Ref: #/components/schemas/ConsentOrganization
|
|
type ConsentOrganization struct {
|
|
// Identifier of the organization.
|
|
ID uuid.UUID `json:"id"`
|
|
// Name of the organization in the consent text at the time of the consent. Plain text; clients show it
|
|
// as text, never as HTML.
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *ConsentOrganization) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *ConsentOrganization) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *ConsentOrganization) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *ConsentOrganization) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// Consent whose text the client may read before an account exists. Only the consents given at
|
|
// registration are listed: `c1` is the consent to the processing of personal data.
|
|
// Ref: #/components/schemas/ConsentPurpose
|
|
type ConsentPurpose string
|
|
|
|
const (
|
|
ConsentPurposeC1 ConsentPurpose = "c1"
|
|
)
|
|
|
|
// AllValues returns all ConsentPurpose values.
|
|
func (ConsentPurpose) AllValues() []ConsentPurpose {
|
|
return []ConsentPurpose{
|
|
ConsentPurposeC1,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentPurpose) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentPurposeC1:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentPurpose) UnmarshalText(data []byte) error {
|
|
switch ConsentPurpose(data) {
|
|
case ConsentPurposeC1:
|
|
*s = ConsentPurposeC1
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One of the independent consents of PRD FR01. A grant or a revocation of one purpose never changes
|
|
// another.
|
|
//
|
|
// - c1: processing of personal data, given at registration.
|
|
// - c2: publication of the candidate card. The record proves the consent to the published text; which
|
|
// fields were published and when is evidence of the publication history, not of this record. Adding
|
|
// a field scope to c2 records later is an additive change.
|
|
// - c3: automatic categorization. Without it the candidate can request a manual assessment by the
|
|
// same rubric.
|
|
// - c4: transfer of the selected contact data to one organization, currently given only in an
|
|
// invitation acceptance.
|
|
// - c5: import of FSP results.
|
|
//
|
|
// ConsentPurpose lists the subset whose text the client may read before an account exists.
|
|
// Ref: #/components/schemas/ConsentPurposeCode
|
|
type ConsentPurposeCode string
|
|
|
|
const (
|
|
ConsentPurposeCodeC1 ConsentPurposeCode = "c1"
|
|
ConsentPurposeCodeC2 ConsentPurposeCode = "c2"
|
|
ConsentPurposeCodeC3 ConsentPurposeCode = "c3"
|
|
ConsentPurposeCodeC4 ConsentPurposeCode = "c4"
|
|
ConsentPurposeCodeC5 ConsentPurposeCode = "c5"
|
|
)
|
|
|
|
// AllValues returns all ConsentPurposeCode values.
|
|
func (ConsentPurposeCode) AllValues() []ConsentPurposeCode {
|
|
return []ConsentPurposeCode{
|
|
ConsentPurposeCodeC1,
|
|
ConsentPurposeCodeC2,
|
|
ConsentPurposeCodeC3,
|
|
ConsentPurposeCodeC4,
|
|
ConsentPurposeCodeC5,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentPurposeCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentPurposeCodeC1:
|
|
return []byte(s), nil
|
|
case ConsentPurposeCodeC2:
|
|
return []byte(s), nil
|
|
case ConsentPurposeCodeC3:
|
|
return []byte(s), nil
|
|
case ConsentPurposeCodeC4:
|
|
return []byte(s), nil
|
|
case ConsentPurposeCodeC5:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentPurposeCode) UnmarshalText(data []byte) error {
|
|
switch ConsentPurposeCode(data) {
|
|
case ConsentPurposeCodeC1:
|
|
*s = ConsentPurposeCodeC1
|
|
return nil
|
|
case ConsentPurposeCodeC2:
|
|
*s = ConsentPurposeCodeC2
|
|
return nil
|
|
case ConsentPurposeCodeC3:
|
|
*s = ConsentPurposeCodeC3
|
|
return nil
|
|
case ConsentPurposeCodeC4:
|
|
*s = ConsentPurposeCodeC4
|
|
return nil
|
|
case ConsentPurposeCodeC5:
|
|
*s = ConsentPurposeCodeC5
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One record of the consent ledger as its subject reads it: the purpose, the text version the subject
|
|
// accepted, where and when the consent was given, its state, and the revocation. A c4 record also
|
|
// names the organization, the contact fields, and the invitation with its terms version; these fields
|
|
// are null for every other purpose. The server also stores the SHA-256 hash of exactly the text the
|
|
// subject saw, which a client never sends or receives.
|
|
// Ref: #/components/schemas/ConsentRecord
|
|
type ConsentRecord struct {
|
|
// Identifier of the record.
|
|
ID uuid.UUID `json:"id"`
|
|
Purpose ConsentPurposeCode `json:"purpose"`
|
|
State ConsentState `json:"state"`
|
|
// Version of the consent text that the subject accepted.
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
Source ConsentSource `json:"source"`
|
|
GrantedAt Timestamp `json:"granted_at"`
|
|
// Moment of the revocation, or null unless `state` is `revoked`.
|
|
RevokedAt NilTimestamp `json:"revoked_at"`
|
|
// Who recorded the revocation, or null unless `state` is `revoked`.
|
|
RevocationSource NilConsentRevocationSource `json:"revocation_source"`
|
|
// Organization that a c4 consent allows to read the fields, with the name the consent text showed, or
|
|
// null for every other purpose.
|
|
Organization NilConsentOrganization `json:"organization"`
|
|
// Contact fields that a c4 consent covers, or null for every other purpose. One kind never implies
|
|
// another.
|
|
Fields []ContactFieldKind `json:"fields"`
|
|
// Invitation whose acceptance gave a c4 consent, or null for every other purpose.
|
|
InvitationID NilUUID `json:"invitation_id"`
|
|
// Terms version that the acceptance accepted, or null for every other purpose.
|
|
InvitationTermsVersion NilInvitationTermsVersion `json:"invitation_terms_version"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *ConsentRecord) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetPurpose returns the value of Purpose.
|
|
func (s *ConsentRecord) GetPurpose() ConsentPurposeCode {
|
|
return s.Purpose
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *ConsentRecord) GetState() ConsentState {
|
|
return s.State
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *ConsentRecord) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ConsentRecord) GetSource() ConsentSource {
|
|
return s.Source
|
|
}
|
|
|
|
// GetGrantedAt returns the value of GrantedAt.
|
|
func (s *ConsentRecord) GetGrantedAt() Timestamp {
|
|
return s.GrantedAt
|
|
}
|
|
|
|
// GetRevokedAt returns the value of RevokedAt.
|
|
func (s *ConsentRecord) GetRevokedAt() NilTimestamp {
|
|
return s.RevokedAt
|
|
}
|
|
|
|
// GetRevocationSource returns the value of RevocationSource.
|
|
func (s *ConsentRecord) GetRevocationSource() NilConsentRevocationSource {
|
|
return s.RevocationSource
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *ConsentRecord) GetOrganization() NilConsentOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *ConsentRecord) GetFields() []ContactFieldKind {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetInvitationID returns the value of InvitationID.
|
|
func (s *ConsentRecord) GetInvitationID() NilUUID {
|
|
return s.InvitationID
|
|
}
|
|
|
|
// GetInvitationTermsVersion returns the value of InvitationTermsVersion.
|
|
func (s *ConsentRecord) GetInvitationTermsVersion() NilInvitationTermsVersion {
|
|
return s.InvitationTermsVersion
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *ConsentRecord) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetPurpose sets the value of Purpose.
|
|
func (s *ConsentRecord) SetPurpose(val ConsentPurposeCode) {
|
|
s.Purpose = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *ConsentRecord) SetState(val ConsentState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *ConsentRecord) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ConsentRecord) SetSource(val ConsentSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// SetGrantedAt sets the value of GrantedAt.
|
|
func (s *ConsentRecord) SetGrantedAt(val Timestamp) {
|
|
s.GrantedAt = val
|
|
}
|
|
|
|
// SetRevokedAt sets the value of RevokedAt.
|
|
func (s *ConsentRecord) SetRevokedAt(val NilTimestamp) {
|
|
s.RevokedAt = val
|
|
}
|
|
|
|
// SetRevocationSource sets the value of RevocationSource.
|
|
func (s *ConsentRecord) SetRevocationSource(val NilConsentRevocationSource) {
|
|
s.RevocationSource = val
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *ConsentRecord) SetOrganization(val NilConsentOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *ConsentRecord) SetFields(val []ContactFieldKind) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetInvitationID sets the value of InvitationID.
|
|
func (s *ConsentRecord) SetInvitationID(val NilUUID) {
|
|
s.InvitationID = val
|
|
}
|
|
|
|
// SetInvitationTermsVersion sets the value of InvitationTermsVersion.
|
|
func (s *ConsentRecord) SetInvitationTermsVersion(val NilInvitationTermsVersion) {
|
|
s.InvitationTermsVersion = val
|
|
}
|
|
|
|
// ConsentRecordHeaders wraps ConsentRecord with response headers.
|
|
type ConsentRecordHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response ConsentRecord
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *ConsentRecordHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ConsentRecordHeaders) GetResponse() ConsentRecord {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *ConsentRecordHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ConsentRecordHeaders) SetResponse(val ConsentRecord) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ConsentRecordHeaders) grantMyConsentRes() {}
|
|
|
|
// One page of the consent ledger of the current account, newest grant first.
|
|
// Ref: #/components/schemas/ConsentRecordList
|
|
type ConsentRecordList struct {
|
|
// Records of the page.
|
|
Items []ConsentRecord `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *ConsentRecordList) GetItems() []ConsentRecord {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *ConsentRecordList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *ConsentRecordList) SetItems(val []ConsentRecord) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *ConsentRecordList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// ConsentRecordListHeaders wraps ConsentRecordList with response headers.
|
|
type ConsentRecordListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response ConsentRecordList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *ConsentRecordListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ConsentRecordListHeaders) GetResponse() ConsentRecordList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *ConsentRecordListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ConsentRecordListHeaders) SetResponse(val ConsentRecordList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ConsentRecordListHeaders) listMyConsentsRes() {}
|
|
|
|
// Who recorded a revocation.
|
|
//
|
|
// - consent_settings: the subject revoked the consent in the product.
|
|
// - support_request: an operator recorded a revocation that the subject requested through support.
|
|
//
|
|
// Ref: #/components/schemas/ConsentRevocationSource
|
|
type ConsentRevocationSource string
|
|
|
|
const (
|
|
ConsentRevocationSourceConsentSettings ConsentRevocationSource = "consent_settings"
|
|
ConsentRevocationSourceSupportRequest ConsentRevocationSource = "support_request"
|
|
)
|
|
|
|
// AllValues returns all ConsentRevocationSource values.
|
|
func (ConsentRevocationSource) AllValues() []ConsentRevocationSource {
|
|
return []ConsentRevocationSource{
|
|
ConsentRevocationSourceConsentSettings,
|
|
ConsentRevocationSourceSupportRequest,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentRevocationSource) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentRevocationSourceConsentSettings:
|
|
return []byte(s), nil
|
|
case ConsentRevocationSourceSupportRequest:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentRevocationSource) UnmarshalText(data []byte) error {
|
|
switch ConsentRevocationSource(data) {
|
|
case ConsentRevocationSourceConsentSettings:
|
|
*s = ConsentRevocationSourceConsentSettings
|
|
return nil
|
|
case ConsentRevocationSourceSupportRequest:
|
|
*s = ConsentRevocationSourceSupportRequest
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Accept the current published text shown by GetMyConsentText. The server checks its version again
|
|
// before recording the grant.
|
|
// Ref: #/components/schemas/ConsentSettingsGrantRequest
|
|
type ConsentSettingsGrantRequest struct {
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
// Must be true to record an explicit acceptance.
|
|
Accepted ConsentSettingsGrantRequestAccepted `json:"accepted"`
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *ConsentSettingsGrantRequest) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetAccepted returns the value of Accepted.
|
|
func (s *ConsentSettingsGrantRequest) GetAccepted() ConsentSettingsGrantRequestAccepted {
|
|
return s.Accepted
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *ConsentSettingsGrantRequest) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetAccepted sets the value of Accepted.
|
|
func (s *ConsentSettingsGrantRequest) SetAccepted(val ConsentSettingsGrantRequestAccepted) {
|
|
s.Accepted = val
|
|
}
|
|
|
|
// Must be true to record an explicit acceptance.
|
|
type ConsentSettingsGrantRequestAccepted bool
|
|
|
|
const (
|
|
ConsentSettingsGrantRequestAcceptedTrue ConsentSettingsGrantRequestAccepted = true
|
|
)
|
|
|
|
// AllValues returns all ConsentSettingsGrantRequestAccepted values.
|
|
func (ConsentSettingsGrantRequestAccepted) AllValues() []ConsentSettingsGrantRequestAccepted {
|
|
return []ConsentSettingsGrantRequestAccepted{
|
|
ConsentSettingsGrantRequestAcceptedTrue,
|
|
}
|
|
}
|
|
|
|
// Consent text that an authenticated account can read and accept in settings. C4 is scoped to an
|
|
// invitation and organization, so it is not available through the general settings flow.
|
|
// Ref: #/components/schemas/ConsentSettingsPurpose
|
|
type ConsentSettingsPurpose string
|
|
|
|
const (
|
|
ConsentSettingsPurposeC1 ConsentSettingsPurpose = "c1"
|
|
ConsentSettingsPurposeC2 ConsentSettingsPurpose = "c2"
|
|
ConsentSettingsPurposeC3 ConsentSettingsPurpose = "c3"
|
|
ConsentSettingsPurposeC5 ConsentSettingsPurpose = "c5"
|
|
)
|
|
|
|
// AllValues returns all ConsentSettingsPurpose values.
|
|
func (ConsentSettingsPurpose) AllValues() []ConsentSettingsPurpose {
|
|
return []ConsentSettingsPurpose{
|
|
ConsentSettingsPurposeC1,
|
|
ConsentSettingsPurposeC2,
|
|
ConsentSettingsPurposeC3,
|
|
ConsentSettingsPurposeC5,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentSettingsPurpose) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentSettingsPurposeC1:
|
|
return []byte(s), nil
|
|
case ConsentSettingsPurposeC2:
|
|
return []byte(s), nil
|
|
case ConsentSettingsPurposeC3:
|
|
return []byte(s), nil
|
|
case ConsentSettingsPurposeC5:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentSettingsPurpose) UnmarshalText(data []byte) error {
|
|
switch ConsentSettingsPurpose(data) {
|
|
case ConsentSettingsPurposeC1:
|
|
*s = ConsentSettingsPurposeC1
|
|
return nil
|
|
case ConsentSettingsPurposeC2:
|
|
*s = ConsentSettingsPurposeC2
|
|
return nil
|
|
case ConsentSettingsPurposeC3:
|
|
*s = ConsentSettingsPurposeC3
|
|
return nil
|
|
case ConsentSettingsPurposeC5:
|
|
*s = ConsentSettingsPurposeC5
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Consent that can be revoked through the general settings flow. C1 uses the account deletion request,
|
|
// and C4 must be revoked for one organization.
|
|
// Ref: #/components/schemas/ConsentSettingsRevokePurpose
|
|
type ConsentSettingsRevokePurpose string
|
|
|
|
const (
|
|
ConsentSettingsRevokePurposeC2 ConsentSettingsRevokePurpose = "c2"
|
|
ConsentSettingsRevokePurposeC3 ConsentSettingsRevokePurpose = "c3"
|
|
ConsentSettingsRevokePurposeC5 ConsentSettingsRevokePurpose = "c5"
|
|
)
|
|
|
|
// AllValues returns all ConsentSettingsRevokePurpose values.
|
|
func (ConsentSettingsRevokePurpose) AllValues() []ConsentSettingsRevokePurpose {
|
|
return []ConsentSettingsRevokePurpose{
|
|
ConsentSettingsRevokePurposeC2,
|
|
ConsentSettingsRevokePurposeC3,
|
|
ConsentSettingsRevokePurposeC5,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentSettingsRevokePurpose) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentSettingsRevokePurposeC2:
|
|
return []byte(s), nil
|
|
case ConsentSettingsRevokePurposeC3:
|
|
return []byte(s), nil
|
|
case ConsentSettingsRevokePurposeC5:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentSettingsRevokePurpose) UnmarshalText(data []byte) error {
|
|
switch ConsentSettingsRevokePurpose(data) {
|
|
case ConsentSettingsRevokePurposeC2:
|
|
*s = ConsentSettingsRevokePurposeC2
|
|
return nil
|
|
case ConsentSettingsRevokePurposeC3:
|
|
*s = ConsentSettingsRevokePurposeC3
|
|
return nil
|
|
case ConsentSettingsRevokePurposeC5:
|
|
*s = ConsentSettingsRevokePurposeC5
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Where the subject gave the consent.
|
|
//
|
|
// - registration: the c1 acceptance of RegisterAccount.
|
|
// - consent_settings: the consent settings of the account, for c1, c2, c3, and c5 (planned).
|
|
// - invitation_acceptance: the c4 acceptance of AcceptMyInvitation.
|
|
//
|
|
// A c4 given when sending an application (PRD Q9) is planned as an additional value.
|
|
// Ref: #/components/schemas/ConsentSource
|
|
type ConsentSource string
|
|
|
|
const (
|
|
ConsentSourceRegistration ConsentSource = "registration"
|
|
ConsentSourceConsentSettings ConsentSource = "consent_settings"
|
|
ConsentSourceInvitationAcceptance ConsentSource = "invitation_acceptance"
|
|
)
|
|
|
|
// AllValues returns all ConsentSource values.
|
|
func (ConsentSource) AllValues() []ConsentSource {
|
|
return []ConsentSource{
|
|
ConsentSourceRegistration,
|
|
ConsentSourceConsentSettings,
|
|
ConsentSourceInvitationAcceptance,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentSource) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentSourceRegistration:
|
|
return []byte(s), nil
|
|
case ConsentSourceConsentSettings:
|
|
return []byte(s), nil
|
|
case ConsentSourceInvitationAcceptance:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentSource) UnmarshalText(data []byte) error {
|
|
switch ConsentSource(data) {
|
|
case ConsentSourceRegistration:
|
|
*s = ConsentSourceRegistration
|
|
return nil
|
|
case ConsentSourceConsentSettings:
|
|
*s = ConsentSourceConsentSettings
|
|
return nil
|
|
case ConsentSourceInvitationAcceptance:
|
|
*s = ConsentSourceInvitationAcceptance
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// State of a consent record, computed from the ledger.
|
|
//
|
|
// - active: the consent holds. For c1, c2, c3, and c5 it is the newest unrevoked record of its
|
|
// purpose; every unrevoked c4 record is active, one per accepted invitation.
|
|
// - superseded: the subject later accepted another text version of the same purpose and has not
|
|
// revoked either. The record stays as evidence for its own time; it never applies to c4.
|
|
// - revoked: the consent was revoked. The record keeps its grant and its one revocation time; a later
|
|
// grant is a new record and never reopens it.
|
|
//
|
|
// Ref: #/components/schemas/ConsentState
|
|
type ConsentState string
|
|
|
|
const (
|
|
ConsentStateActive ConsentState = "active"
|
|
ConsentStateSuperseded ConsentState = "superseded"
|
|
ConsentStateRevoked ConsentState = "revoked"
|
|
)
|
|
|
|
// AllValues returns all ConsentState values.
|
|
func (ConsentState) AllValues() []ConsentState {
|
|
return []ConsentState{
|
|
ConsentStateActive,
|
|
ConsentStateSuperseded,
|
|
ConsentStateRevoked,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ConsentState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ConsentStateActive:
|
|
return []byte(s), nil
|
|
case ConsentStateSuperseded:
|
|
return []byte(s), nil
|
|
case ConsentStateRevoked:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ConsentState) UnmarshalText(data []byte) error {
|
|
switch ConsentState(data) {
|
|
case ConsentStateActive:
|
|
*s = ConsentStateActive
|
|
return nil
|
|
case ConsentStateSuperseded:
|
|
*s = ConsentStateSuperseded
|
|
return nil
|
|
case ConsentStateRevoked:
|
|
*s = ConsentStateRevoked
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Currently published consent text. The server stores an acceptance with `text_version` and the hash
|
|
// of exactly this text.
|
|
// Ref: #/components/schemas/ConsentText
|
|
type ConsentText struct {
|
|
Purpose ConsentPurposeCode `json:"purpose"`
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
// Full consent text in plain UTF-8; paragraphs are separated by an empty line. The client shows it as
|
|
// text, never as HTML.
|
|
Text string `json:"text"`
|
|
PublishedAt Timestamp `json:"published_at"`
|
|
}
|
|
|
|
// GetPurpose returns the value of Purpose.
|
|
func (s *ConsentText) GetPurpose() ConsentPurposeCode {
|
|
return s.Purpose
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *ConsentText) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *ConsentText) GetText() string {
|
|
return s.Text
|
|
}
|
|
|
|
// GetPublishedAt returns the value of PublishedAt.
|
|
func (s *ConsentText) GetPublishedAt() Timestamp {
|
|
return s.PublishedAt
|
|
}
|
|
|
|
// SetPurpose sets the value of Purpose.
|
|
func (s *ConsentText) SetPurpose(val ConsentPurposeCode) {
|
|
s.Purpose = val
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *ConsentText) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *ConsentText) SetText(val string) {
|
|
s.Text = val
|
|
}
|
|
|
|
// SetPublishedAt sets the value of PublishedAt.
|
|
func (s *ConsentText) SetPublishedAt(val Timestamp) {
|
|
s.PublishedAt = val
|
|
}
|
|
|
|
func (*ConsentText) getConsentTextRes() {}
|
|
|
|
// ConsentTextHeaders wraps ConsentText with response headers.
|
|
type ConsentTextHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response ConsentText
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *ConsentTextHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ConsentTextHeaders) GetResponse() ConsentText {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *ConsentTextHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ConsentTextHeaders) SetResponse(val ConsentText) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ConsentTextHeaders) getMyConsentTextRes() {}
|
|
|
|
type ConsentTextVersion string
|
|
|
|
// Why an active grant does not allow a read now, shown only to the candidate.
|
|
//
|
|
// - visibility: the profile was not published (C2) or was hidden from the organization when the
|
|
// candidate accepted, and it still is. The acceptance never publishes the profile or lifts the
|
|
// hiding by itself (PRD FR12); the grant becomes readable once the candidate publishes the profile
|
|
// or unhides it for the organization.
|
|
//
|
|
// Ref: #/components/schemas/ContactAccessBlock
|
|
type ContactAccessBlock string
|
|
|
|
const (
|
|
ContactAccessBlockVisibility ContactAccessBlock = "visibility"
|
|
)
|
|
|
|
// AllValues returns all ContactAccessBlock values.
|
|
func (ContactAccessBlock) AllValues() []ContactAccessBlock {
|
|
return []ContactAccessBlock{
|
|
ContactAccessBlockVisibility,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ContactAccessBlock) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ContactAccessBlockVisibility:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ContactAccessBlock) UnmarshalText(data []byte) error {
|
|
switch ContactAccessBlock(data) {
|
|
case ContactAccessBlockVisibility:
|
|
*s = ContactAccessBlockVisibility
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Consent C4 given in an acceptance: the text version the candidate saw, an explicit `accepted`, and
|
|
// the contact fields the candidate selected. At least one field is required, so a hidden default or an
|
|
// empty choice never creates a grant. A text version that is not the currently published one answers
|
|
// 400 validation_failed with the pointer `/consent_c4/text_version`, and a field that the profile does
|
|
// not hold answers 400 with the pointer of that item, such as `/consent_c4/fields/1`. C4 is given only
|
|
// here, never at registration. The permission to pass the selected data on to the organization's ATS
|
|
// (PRD C4 and FR19) is planned as an additive optional flag that defaults to no transfer.
|
|
// Ref: #/components/schemas/ContactConsentAcceptance
|
|
type ContactConsentAcceptance struct {
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
// Explicit consent. Only true is valid.
|
|
Accepted ContactConsentAcceptanceAccepted `json:"accepted"`
|
|
// Contact fields the organization may read after the acceptance. The grant covers exactly these fields
|
|
// and no other.
|
|
Fields []ContactFieldKind `json:"fields"`
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *ContactConsentAcceptance) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetAccepted returns the value of Accepted.
|
|
func (s *ContactConsentAcceptance) GetAccepted() ContactConsentAcceptanceAccepted {
|
|
return s.Accepted
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *ContactConsentAcceptance) GetFields() []ContactFieldKind {
|
|
return s.Fields
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *ContactConsentAcceptance) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetAccepted sets the value of Accepted.
|
|
func (s *ContactConsentAcceptance) SetAccepted(val ContactConsentAcceptanceAccepted) {
|
|
s.Accepted = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *ContactConsentAcceptance) SetFields(val []ContactFieldKind) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// Explicit consent. Only true is valid.
|
|
type ContactConsentAcceptanceAccepted bool
|
|
|
|
const (
|
|
ContactConsentAcceptanceAcceptedTrue ContactConsentAcceptanceAccepted = true
|
|
)
|
|
|
|
// AllValues returns all ContactConsentAcceptanceAccepted values.
|
|
func (ContactConsentAcceptanceAccepted) AllValues() []ContactConsentAcceptanceAccepted {
|
|
return []ContactConsentAcceptanceAccepted{
|
|
ContactConsentAcceptanceAcceptedTrue,
|
|
}
|
|
}
|
|
|
|
// What the candidate can consent to in an acceptance: the consent text and the kinds of contact that
|
|
// the candidate's profile holds now. It holds kinds only, never contact values, and nothing is
|
|
// preselected.
|
|
// Ref: #/components/schemas/ContactConsentOffer
|
|
type ContactConsentOffer struct {
|
|
Text ContactConsentText `json:"text"`
|
|
// Kinds of contact that the profile holds and that an acceptance may select. A kind outside this list
|
|
// answers 400 in an acceptance.
|
|
AvailableFields []ContactFieldKind `json:"available_fields"`
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *ContactConsentOffer) GetText() ContactConsentText {
|
|
return s.Text
|
|
}
|
|
|
|
// GetAvailableFields returns the value of AvailableFields.
|
|
func (s *ContactConsentOffer) GetAvailableFields() []ContactFieldKind {
|
|
return s.AvailableFields
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *ContactConsentOffer) SetText(val ContactConsentText) {
|
|
s.Text = val
|
|
}
|
|
|
|
// SetAvailableFields sets the value of AvailableFields.
|
|
func (s *ContactConsentOffer) SetAvailableFields(val []ContactFieldKind) {
|
|
s.AvailableFields = val
|
|
}
|
|
|
|
// Currently published text of the consent C4 for this invitation. The server stores an acceptance with
|
|
// `text_version` and the hash of exactly this text, together with the organization, the selected
|
|
// fields, the invitation, and its terms version (the consent ledger).
|
|
// Ref: #/components/schemas/ContactConsentText
|
|
type ContactConsentText struct {
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
// Full consent text in plain UTF-8 with the name of the organization; paragraphs are separated by an
|
|
// empty line. The client shows it as text, never as HTML, next to the field choice.
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *ContactConsentText) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *ContactConsentText) GetText() string {
|
|
return s.Text
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *ContactConsentText) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *ContactConsentText) SetText(val string) {
|
|
s.Text = val
|
|
}
|
|
|
|
// Contacts of the candidate that the organization may read through an active grant of this invitation.
|
|
// This is the only response that carries contact values, and it is separate from the terms and from
|
|
// the invitation. Each field the grant does not cover is null, and so is a covered field that the
|
|
// profile no longer holds. The response is never cached or stored by the server for later reads, so a
|
|
// revocation closes the next read at once. The value formats depend on the profile contract (FR02),
|
|
// which must store the same formats; see ContactFieldKind.
|
|
// Ref: #/components/schemas/ContactDisclosure
|
|
type ContactDisclosure struct {
|
|
// Invitation whose acceptance created the grant.
|
|
InvitationID uuid.UUID `json:"invitation_id"`
|
|
// Grant that allows the read.
|
|
GrantID uuid.UUID `json:"grant_id"`
|
|
// Contact fields that the grant covers.
|
|
Fields []ContactFieldKind `json:"fields"`
|
|
GrantedAt Timestamp `json:"granted_at"`
|
|
FullName NilContactFullName `json:"full_name"`
|
|
Email NilEmailAddress `json:"email"`
|
|
Phone NilContactPhoneNumber `json:"phone"`
|
|
Telegram NilContactTelegramUsername `json:"telegram"`
|
|
}
|
|
|
|
// GetInvitationID returns the value of InvitationID.
|
|
func (s *ContactDisclosure) GetInvitationID() uuid.UUID {
|
|
return s.InvitationID
|
|
}
|
|
|
|
// GetGrantID returns the value of GrantID.
|
|
func (s *ContactDisclosure) GetGrantID() uuid.UUID {
|
|
return s.GrantID
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *ContactDisclosure) GetFields() []ContactFieldKind {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetGrantedAt returns the value of GrantedAt.
|
|
func (s *ContactDisclosure) GetGrantedAt() Timestamp {
|
|
return s.GrantedAt
|
|
}
|
|
|
|
// GetFullName returns the value of FullName.
|
|
func (s *ContactDisclosure) GetFullName() NilContactFullName {
|
|
return s.FullName
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *ContactDisclosure) GetEmail() NilEmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPhone returns the value of Phone.
|
|
func (s *ContactDisclosure) GetPhone() NilContactPhoneNumber {
|
|
return s.Phone
|
|
}
|
|
|
|
// GetTelegram returns the value of Telegram.
|
|
func (s *ContactDisclosure) GetTelegram() NilContactTelegramUsername {
|
|
return s.Telegram
|
|
}
|
|
|
|
// SetInvitationID sets the value of InvitationID.
|
|
func (s *ContactDisclosure) SetInvitationID(val uuid.UUID) {
|
|
s.InvitationID = val
|
|
}
|
|
|
|
// SetGrantID sets the value of GrantID.
|
|
func (s *ContactDisclosure) SetGrantID(val uuid.UUID) {
|
|
s.GrantID = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *ContactDisclosure) SetFields(val []ContactFieldKind) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetGrantedAt sets the value of GrantedAt.
|
|
func (s *ContactDisclosure) SetGrantedAt(val Timestamp) {
|
|
s.GrantedAt = val
|
|
}
|
|
|
|
// SetFullName sets the value of FullName.
|
|
func (s *ContactDisclosure) SetFullName(val NilContactFullName) {
|
|
s.FullName = val
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *ContactDisclosure) SetEmail(val NilEmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPhone sets the value of Phone.
|
|
func (s *ContactDisclosure) SetPhone(val NilContactPhoneNumber) {
|
|
s.Phone = val
|
|
}
|
|
|
|
// SetTelegram sets the value of Telegram.
|
|
func (s *ContactDisclosure) SetTelegram(val NilContactTelegramUsername) {
|
|
s.Telegram = val
|
|
}
|
|
|
|
// ContactDisclosureHeaders wraps ContactDisclosure with response headers.
|
|
type ContactDisclosureHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response ContactDisclosure
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *ContactDisclosureHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ContactDisclosureHeaders) GetResponse() ContactDisclosure {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *ContactDisclosureHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ContactDisclosureHeaders) SetResponse(val ContactDisclosure) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ContactDisclosureHeaders) getOrganizationInvitationContactsRes() {}
|
|
|
|
// Kind of personal data that the consent C4 can disclose to one organization (PRD FR01 and FR12). The
|
|
// candidate selects each kind separately; one kind never implies another.
|
|
//
|
|
// - full_name: the full name from the profile.
|
|
// - email: the contact email address from the profile.
|
|
// - phone: the contact phone number from the profile.
|
|
// - telegram: the Telegram username from the profile.
|
|
//
|
|
// The value formats are those of ContactDisclosure: a single-line full name of up to 200 characters,
|
|
// an E.164 phone number, and a Telegram username with the leading @. The profile contract (FR02) must
|
|
// store contacts in the same formats, so a disclosure never has to convert or drop a stored value. The
|
|
// FSP results of FR14, which need their own explicit permission, are planned as additional kinds.
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/ContactFieldKind
|
|
type ContactFieldKind string
|
|
|
|
const (
|
|
ContactFieldKindFullName ContactFieldKind = "full_name"
|
|
ContactFieldKindEmail ContactFieldKind = "email"
|
|
ContactFieldKindPhone ContactFieldKind = "phone"
|
|
ContactFieldKindTelegram ContactFieldKind = "telegram"
|
|
)
|
|
|
|
// AllValues returns all ContactFieldKind values.
|
|
func (ContactFieldKind) AllValues() []ContactFieldKind {
|
|
return []ContactFieldKind{
|
|
ContactFieldKindFullName,
|
|
ContactFieldKindEmail,
|
|
ContactFieldKindPhone,
|
|
ContactFieldKindTelegram,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ContactFieldKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ContactFieldKindFullName:
|
|
return []byte(s), nil
|
|
case ContactFieldKindEmail:
|
|
return []byte(s), nil
|
|
case ContactFieldKindPhone:
|
|
return []byte(s), nil
|
|
case ContactFieldKindTelegram:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ContactFieldKind) UnmarshalText(data []byte) error {
|
|
switch ContactFieldKind(data) {
|
|
case ContactFieldKindFullName:
|
|
*s = ContactFieldKindFullName
|
|
return nil
|
|
case ContactFieldKindEmail:
|
|
*s = ContactFieldKindEmail
|
|
return nil
|
|
case ContactFieldKindPhone:
|
|
*s = ContactFieldKindPhone
|
|
return nil
|
|
case ContactFieldKindTelegram:
|
|
*s = ContactFieldKindTelegram
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ContactFullName string
|
|
|
|
// Contact grant as the candidate reads it: which fields one organization may read, from which
|
|
// invitation and terms version, and whether it is still active. It holds kinds only, never contact
|
|
// values. A grant is stored apart from the invitation state, so a later change of the state does not
|
|
// change it unless the state is a cancellation by the candidate.
|
|
// Ref: #/components/schemas/ContactGrant
|
|
type ContactGrant struct {
|
|
// Identifier of the grant.
|
|
ID uuid.UUID `json:"id"`
|
|
// Contact fields that the grant covers.
|
|
Fields []ContactFieldKind `json:"fields"`
|
|
Status ContactGrantState `json:"status"`
|
|
// Whether the organization can read the covered fields now: true only for an active grant whose
|
|
// current consent and visibility allow the read. The organization sees the same fact as
|
|
// `contact_access.status` `available`, without the reason.
|
|
Readable bool `json:"readable"`
|
|
// Why an active grant is not readable now, or null when it is readable or revoked; a revoked grant has
|
|
// `revocation_reason` instead.
|
|
BlockedBy NilContactAccessBlock `json:"blocked_by"`
|
|
// Terms version of the invitation that the acceptance accepted.
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
// Version of the consent C4 text that the candidate accepted.
|
|
ConsentTextVersion ConsentTextVersion `json:"consent_text_version"`
|
|
GrantedAt Timestamp `json:"granted_at"`
|
|
// Moment of the revocation, or null while the grant is active.
|
|
RevokedAt NilTimestamp `json:"revoked_at"`
|
|
// Reason of the revocation, or null while the grant is active.
|
|
RevocationReason NilContactRevocationReason `json:"revocation_reason"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *ContactGrant) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *ContactGrant) GetFields() []ContactFieldKind {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ContactGrant) GetStatus() ContactGrantState {
|
|
return s.Status
|
|
}
|
|
|
|
// GetReadable returns the value of Readable.
|
|
func (s *ContactGrant) GetReadable() bool {
|
|
return s.Readable
|
|
}
|
|
|
|
// GetBlockedBy returns the value of BlockedBy.
|
|
func (s *ContactGrant) GetBlockedBy() NilContactAccessBlock {
|
|
return s.BlockedBy
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *ContactGrant) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetConsentTextVersion returns the value of ConsentTextVersion.
|
|
func (s *ContactGrant) GetConsentTextVersion() ConsentTextVersion {
|
|
return s.ConsentTextVersion
|
|
}
|
|
|
|
// GetGrantedAt returns the value of GrantedAt.
|
|
func (s *ContactGrant) GetGrantedAt() Timestamp {
|
|
return s.GrantedAt
|
|
}
|
|
|
|
// GetRevokedAt returns the value of RevokedAt.
|
|
func (s *ContactGrant) GetRevokedAt() NilTimestamp {
|
|
return s.RevokedAt
|
|
}
|
|
|
|
// GetRevocationReason returns the value of RevocationReason.
|
|
func (s *ContactGrant) GetRevocationReason() NilContactRevocationReason {
|
|
return s.RevocationReason
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *ContactGrant) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *ContactGrant) SetFields(val []ContactFieldKind) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ContactGrant) SetStatus(val ContactGrantState) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetReadable sets the value of Readable.
|
|
func (s *ContactGrant) SetReadable(val bool) {
|
|
s.Readable = val
|
|
}
|
|
|
|
// SetBlockedBy sets the value of BlockedBy.
|
|
func (s *ContactGrant) SetBlockedBy(val NilContactAccessBlock) {
|
|
s.BlockedBy = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *ContactGrant) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetConsentTextVersion sets the value of ConsentTextVersion.
|
|
func (s *ContactGrant) SetConsentTextVersion(val ConsentTextVersion) {
|
|
s.ConsentTextVersion = val
|
|
}
|
|
|
|
// SetGrantedAt sets the value of GrantedAt.
|
|
func (s *ContactGrant) SetGrantedAt(val Timestamp) {
|
|
s.GrantedAt = val
|
|
}
|
|
|
|
// SetRevokedAt sets the value of RevokedAt.
|
|
func (s *ContactGrant) SetRevokedAt(val NilTimestamp) {
|
|
s.RevokedAt = val
|
|
}
|
|
|
|
// SetRevocationReason sets the value of RevocationReason.
|
|
func (s *ContactGrant) SetRevocationReason(val NilContactRevocationReason) {
|
|
s.RevocationReason = val
|
|
}
|
|
|
|
// State of a contact grant.
|
|
//
|
|
// - active: the grant exists. Each read by the organization still checks the consent C4, the grant,
|
|
// and the current visibility of the profile.
|
|
// - revoked: the grant is closed for good; the organization reads no contact through it. A later
|
|
// publication of the profile or a new acceptance never reopens it; only a new explicit C4 creates a
|
|
// new grant.
|
|
//
|
|
// Ref: #/components/schemas/ContactGrantState
|
|
type ContactGrantState string
|
|
|
|
const (
|
|
ContactGrantStateActive ContactGrantState = "active"
|
|
ContactGrantStateRevoked ContactGrantState = "revoked"
|
|
)
|
|
|
|
// AllValues returns all ContactGrantState values.
|
|
func (ContactGrantState) AllValues() []ContactGrantState {
|
|
return []ContactGrantState{
|
|
ContactGrantStateActive,
|
|
ContactGrantStateRevoked,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ContactGrantState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ContactGrantStateActive:
|
|
return []byte(s), nil
|
|
case ContactGrantStateRevoked:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ContactGrantState) UnmarshalText(data []byte) error {
|
|
switch ContactGrantState(data) {
|
|
case ContactGrantStateActive:
|
|
*s = ContactGrantStateActive
|
|
return nil
|
|
case ContactGrantStateRevoked:
|
|
*s = ContactGrantStateRevoked
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ContactPhoneNumber string
|
|
|
|
// Why a contact grant was revoked, shown only to the candidate.
|
|
//
|
|
// - consent_revoked: the candidate revoked the consent C4 for the organization; every grant under it
|
|
// is closed.
|
|
// - participation_cancelled: the candidate cancelled the participation in this invitation; only the
|
|
// grant of this invitation is closed.
|
|
// - visibility_closed: the candidate revoked the publication C2 or hid the profile from the
|
|
// organization after the grant existed. A grant created while the visibility already did not allow
|
|
// a read stays active with `blocked_by` `visibility` instead.
|
|
//
|
|
// The withdrawal of an invitation by the organization, a no deal, and a negotiation timeout never
|
|
// revoke a grant.
|
|
// Ref: #/components/schemas/ContactRevocationReason
|
|
type ContactRevocationReason string
|
|
|
|
const (
|
|
ContactRevocationReasonConsentRevoked ContactRevocationReason = "consent_revoked"
|
|
ContactRevocationReasonParticipationCancelled ContactRevocationReason = "participation_cancelled"
|
|
ContactRevocationReasonVisibilityClosed ContactRevocationReason = "visibility_closed"
|
|
)
|
|
|
|
// AllValues returns all ContactRevocationReason values.
|
|
func (ContactRevocationReason) AllValues() []ContactRevocationReason {
|
|
return []ContactRevocationReason{
|
|
ContactRevocationReasonConsentRevoked,
|
|
ContactRevocationReasonParticipationCancelled,
|
|
ContactRevocationReasonVisibilityClosed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ContactRevocationReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ContactRevocationReasonConsentRevoked:
|
|
return []byte(s), nil
|
|
case ContactRevocationReasonParticipationCancelled:
|
|
return []byte(s), nil
|
|
case ContactRevocationReasonVisibilityClosed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ContactRevocationReason) UnmarshalText(data []byte) error {
|
|
switch ContactRevocationReason(data) {
|
|
case ContactRevocationReasonConsentRevoked:
|
|
*s = ContactRevocationReasonConsentRevoked
|
|
return nil
|
|
case ContactRevocationReasonParticipationCancelled:
|
|
*s = ContactRevocationReasonParticipationCancelled
|
|
return nil
|
|
case ContactRevocationReasonVisibilityClosed:
|
|
*s = ContactRevocationReasonVisibilityClosed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ContactTelegramUsername string
|
|
|
|
type CreateMyAssessmentAttemptBadRequest Problem
|
|
|
|
func (*CreateMyAssessmentAttemptBadRequest) createMyAssessmentAttemptRes() {}
|
|
|
|
type CreateMyAssessmentAttemptConflict Problem
|
|
|
|
func (*CreateMyAssessmentAttemptConflict) createMyAssessmentAttemptRes() {}
|
|
|
|
type CreateMyAssessmentAttemptForbidden Problem
|
|
|
|
func (*CreateMyAssessmentAttemptForbidden) createMyAssessmentAttemptRes() {}
|
|
|
|
type CreateMyAssessmentAttemptUnauthorized Problem
|
|
|
|
func (*CreateMyAssessmentAttemptUnauthorized) createMyAssessmentAttemptRes() {}
|
|
|
|
type CreateMyAssessmentAttemptUnprocessableEntity Problem
|
|
|
|
func (*CreateMyAssessmentAttemptUnprocessableEntity) createMyAssessmentAttemptRes() {}
|
|
|
|
type CreateMySupportCaseBadRequest Problem
|
|
|
|
func (*CreateMySupportCaseBadRequest) createMySupportCaseRes() {}
|
|
|
|
type CreateMySupportCaseConflict Problem
|
|
|
|
func (*CreateMySupportCaseConflict) createMySupportCaseRes() {}
|
|
|
|
type CreateMySupportCaseForbidden Problem
|
|
|
|
func (*CreateMySupportCaseForbidden) createMySupportCaseRes() {}
|
|
|
|
type CreateMySupportCaseNotFound Problem
|
|
|
|
func (*CreateMySupportCaseNotFound) createMySupportCaseRes() {}
|
|
|
|
type CreateMySupportCaseUnauthorized Problem
|
|
|
|
func (*CreateMySupportCaseUnauthorized) createMySupportCaseRes() {}
|
|
|
|
type CreateMySupportCaseUnprocessableEntity Problem
|
|
|
|
func (*CreateMySupportCaseUnprocessableEntity) createMySupportCaseRes() {}
|
|
|
|
type CreateOrganizationBadRequest Problem
|
|
|
|
func (*CreateOrganizationBadRequest) createOrganizationRes() {}
|
|
|
|
type CreateOrganizationConflict Problem
|
|
|
|
func (*CreateOrganizationConflict) createOrganizationRes() {}
|
|
|
|
type CreateOrganizationForbidden Problem
|
|
|
|
func (*CreateOrganizationForbidden) createOrganizationRes() {}
|
|
|
|
type CreateOrganizationInvitationBadRequest Problem
|
|
|
|
func (*CreateOrganizationInvitationBadRequest) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationInvitationConflict Problem
|
|
|
|
func (*CreateOrganizationInvitationConflict) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationInvitationForbidden Problem
|
|
|
|
func (*CreateOrganizationInvitationForbidden) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationInvitationNotFound Problem
|
|
|
|
func (*CreateOrganizationInvitationNotFound) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationInvitationUnauthorized Problem
|
|
|
|
func (*CreateOrganizationInvitationUnauthorized) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationInvitationUnprocessableEntity Problem
|
|
|
|
func (*CreateOrganizationInvitationUnprocessableEntity) createOrganizationInvitationRes() {}
|
|
|
|
type CreateOrganizationNeedBadRequest Problem
|
|
|
|
func (*CreateOrganizationNeedBadRequest) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationNeedConflict Problem
|
|
|
|
func (*CreateOrganizationNeedConflict) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationNeedForbidden Problem
|
|
|
|
func (*CreateOrganizationNeedForbidden) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationNeedNotFound Problem
|
|
|
|
func (*CreateOrganizationNeedNotFound) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationNeedUnauthorized Problem
|
|
|
|
func (*CreateOrganizationNeedUnauthorized) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationNeedUnprocessableEntity Problem
|
|
|
|
func (*CreateOrganizationNeedUnprocessableEntity) createOrganizationNeedRes() {}
|
|
|
|
type CreateOrganizationUnauthorized Problem
|
|
|
|
func (*CreateOrganizationUnauthorized) createOrganizationRes() {}
|
|
|
|
type CreateOrganizationUnprocessableEntity Problem
|
|
|
|
func (*CreateOrganizationUnprocessableEntity) createOrganizationRes() {}
|
|
|
|
type CsrfToken string
|
|
|
|
// ISO 4217 currency code. The MVP accepts only RUB; adding a value is a contract change.
|
|
// Ref: #/components/schemas/CurrencyCode
|
|
type CurrencyCode string
|
|
|
|
const (
|
|
CurrencyCodeRUB CurrencyCode = "RUB"
|
|
)
|
|
|
|
// AllValues returns all CurrencyCode values.
|
|
func (CurrencyCode) AllValues() []CurrencyCode {
|
|
return []CurrencyCode{
|
|
CurrencyCodeRUB,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s CurrencyCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case CurrencyCodeRUB:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *CurrencyCode) UnmarshalText(data []byte) error {
|
|
switch CurrencyCode(data) {
|
|
case CurrencyCodeRUB:
|
|
*s = CurrencyCodeRUB
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type DeclineMyInvitationBadRequest Problem
|
|
|
|
func (*DeclineMyInvitationBadRequest) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationConflict Problem
|
|
|
|
func (*DeclineMyInvitationConflict) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationForbidden Problem
|
|
|
|
func (*DeclineMyInvitationForbidden) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationNotFound Problem
|
|
|
|
func (*DeclineMyInvitationNotFound) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationPreconditionFailed Problem
|
|
|
|
func (*DeclineMyInvitationPreconditionFailed) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationUnauthorized Problem
|
|
|
|
func (*DeclineMyInvitationUnauthorized) declineMyInvitationRes() {}
|
|
|
|
type DeclineMyInvitationUnprocessableEntity Problem
|
|
|
|
func (*DeclineMyInvitationUnprocessableEntity) declineMyInvitationRes() {}
|
|
|
|
// Stable code of a professional direction, the group that a specialization belongs to.
|
|
//
|
|
// - development: Development.
|
|
// - infrastructure: Infrastructure.
|
|
// - data: Data.
|
|
// - security: Security.
|
|
// - quality: Quality.
|
|
//
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/DirectionCode
|
|
type DirectionCode string
|
|
|
|
const (
|
|
DirectionCodeDevelopment DirectionCode = "development"
|
|
DirectionCodeInfrastructure DirectionCode = "infrastructure"
|
|
DirectionCodeData DirectionCode = "data"
|
|
DirectionCodeSecurity DirectionCode = "security"
|
|
DirectionCodeQuality DirectionCode = "quality"
|
|
)
|
|
|
|
// AllValues returns all DirectionCode values.
|
|
func (DirectionCode) AllValues() []DirectionCode {
|
|
return []DirectionCode{
|
|
DirectionCodeDevelopment,
|
|
DirectionCodeInfrastructure,
|
|
DirectionCodeData,
|
|
DirectionCodeSecurity,
|
|
DirectionCodeQuality,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s DirectionCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case DirectionCodeDevelopment:
|
|
return []byte(s), nil
|
|
case DirectionCodeInfrastructure:
|
|
return []byte(s), nil
|
|
case DirectionCodeData:
|
|
return []byte(s), nil
|
|
case DirectionCodeSecurity:
|
|
return []byte(s), nil
|
|
case DirectionCodeQuality:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *DirectionCode) UnmarshalText(data []byte) error {
|
|
switch DirectionCode(data) {
|
|
case DirectionCodeDevelopment:
|
|
*s = DirectionCodeDevelopment
|
|
return nil
|
|
case DirectionCodeInfrastructure:
|
|
*s = DirectionCodeInfrastructure
|
|
return nil
|
|
case DirectionCodeData:
|
|
*s = DirectionCodeData
|
|
return nil
|
|
case DirectionCodeSecurity:
|
|
*s = DirectionCodeSecurity
|
|
return nil
|
|
case DirectionCodeQuality:
|
|
*s = DirectionCodeQuality
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type EmailAddress string
|
|
|
|
// One-time token copied from the verification link and the password chosen for the registration that
|
|
// issued it. The password is never included in the link.
|
|
// Ref: #/components/schemas/EmailVerificationRequest
|
|
type EmailVerificationRequest struct {
|
|
Token VerificationToken `json:"token"`
|
|
// Password chosen for the registration that issued this token. It is sent in the request body and
|
|
// never appears in the verification link. The server applies NFKC normalization and the login length
|
|
// bounds, without reapplying the current new-registration blocklist.
|
|
Password string `json:"password"`
|
|
}
|
|
|
|
// GetToken returns the value of Token.
|
|
func (s *EmailVerificationRequest) GetToken() VerificationToken {
|
|
return s.Token
|
|
}
|
|
|
|
// GetPassword returns the value of Password.
|
|
func (s *EmailVerificationRequest) GetPassword() string {
|
|
return s.Password
|
|
}
|
|
|
|
// SetToken sets the value of Token.
|
|
func (s *EmailVerificationRequest) SetToken(val VerificationToken) {
|
|
s.Token = val
|
|
}
|
|
|
|
// SetPassword sets the value of Password.
|
|
func (s *EmailVerificationRequest) SetPassword(val string) {
|
|
s.Password = val
|
|
}
|
|
|
|
// Address that should receive a new verification link.
|
|
// Ref: #/components/schemas/EmailVerificationResendRequest
|
|
type EmailVerificationResendRequest struct {
|
|
Email EmailAddress `json:"email"`
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *EmailVerificationResendRequest) GetEmail() EmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *EmailVerificationResendRequest) SetEmail(val EmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// Result of a successful email verification. It does not start a session; the user signs in next and
|
|
// continues from `onboarding_step`.
|
|
// Ref: #/components/schemas/EmailVerificationResult
|
|
type EmailVerificationResult struct {
|
|
// Always true in a successful response.
|
|
EmailVerified EmailVerificationResultEmailVerified `json:"email_verified"`
|
|
Scenario AccountScenario `json:"scenario"`
|
|
OnboardingStep OnboardingStep `json:"onboarding_step"`
|
|
}
|
|
|
|
// GetEmailVerified returns the value of EmailVerified.
|
|
func (s *EmailVerificationResult) GetEmailVerified() EmailVerificationResultEmailVerified {
|
|
return s.EmailVerified
|
|
}
|
|
|
|
// GetScenario returns the value of Scenario.
|
|
func (s *EmailVerificationResult) GetScenario() AccountScenario {
|
|
return s.Scenario
|
|
}
|
|
|
|
// GetOnboardingStep returns the value of OnboardingStep.
|
|
func (s *EmailVerificationResult) GetOnboardingStep() OnboardingStep {
|
|
return s.OnboardingStep
|
|
}
|
|
|
|
// SetEmailVerified sets the value of EmailVerified.
|
|
func (s *EmailVerificationResult) SetEmailVerified(val EmailVerificationResultEmailVerified) {
|
|
s.EmailVerified = val
|
|
}
|
|
|
|
// SetScenario sets the value of Scenario.
|
|
func (s *EmailVerificationResult) SetScenario(val AccountScenario) {
|
|
s.Scenario = val
|
|
}
|
|
|
|
// SetOnboardingStep sets the value of OnboardingStep.
|
|
func (s *EmailVerificationResult) SetOnboardingStep(val OnboardingStep) {
|
|
s.OnboardingStep = val
|
|
}
|
|
|
|
func (*EmailVerificationResult) confirmEmailRes() {}
|
|
|
|
// Always true in a successful response.
|
|
type EmailVerificationResultEmailVerified bool
|
|
|
|
const (
|
|
EmailVerificationResultEmailVerifiedTrue EmailVerificationResultEmailVerified = true
|
|
)
|
|
|
|
// AllValues returns all EmailVerificationResultEmailVerified values.
|
|
func (EmailVerificationResultEmailVerified) AllValues() []EmailVerificationResultEmailVerified {
|
|
return []EmailVerificationResultEmailVerified{
|
|
EmailVerificationResultEmailVerifiedTrue,
|
|
}
|
|
}
|
|
|
|
type FinalizeMyAssessmentAttemptBadRequest Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptBadRequest) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptConflict Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptConflict) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptForbidden Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptForbidden) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptNotFound Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptNotFound) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptPreconditionFailed Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptPreconditionFailed) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptUnauthorized Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptUnauthorized) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
type FinalizeMyAssessmentAttemptUnprocessableEntity Problem
|
|
|
|
func (*FinalizeMyAssessmentAttemptUnprocessableEntity) finalizeMyAssessmentAttemptRes() {}
|
|
|
|
// Selected line numbers, at most the `max_selections` of the item. Two answers are equal when they
|
|
// select the same set of lines, in any order.
|
|
// Ref: #/components/schemas/FindErrorAnswer
|
|
type FindErrorAnswer struct {
|
|
Format FindErrorAnswerFormat `json:"format"`
|
|
LineNumbers []int32 `json:"line_numbers"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *FindErrorAnswer) GetFormat() FindErrorAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetLineNumbers returns the value of LineNumbers.
|
|
func (s *FindErrorAnswer) GetLineNumbers() []int32 {
|
|
return s.LineNumbers
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *FindErrorAnswer) SetFormat(val FindErrorAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetLineNumbers sets the value of LineNumbers.
|
|
func (s *FindErrorAnswer) SetLineNumbers(val []int32) {
|
|
s.LineNumbers = val
|
|
}
|
|
|
|
type FindErrorAnswerFormat string
|
|
|
|
const (
|
|
FindErrorAnswerFormatFindError FindErrorAnswerFormat = "find_error"
|
|
)
|
|
|
|
// AllValues returns all FindErrorAnswerFormat values.
|
|
func (FindErrorAnswerFormat) AllValues() []FindErrorAnswerFormat {
|
|
return []FindErrorAnswerFormat{
|
|
FindErrorAnswerFormatFindError,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s FindErrorAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case FindErrorAnswerFormatFindError:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *FindErrorAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch FindErrorAnswerFormat(data) {
|
|
case FindErrorAnswerFormatFindError:
|
|
*s = FindErrorAnswerFormatFindError
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Find the lines with the error in a code or configuration fragment and select up to `max_selections`
|
|
// line numbers.
|
|
// Ref: #/components/schemas/FindErrorItemContent
|
|
type FindErrorItemContent struct {
|
|
Format FindErrorItemContentFormat `json:"format"`
|
|
// Highlighting hint such as `go`, `python`, or `cisco_ios`, or null.
|
|
Syntax NilString `json:"syntax"`
|
|
// Lines numbered from 1 in order.
|
|
Lines []CodeLine `json:"lines"`
|
|
// Maximum number of lines the answer may select. It is a limit of the task family, fixed for every
|
|
// variant and never derived from the key; it is not the number of wrong lines.
|
|
MaxSelections int32 `json:"max_selections"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *FindErrorItemContent) GetFormat() FindErrorItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetSyntax returns the value of Syntax.
|
|
func (s *FindErrorItemContent) GetSyntax() NilString {
|
|
return s.Syntax
|
|
}
|
|
|
|
// GetLines returns the value of Lines.
|
|
func (s *FindErrorItemContent) GetLines() []CodeLine {
|
|
return s.Lines
|
|
}
|
|
|
|
// GetMaxSelections returns the value of MaxSelections.
|
|
func (s *FindErrorItemContent) GetMaxSelections() int32 {
|
|
return s.MaxSelections
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *FindErrorItemContent) SetFormat(val FindErrorItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetSyntax sets the value of Syntax.
|
|
func (s *FindErrorItemContent) SetSyntax(val NilString) {
|
|
s.Syntax = val
|
|
}
|
|
|
|
// SetLines sets the value of Lines.
|
|
func (s *FindErrorItemContent) SetLines(val []CodeLine) {
|
|
s.Lines = val
|
|
}
|
|
|
|
// SetMaxSelections sets the value of MaxSelections.
|
|
func (s *FindErrorItemContent) SetMaxSelections(val int32) {
|
|
s.MaxSelections = val
|
|
}
|
|
|
|
type FindErrorItemContentFormat string
|
|
|
|
const (
|
|
FindErrorItemContentFormatFindError FindErrorItemContentFormat = "find_error"
|
|
)
|
|
|
|
// AllValues returns all FindErrorItemContentFormat values.
|
|
func (FindErrorItemContentFormat) AllValues() []FindErrorItemContentFormat {
|
|
return []FindErrorItemContentFormat{
|
|
FindErrorItemContentFormatFindError,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s FindErrorItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case FindErrorItemContentFormatFindError:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *FindErrorItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch FindErrorItemContentFormat(data) {
|
|
case FindErrorItemContentFormatFindError:
|
|
*s = FindErrorItemContentFormatFindError
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// GetCurrentSessionOKHeaders wraps Session with response headers.
|
|
type GetCurrentSessionOKHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response Session
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *GetCurrentSessionOKHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *GetCurrentSessionOKHeaders) GetResponse() Session {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *GetCurrentSessionOKHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *GetCurrentSessionOKHeaders) SetResponse(val Session) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*GetCurrentSessionOKHeaders) getCurrentSessionRes() {}
|
|
|
|
type GetMyAssessmentAttemptForbidden Problem
|
|
|
|
func (*GetMyAssessmentAttemptForbidden) getMyAssessmentAttemptRes() {}
|
|
|
|
type GetMyAssessmentAttemptNotFound Problem
|
|
|
|
func (*GetMyAssessmentAttemptNotFound) getMyAssessmentAttemptRes() {}
|
|
|
|
type GetMyAssessmentAttemptUnauthorized Problem
|
|
|
|
func (*GetMyAssessmentAttemptUnauthorized) getMyAssessmentAttemptRes() {}
|
|
|
|
type GetMyAssessmentAvailabilityForbidden Problem
|
|
|
|
func (*GetMyAssessmentAvailabilityForbidden) getMyAssessmentAvailabilityRes() {}
|
|
|
|
type GetMyAssessmentAvailabilityUnauthorized Problem
|
|
|
|
func (*GetMyAssessmentAvailabilityUnauthorized) getMyAssessmentAvailabilityRes() {}
|
|
|
|
type GetMyAssessmentResultConflict Problem
|
|
|
|
func (*GetMyAssessmentResultConflict) getMyAssessmentResultRes() {}
|
|
|
|
type GetMyAssessmentResultForbidden Problem
|
|
|
|
func (*GetMyAssessmentResultForbidden) getMyAssessmentResultRes() {}
|
|
|
|
type GetMyAssessmentResultNotFound Problem
|
|
|
|
func (*GetMyAssessmentResultNotFound) getMyAssessmentResultRes() {}
|
|
|
|
type GetMyAssessmentResultUnauthorized Problem
|
|
|
|
func (*GetMyAssessmentResultUnauthorized) getMyAssessmentResultRes() {}
|
|
|
|
type GetMyCardPreviewForbidden Problem
|
|
|
|
func (*GetMyCardPreviewForbidden) getMyCardPreviewRes() {}
|
|
|
|
type GetMyCardPreviewUnauthorized Problem
|
|
|
|
func (*GetMyCardPreviewUnauthorized) getMyCardPreviewRes() {}
|
|
|
|
type GetMyConsentTextBadRequest Problem
|
|
|
|
func (*GetMyConsentTextBadRequest) getMyConsentTextRes() {}
|
|
|
|
type GetMyConsentTextUnauthorized Problem
|
|
|
|
func (*GetMyConsentTextUnauthorized) getMyConsentTextRes() {}
|
|
|
|
type GetMyInvitationBadRequest Problem
|
|
|
|
func (*GetMyInvitationBadRequest) getMyInvitationRes() {}
|
|
|
|
type GetMyInvitationForbidden Problem
|
|
|
|
func (*GetMyInvitationForbidden) getMyInvitationRes() {}
|
|
|
|
type GetMyInvitationNotFound Problem
|
|
|
|
func (*GetMyInvitationNotFound) getMyInvitationRes() {}
|
|
|
|
type GetMyInvitationUnauthorized Problem
|
|
|
|
func (*GetMyInvitationUnauthorized) getMyInvitationRes() {}
|
|
|
|
type GetMyPrivacySettingsForbidden Problem
|
|
|
|
func (*GetMyPrivacySettingsForbidden) getMyPrivacySettingsRes() {}
|
|
|
|
type GetMyPrivacySettingsUnauthorized Problem
|
|
|
|
func (*GetMyPrivacySettingsUnauthorized) getMyPrivacySettingsRes() {}
|
|
|
|
type GetMyProfileForbidden Problem
|
|
|
|
func (*GetMyProfileForbidden) getMyProfileRes() {}
|
|
|
|
type GetMyProfileUnauthorized Problem
|
|
|
|
func (*GetMyProfileUnauthorized) getMyProfileRes() {}
|
|
|
|
type GetMyQuestionnaireForbidden Problem
|
|
|
|
func (*GetMyQuestionnaireForbidden) getMyQuestionnaireRes() {}
|
|
|
|
type GetMyQuestionnaireUnauthorized Problem
|
|
|
|
func (*GetMyQuestionnaireUnauthorized) getMyQuestionnaireRes() {}
|
|
|
|
type GetMySupportCaseBadRequest Problem
|
|
|
|
func (*GetMySupportCaseBadRequest) getMySupportCaseRes() {}
|
|
|
|
type GetMySupportCaseNotFound Problem
|
|
|
|
func (*GetMySupportCaseNotFound) getMySupportCaseRes() {}
|
|
|
|
type GetMySupportCaseUnauthorized Problem
|
|
|
|
func (*GetMySupportCaseUnauthorized) getMySupportCaseRes() {}
|
|
|
|
type GetOrganizationBadRequest Problem
|
|
|
|
func (*GetOrganizationBadRequest) getOrganizationRes() {}
|
|
|
|
type GetOrganizationForbidden Problem
|
|
|
|
func (*GetOrganizationForbidden) getOrganizationRes() {}
|
|
|
|
type GetOrganizationInvitationBadRequest Problem
|
|
|
|
func (*GetOrganizationInvitationBadRequest) getOrganizationInvitationRes() {}
|
|
|
|
type GetOrganizationInvitationContactsBadRequest Problem
|
|
|
|
func (*GetOrganizationInvitationContactsBadRequest) getOrganizationInvitationContactsRes() {}
|
|
|
|
type GetOrganizationInvitationContactsForbidden Problem
|
|
|
|
func (*GetOrganizationInvitationContactsForbidden) getOrganizationInvitationContactsRes() {}
|
|
|
|
type GetOrganizationInvitationContactsNotFound Problem
|
|
|
|
func (*GetOrganizationInvitationContactsNotFound) getOrganizationInvitationContactsRes() {}
|
|
|
|
type GetOrganizationInvitationContactsUnauthorized Problem
|
|
|
|
func (*GetOrganizationInvitationContactsUnauthorized) getOrganizationInvitationContactsRes() {}
|
|
|
|
type GetOrganizationInvitationForbidden Problem
|
|
|
|
func (*GetOrganizationInvitationForbidden) getOrganizationInvitationRes() {}
|
|
|
|
type GetOrganizationInvitationNotFound Problem
|
|
|
|
func (*GetOrganizationInvitationNotFound) getOrganizationInvitationRes() {}
|
|
|
|
type GetOrganizationInvitationUnauthorized Problem
|
|
|
|
func (*GetOrganizationInvitationUnauthorized) getOrganizationInvitationRes() {}
|
|
|
|
type GetOrganizationNeedBadRequest Problem
|
|
|
|
func (*GetOrganizationNeedBadRequest) getOrganizationNeedRes() {}
|
|
|
|
type GetOrganizationNeedForbidden Problem
|
|
|
|
func (*GetOrganizationNeedForbidden) getOrganizationNeedRes() {}
|
|
|
|
type GetOrganizationNeedNotFound Problem
|
|
|
|
func (*GetOrganizationNeedNotFound) getOrganizationNeedRes() {}
|
|
|
|
type GetOrganizationNeedUnauthorized Problem
|
|
|
|
func (*GetOrganizationNeedUnauthorized) getOrganizationNeedRes() {}
|
|
|
|
type GetOrganizationNotFound Problem
|
|
|
|
func (*GetOrganizationNotFound) getOrganizationRes() {}
|
|
|
|
type GetOrganizationUnauthorized Problem
|
|
|
|
func (*GetOrganizationUnauthorized) getOrganizationRes() {}
|
|
|
|
// Grade of the MVP scale in ascending order: `intern`, `junior`, `middle`, `senior`. The same codes
|
|
// describe a self-assessed grade, which the candidate states, and a confirmed grade, which only an
|
|
// assessment result establishes. Lead and Architect are planned after the MVP; adding a value is a
|
|
// contract change.
|
|
// Ref: #/components/schemas/GradeCode
|
|
type GradeCode string
|
|
|
|
const (
|
|
GradeCodeIntern GradeCode = "intern"
|
|
GradeCodeJunior GradeCode = "junior"
|
|
GradeCodeMiddle GradeCode = "middle"
|
|
GradeCodeSenior GradeCode = "senior"
|
|
)
|
|
|
|
// AllValues returns all GradeCode values.
|
|
func (GradeCode) AllValues() []GradeCode {
|
|
return []GradeCode{
|
|
GradeCodeIntern,
|
|
GradeCodeJunior,
|
|
GradeCodeMiddle,
|
|
GradeCodeSenior,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s GradeCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case GradeCodeIntern:
|
|
return []byte(s), nil
|
|
case GradeCodeJunior:
|
|
return []byte(s), nil
|
|
case GradeCodeMiddle:
|
|
return []byte(s), nil
|
|
case GradeCodeSenior:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *GradeCode) UnmarshalText(data []byte) error {
|
|
switch GradeCode(data) {
|
|
case GradeCodeIntern:
|
|
*s = GradeCodeIntern
|
|
return nil
|
|
case GradeCodeJunior:
|
|
*s = GradeCodeJunior
|
|
return nil
|
|
case GradeCodeMiddle:
|
|
*s = GradeCodeMiddle
|
|
return nil
|
|
case GradeCodeSenior:
|
|
*s = GradeCodeSenior
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type GrantMyConsentBadRequest Problem
|
|
|
|
func (*GrantMyConsentBadRequest) grantMyConsentRes() {}
|
|
|
|
type GrantMyConsentForbidden Problem
|
|
|
|
func (*GrantMyConsentForbidden) grantMyConsentRes() {}
|
|
|
|
type GrantMyConsentUnauthorized Problem
|
|
|
|
func (*GrantMyConsentUnauthorized) grantMyConsentRes() {}
|
|
|
|
// Ref: #/components/schemas/HealthResponse
|
|
type HealthResponse struct {
|
|
Status HealthResponseStatus `json:"status"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *HealthResponse) GetStatus() HealthResponseStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *HealthResponse) SetStatus(val HealthResponseStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type HealthResponseStatus string
|
|
|
|
const (
|
|
HealthResponseStatusOk HealthResponseStatus = "ok"
|
|
)
|
|
|
|
// AllValues returns all HealthResponseStatus values.
|
|
func (HealthResponseStatus) AllValues() []HealthResponseStatus {
|
|
return []HealthResponseStatus{
|
|
HealthResponseStatusOk,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s HealthResponseStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case HealthResponseStatusOk:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *HealthResponseStatus) UnmarshalText(data []byte) error {
|
|
switch HealthResponseStatus(data) {
|
|
case HealthResponseStatusOk:
|
|
*s = HealthResponseStatusOk
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One organization that the candidate hides the profile from. The record belongs to the candidate: no
|
|
// organization reads it, learns that it was hidden, or can tell a hidden candidate from one who is not
|
|
// published.
|
|
// Ref: #/components/schemas/HiddenOrganization
|
|
type HiddenOrganization struct {
|
|
Organization PrivacyOrganization `json:"organization"`
|
|
HiddenAt Timestamp `json:"hidden_at"`
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *HiddenOrganization) GetOrganization() PrivacyOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// GetHiddenAt returns the value of HiddenAt.
|
|
func (s *HiddenOrganization) GetHiddenAt() Timestamp {
|
|
return s.HiddenAt
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *HiddenOrganization) SetOrganization(val PrivacyOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// SetHiddenAt sets the value of HiddenAt.
|
|
func (s *HiddenOrganization) SetHiddenAt(val Timestamp) {
|
|
s.HiddenAt = val
|
|
}
|
|
|
|
// HiddenOrganizationHeaders wraps HiddenOrganization with response headers.
|
|
type HiddenOrganizationHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response HiddenOrganization
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *HiddenOrganizationHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *HiddenOrganizationHeaders) GetResponse() HiddenOrganization {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *HiddenOrganizationHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *HiddenOrganizationHeaders) SetResponse(val HiddenOrganization) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*HiddenOrganizationHeaders) hideOrganizationRes() {}
|
|
|
|
// One page of the organizations that the candidate hides the profile from, newest first with the
|
|
// organization identifier as the tie-breaker.
|
|
// Ref: #/components/schemas/HiddenOrganizationList
|
|
type HiddenOrganizationList struct {
|
|
// Hidden organizations of the page.
|
|
Items []HiddenOrganization `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *HiddenOrganizationList) GetItems() []HiddenOrganization {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *HiddenOrganizationList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *HiddenOrganizationList) SetItems(val []HiddenOrganization) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *HiddenOrganizationList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// HiddenOrganizationListHeaders wraps HiddenOrganizationList with response headers.
|
|
type HiddenOrganizationListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response HiddenOrganizationList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *HiddenOrganizationListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *HiddenOrganizationListHeaders) GetResponse() HiddenOrganizationList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *HiddenOrganizationListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *HiddenOrganizationListHeaders) SetResponse(val HiddenOrganizationList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*HiddenOrganizationListHeaders) listMyHiddenOrganizationsRes() {}
|
|
|
|
type HideOrganizationBadRequest Problem
|
|
|
|
func (*HideOrganizationBadRequest) hideOrganizationRes() {}
|
|
|
|
type HideOrganizationConflict Problem
|
|
|
|
func (*HideOrganizationConflict) hideOrganizationRes() {}
|
|
|
|
type HideOrganizationForbidden Problem
|
|
|
|
func (*HideOrganizationForbidden) hideOrganizationRes() {}
|
|
|
|
type HideOrganizationNotFound Problem
|
|
|
|
func (*HideOrganizationNotFound) hideOrganizationRes() {}
|
|
|
|
type HideOrganizationUnauthorized Problem
|
|
|
|
func (*HideOrganizationUnauthorized) hideOrganizationRes() {}
|
|
|
|
// Neutral acknowledgement. Its content is identical whether or not the address belongs to an account
|
|
// or is already verified, so the response does not enumerate accounts. The client tells the user to
|
|
// check the mailbox.
|
|
// Ref: #/components/schemas/IdentityRequestAccepted
|
|
type IdentityRequestAccepted struct {
|
|
Status IdentityRequestAcceptedStatus `json:"status"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *IdentityRequestAccepted) GetStatus() IdentityRequestAcceptedStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *IdentityRequestAccepted) SetStatus(val IdentityRequestAcceptedStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
func (*IdentityRequestAccepted) registerAccountRes() {}
|
|
func (*IdentityRequestAccepted) resendEmailVerificationRes() {}
|
|
|
|
type IdentityRequestAcceptedStatus string
|
|
|
|
const (
|
|
IdentityRequestAcceptedStatusAccepted IdentityRequestAcceptedStatus = "accepted"
|
|
)
|
|
|
|
// AllValues returns all IdentityRequestAcceptedStatus values.
|
|
func (IdentityRequestAcceptedStatus) AllValues() []IdentityRequestAcceptedStatus {
|
|
return []IdentityRequestAcceptedStatus{
|
|
IdentityRequestAcceptedStatusAccepted,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s IdentityRequestAcceptedStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case IdentityRequestAcceptedStatusAccepted:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *IdentityRequestAcceptedStatus) UnmarshalText(data []byte) error {
|
|
switch IdentityRequestAcceptedStatus(data) {
|
|
case IdentityRequestAcceptedStatusAccepted:
|
|
*s = IdentityRequestAcceptedStatusAccepted
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Acceptance of the current terms with the consent C4. The client sends the `version` and the
|
|
// `terms_version` it read and the contact fields the candidate selected; nothing is preselected or
|
|
// defaulted. Unknown fields are rejected, so a request cannot carry contact values, a grant, or
|
|
// another consent.
|
|
// Ref: #/components/schemas/InvitationAcceptance
|
|
type InvitationAcceptance struct {
|
|
ExpectedVersion InvitationVersion `json:"expected_version"`
|
|
// Terms version that the candidate read and accepts. A version that is not the current one answers 412
|
|
// version_conflict.
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
ConsentC4 ContactConsentAcceptance `json:"consent_c4"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *InvitationAcceptance) GetExpectedVersion() InvitationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *InvitationAcceptance) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetConsentC4 returns the value of ConsentC4.
|
|
func (s *InvitationAcceptance) GetConsentC4() ContactConsentAcceptance {
|
|
return s.ConsentC4
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *InvitationAcceptance) SetExpectedVersion(val InvitationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *InvitationAcceptance) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetConsentC4 sets the value of ConsentC4.
|
|
func (s *InvitationAcceptance) SetConsentC4(val ContactConsentAcceptance) {
|
|
s.ConsentC4 = val
|
|
}
|
|
|
|
// Command without parameters over the invitation version the client read: send, withdraw, or cancel.
|
|
// Unknown fields are rejected.
|
|
// Ref: #/components/schemas/InvitationCommand
|
|
type InvitationCommand struct {
|
|
ExpectedVersion InvitationVersion `json:"expected_version"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *InvitationCommand) GetExpectedVersion() InvitationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *InvitationCommand) SetExpectedVersion(val InvitationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// Channel through which the organization will contact the candidate after an acceptance.
|
|
//
|
|
// - email: a letter to the email address the candidate disclosed.
|
|
// - phone: a call or a text to the phone number the candidate disclosed.
|
|
// - telegram: a message to the Telegram username the candidate disclosed.
|
|
// - video_call: an invitation to a video call, sent through one of the disclosed contacts.
|
|
//
|
|
// The channel describes the organization's plan; the candidate decides which contacts to disclose, and
|
|
// the server never requires that the disclosed fields include the channel.
|
|
// Ref: #/components/schemas/InvitationCommunicationChannel
|
|
type InvitationCommunicationChannel string
|
|
|
|
const (
|
|
InvitationCommunicationChannelEmail InvitationCommunicationChannel = "email"
|
|
InvitationCommunicationChannelPhone InvitationCommunicationChannel = "phone"
|
|
InvitationCommunicationChannelTelegram InvitationCommunicationChannel = "telegram"
|
|
InvitationCommunicationChannelVideoCall InvitationCommunicationChannel = "video_call"
|
|
)
|
|
|
|
// AllValues returns all InvitationCommunicationChannel values.
|
|
func (InvitationCommunicationChannel) AllValues() []InvitationCommunicationChannel {
|
|
return []InvitationCommunicationChannel{
|
|
InvitationCommunicationChannelEmail,
|
|
InvitationCommunicationChannelPhone,
|
|
InvitationCommunicationChannelTelegram,
|
|
InvitationCommunicationChannelVideoCall,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationCommunicationChannel) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationCommunicationChannelEmail:
|
|
return []byte(s), nil
|
|
case InvitationCommunicationChannelPhone:
|
|
return []byte(s), nil
|
|
case InvitationCommunicationChannelTelegram:
|
|
return []byte(s), nil
|
|
case InvitationCommunicationChannelVideoCall:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationCommunicationChannel) UnmarshalText(data []byte) error {
|
|
switch InvitationCommunicationChannel(data) {
|
|
case InvitationCommunicationChannelEmail:
|
|
*s = InvitationCommunicationChannelEmail
|
|
return nil
|
|
case InvitationCommunicationChannelPhone:
|
|
*s = InvitationCommunicationChannelPhone
|
|
return nil
|
|
case InvitationCommunicationChannelTelegram:
|
|
*s = InvitationCommunicationChannelTelegram
|
|
return nil
|
|
case InvitationCommunicationChannelVideoCall:
|
|
*s = InvitationCommunicationChannelVideoCall
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// How the organization will contact the candidate after an acceptance. It is part of the terms, so the
|
|
// candidate sees it before choosing which contacts to disclose. An invitation without it cannot exist,
|
|
// because the terms require it.
|
|
// Ref: #/components/schemas/InvitationCommunicationMethod
|
|
type InvitationCommunicationMethod struct {
|
|
Channel InvitationCommunicationChannel `json:"channel"`
|
|
// Optional short note, for example the first step or the expected time of the first contact, or null.
|
|
// Plain text without line breaks; it never contains a link or a contact of an employee.
|
|
Details NilInvitationCommunicationNote `json:"details"`
|
|
}
|
|
|
|
// GetChannel returns the value of Channel.
|
|
func (s *InvitationCommunicationMethod) GetChannel() InvitationCommunicationChannel {
|
|
return s.Channel
|
|
}
|
|
|
|
// GetDetails returns the value of Details.
|
|
func (s *InvitationCommunicationMethod) GetDetails() NilInvitationCommunicationNote {
|
|
return s.Details
|
|
}
|
|
|
|
// SetChannel sets the value of Channel.
|
|
func (s *InvitationCommunicationMethod) SetChannel(val InvitationCommunicationChannel) {
|
|
s.Channel = val
|
|
}
|
|
|
|
// SetDetails sets the value of Details.
|
|
func (s *InvitationCommunicationMethod) SetDetails(val NilInvitationCommunicationNote) {
|
|
s.Details = val
|
|
}
|
|
|
|
type InvitationCommunicationNote string
|
|
|
|
// Contact access of the organization through this invitation, without any contact value. The values
|
|
// come only from GetOrganizationInvitationContacts.
|
|
// Ref: #/components/schemas/InvitationContactAccess
|
|
type InvitationContactAccess struct {
|
|
Status InvitationContactAccessState `json:"status"`
|
|
// Kinds of contact that the read returns while `status` is `available`; empty otherwise.
|
|
Fields []ContactFieldKind `json:"fields"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *InvitationContactAccess) GetStatus() InvitationContactAccessState {
|
|
return s.Status
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *InvitationContactAccess) GetFields() []ContactFieldKind {
|
|
return s.Fields
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *InvitationContactAccess) SetStatus(val InvitationContactAccessState) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *InvitationContactAccess) SetFields(val []ContactFieldKind) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// Whether the organization may read the candidate's contacts through GetOrganizationInvitationContacts
|
|
// now.
|
|
//
|
|
// - not_granted: the candidate has not accepted this invitation, so no grant exists.
|
|
// - available: a grant from this invitation is active and the current consent and visibility allow
|
|
// the read.
|
|
// - closed: a grant from this invitation exists but does not allow the read now: it was revoked (the
|
|
// candidate revoked C4, cancelled the participation, or revoked the publication C2 or hid the
|
|
// profile after the acceptance), or it was created while the visibility already did not allow the
|
|
// read. The organization is not told which. A revoked grant never becomes `available` again; a
|
|
// grant blocked from the start becomes `available` once the candidate's visibility allows the read,
|
|
// which only follows the candidate's own choice to publish the profile or unhide it for the
|
|
// organization. Since every visibility change after a grant exists revokes the grant, a later
|
|
// toggle is never visible to the organization.
|
|
//
|
|
// Ref: #/components/schemas/InvitationContactAccessState
|
|
type InvitationContactAccessState string
|
|
|
|
const (
|
|
InvitationContactAccessStateNotGranted InvitationContactAccessState = "not_granted"
|
|
InvitationContactAccessStateAvailable InvitationContactAccessState = "available"
|
|
InvitationContactAccessStateClosed InvitationContactAccessState = "closed"
|
|
)
|
|
|
|
// AllValues returns all InvitationContactAccessState values.
|
|
func (InvitationContactAccessState) AllValues() []InvitationContactAccessState {
|
|
return []InvitationContactAccessState{
|
|
InvitationContactAccessStateNotGranted,
|
|
InvitationContactAccessStateAvailable,
|
|
InvitationContactAccessStateClosed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationContactAccessState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationContactAccessStateNotGranted:
|
|
return []byte(s), nil
|
|
case InvitationContactAccessStateAvailable:
|
|
return []byte(s), nil
|
|
case InvitationContactAccessStateClosed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationContactAccessState) UnmarshalText(data []byte) error {
|
|
switch InvitationContactAccessState(data) {
|
|
case InvitationContactAccessStateNotGranted:
|
|
*s = InvitationContactAccessStateNotGranted
|
|
return nil
|
|
case InvitationContactAccessStateAvailable:
|
|
*s = InvitationContactAccessStateAvailable
|
|
return nil
|
|
case InvitationContactAccessStateClosed:
|
|
*s = InvitationContactAccessStateClosed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type InvitationDeclineComment string
|
|
|
|
// Structured reason of a decline. Every reason is neutral and none requires a comment.
|
|
//
|
|
// - salary: the salary range does not fit.
|
|
// - tasks: the role or the tasks do not fit.
|
|
// - stack: the technologies do not fit.
|
|
// - work_format: the work format or the place of work does not fit.
|
|
// - package: the package does not fit.
|
|
// - company: the company or its domain does not fit.
|
|
// - not_looking: the candidate is not looking for a job now.
|
|
// - other_offer: the candidate accepted another offer.
|
|
// - other: another reason ("Другое"); a comment stays optional.
|
|
//
|
|
// The organization never sees the reason of an individual decline: a reason such as `salary` would
|
|
// tell it that the hidden minimum is above the range. Reasons feed only the aggregates of FR12 with a
|
|
// minimum group size (planned). Adding a value is a contract change.
|
|
// Ref: #/components/schemas/InvitationDeclineReason
|
|
type InvitationDeclineReason string
|
|
|
|
const (
|
|
InvitationDeclineReasonSalary InvitationDeclineReason = "salary"
|
|
InvitationDeclineReasonTasks InvitationDeclineReason = "tasks"
|
|
InvitationDeclineReasonStack InvitationDeclineReason = "stack"
|
|
InvitationDeclineReasonWorkFormat InvitationDeclineReason = "work_format"
|
|
InvitationDeclineReasonPackage InvitationDeclineReason = "package"
|
|
InvitationDeclineReasonCompany InvitationDeclineReason = "company"
|
|
InvitationDeclineReasonNotLooking InvitationDeclineReason = "not_looking"
|
|
InvitationDeclineReasonOtherOffer InvitationDeclineReason = "other_offer"
|
|
InvitationDeclineReasonOther InvitationDeclineReason = "other"
|
|
)
|
|
|
|
// AllValues returns all InvitationDeclineReason values.
|
|
func (InvitationDeclineReason) AllValues() []InvitationDeclineReason {
|
|
return []InvitationDeclineReason{
|
|
InvitationDeclineReasonSalary,
|
|
InvitationDeclineReasonTasks,
|
|
InvitationDeclineReasonStack,
|
|
InvitationDeclineReasonWorkFormat,
|
|
InvitationDeclineReasonPackage,
|
|
InvitationDeclineReasonCompany,
|
|
InvitationDeclineReasonNotLooking,
|
|
InvitationDeclineReasonOtherOffer,
|
|
InvitationDeclineReasonOther,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationDeclineReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationDeclineReasonSalary:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonTasks:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonStack:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonWorkFormat:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonPackage:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonCompany:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonNotLooking:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonOtherOffer:
|
|
return []byte(s), nil
|
|
case InvitationDeclineReasonOther:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationDeclineReason) UnmarshalText(data []byte) error {
|
|
switch InvitationDeclineReason(data) {
|
|
case InvitationDeclineReasonSalary:
|
|
*s = InvitationDeclineReasonSalary
|
|
return nil
|
|
case InvitationDeclineReasonTasks:
|
|
*s = InvitationDeclineReasonTasks
|
|
return nil
|
|
case InvitationDeclineReasonStack:
|
|
*s = InvitationDeclineReasonStack
|
|
return nil
|
|
case InvitationDeclineReasonWorkFormat:
|
|
*s = InvitationDeclineReasonWorkFormat
|
|
return nil
|
|
case InvitationDeclineReasonPackage:
|
|
*s = InvitationDeclineReasonPackage
|
|
return nil
|
|
case InvitationDeclineReasonCompany:
|
|
*s = InvitationDeclineReasonCompany
|
|
return nil
|
|
case InvitationDeclineReasonNotLooking:
|
|
*s = InvitationDeclineReasonNotLooking
|
|
return nil
|
|
case InvitationDeclineReasonOtherOffer:
|
|
*s = InvitationDeclineReasonOtherOffer
|
|
return nil
|
|
case InvitationDeclineReasonOther:
|
|
*s = InvitationDeclineReasonOther
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The candidate's own decline, as the candidate reads it back.
|
|
// Ref: #/components/schemas/InvitationDeclineRecord
|
|
type InvitationDeclineRecord struct {
|
|
Reason InvitationDeclineReason `json:"reason"`
|
|
Comment NilInvitationDeclineComment `json:"comment"`
|
|
DeclinedAt Timestamp `json:"declined_at"`
|
|
}
|
|
|
|
// GetReason returns the value of Reason.
|
|
func (s *InvitationDeclineRecord) GetReason() InvitationDeclineReason {
|
|
return s.Reason
|
|
}
|
|
|
|
// GetComment returns the value of Comment.
|
|
func (s *InvitationDeclineRecord) GetComment() NilInvitationDeclineComment {
|
|
return s.Comment
|
|
}
|
|
|
|
// GetDeclinedAt returns the value of DeclinedAt.
|
|
func (s *InvitationDeclineRecord) GetDeclinedAt() Timestamp {
|
|
return s.DeclinedAt
|
|
}
|
|
|
|
// SetReason sets the value of Reason.
|
|
func (s *InvitationDeclineRecord) SetReason(val InvitationDeclineReason) {
|
|
s.Reason = val
|
|
}
|
|
|
|
// SetComment sets the value of Comment.
|
|
func (s *InvitationDeclineRecord) SetComment(val NilInvitationDeclineComment) {
|
|
s.Comment = val
|
|
}
|
|
|
|
// SetDeclinedAt sets the value of DeclinedAt.
|
|
func (s *InvitationDeclineRecord) SetDeclinedAt(val Timestamp) {
|
|
s.DeclinedAt = val
|
|
}
|
|
|
|
// Structured decline: a reason and an optional comment. Unknown fields are rejected.
|
|
// Ref: #/components/schemas/InvitationDeclineRequest
|
|
type InvitationDeclineRequest struct {
|
|
ExpectedVersion InvitationVersion `json:"expected_version"`
|
|
Reason InvitationDeclineReason `json:"reason"`
|
|
// Optional comment for any reason, including `other`; absent or null means none.
|
|
Comment OptNilInvitationDeclineComment `json:"comment"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *InvitationDeclineRequest) GetExpectedVersion() InvitationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetReason returns the value of Reason.
|
|
func (s *InvitationDeclineRequest) GetReason() InvitationDeclineReason {
|
|
return s.Reason
|
|
}
|
|
|
|
// GetComment returns the value of Comment.
|
|
func (s *InvitationDeclineRequest) GetComment() OptNilInvitationDeclineComment {
|
|
return s.Comment
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *InvitationDeclineRequest) SetExpectedVersion(val InvitationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetReason sets the value of Reason.
|
|
func (s *InvitationDeclineRequest) SetReason(val InvitationDeclineReason) {
|
|
s.Reason = val
|
|
}
|
|
|
|
// SetComment sets the value of Comment.
|
|
func (s *InvitationDeclineRequest) SetComment(val OptNilInvitationDeclineComment) {
|
|
s.Comment = val
|
|
}
|
|
|
|
// Why an invitation expired. Set exactly when the state is `expired`, null otherwise.
|
|
//
|
|
// - invitation_timeout: the candidate did not answer by `response_deadline_at`. No grant is created.
|
|
// - negotiation_timeout: planned; the sealed final of FR13 closed without both bids. No MVP operation
|
|
// produces it.
|
|
//
|
|
// Ref: #/components/schemas/InvitationExpiryReason
|
|
type InvitationExpiryReason string
|
|
|
|
const (
|
|
InvitationExpiryReasonInvitationTimeout InvitationExpiryReason = "invitation_timeout"
|
|
InvitationExpiryReasonNegotiationTimeout InvitationExpiryReason = "negotiation_timeout"
|
|
)
|
|
|
|
// AllValues returns all InvitationExpiryReason values.
|
|
func (InvitationExpiryReason) AllValues() []InvitationExpiryReason {
|
|
return []InvitationExpiryReason{
|
|
InvitationExpiryReasonInvitationTimeout,
|
|
InvitationExpiryReasonNegotiationTimeout,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationExpiryReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationExpiryReasonInvitationTimeout:
|
|
return []byte(s), nil
|
|
case InvitationExpiryReasonNegotiationTimeout:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationExpiryReason) UnmarshalText(data []byte) error {
|
|
switch InvitationExpiryReason(data) {
|
|
case InvitationExpiryReasonInvitationTimeout:
|
|
*s = InvitationExpiryReasonInvitationTimeout
|
|
return nil
|
|
case InvitationExpiryReasonNegotiationTimeout:
|
|
*s = InvitationExpiryReasonNegotiationTimeout
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Need of the same organization that the invitation was built from, with the requirements version
|
|
// used. A direct invitation has no need. The link is informational: the invitation keeps its own
|
|
// terms, which may differ from the need, and a later change of the need never changes them.
|
|
// Ref: #/components/schemas/InvitationNeedReference
|
|
type InvitationNeedReference struct {
|
|
// Identifier of a need of the organization in the path.
|
|
NeedID uuid.UUID `json:"need_id"`
|
|
// `requirements_version` of the need that the invitation refers to; it must be a version that the need
|
|
// has had.
|
|
RequirementsVersion NeedVersion `json:"requirements_version"`
|
|
}
|
|
|
|
// GetNeedID returns the value of NeedID.
|
|
func (s *InvitationNeedReference) GetNeedID() uuid.UUID {
|
|
return s.NeedID
|
|
}
|
|
|
|
// GetRequirementsVersion returns the value of RequirementsVersion.
|
|
func (s *InvitationNeedReference) GetRequirementsVersion() NeedVersion {
|
|
return s.RequirementsVersion
|
|
}
|
|
|
|
// SetNeedID sets the value of NeedID.
|
|
func (s *InvitationNeedReference) SetNeedID(val uuid.UUID) {
|
|
s.NeedID = val
|
|
}
|
|
|
|
// SetRequirementsVersion sets the value of RequirementsVersion.
|
|
func (s *InvitationNeedReference) SetRequirementsVersion(val NeedVersion) {
|
|
s.RequirementsVersion = val
|
|
}
|
|
|
|
// Type of the offer.
|
|
//
|
|
// - full_time: employment with a full working week.
|
|
// - part_time: employment with a part-time working week.
|
|
// - contract: a fixed-term or project contract outside employment.
|
|
// - internship: an internship.
|
|
//
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/InvitationOfferType
|
|
type InvitationOfferType string
|
|
|
|
const (
|
|
InvitationOfferTypeFullTime InvitationOfferType = "full_time"
|
|
InvitationOfferTypePartTime InvitationOfferType = "part_time"
|
|
InvitationOfferTypeContract InvitationOfferType = "contract"
|
|
InvitationOfferTypeInternship InvitationOfferType = "internship"
|
|
)
|
|
|
|
// AllValues returns all InvitationOfferType values.
|
|
func (InvitationOfferType) AllValues() []InvitationOfferType {
|
|
return []InvitationOfferType{
|
|
InvitationOfferTypeFullTime,
|
|
InvitationOfferTypePartTime,
|
|
InvitationOfferTypeContract,
|
|
InvitationOfferTypeInternship,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationOfferType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationOfferTypeFullTime:
|
|
return []byte(s), nil
|
|
case InvitationOfferTypePartTime:
|
|
return []byte(s), nil
|
|
case InvitationOfferTypeContract:
|
|
return []byte(s), nil
|
|
case InvitationOfferTypeInternship:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationOfferType) UnmarshalText(data []byte) error {
|
|
switch InvitationOfferType(data) {
|
|
case InvitationOfferTypeFullTime:
|
|
*s = InvitationOfferTypeFullTime
|
|
return nil
|
|
case InvitationOfferTypePartTime:
|
|
*s = InvitationOfferTypePartTime
|
|
return nil
|
|
case InvitationOfferTypeContract:
|
|
*s = InvitationOfferTypeContract
|
|
return nil
|
|
case InvitationOfferTypeInternship:
|
|
*s = InvitationOfferTypeInternship
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Organization that sent the invitation, as the candidate sees it before deciding. The card that a
|
|
// candidate sees is `CandidateOrganizationCard` of the organization contract; returning it with the
|
|
// invitation is planned as an additive field, and this object only names the organization.
|
|
// Ref: #/components/schemas/InvitationOrganization
|
|
type InvitationOrganization struct {
|
|
// Identifier of the organization.
|
|
ID uuid.UUID `json:"id"`
|
|
// Public name of the organization. Plain text; clients show it as text, never as HTML.
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *InvitationOrganization) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *InvitationOrganization) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *InvitationOrganization) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *InvitationOrganization) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// Required section of the package (PRD FR12): the bonus, the equipment, the training, and the
|
|
// voluntary health insurance (ДМС). Every field is required and is either provided with a
|
|
// description or explicitly not provided. The work format of the package is the required
|
|
// `work_formats` term, which has no "not provided" variant. Adding a required condition is a breaking
|
|
// change; an optional one is additive.
|
|
// Ref: #/components/schemas/InvitationPackage
|
|
type InvitationPackage struct {
|
|
Bonus InvitationPackageItem `json:"bonus"`
|
|
Equipment InvitationPackageItem `json:"equipment"`
|
|
Training InvitationPackageItem `json:"training"`
|
|
HealthInsurance InvitationPackageItem `json:"health_insurance"`
|
|
}
|
|
|
|
// GetBonus returns the value of Bonus.
|
|
func (s *InvitationPackage) GetBonus() InvitationPackageItem {
|
|
return s.Bonus
|
|
}
|
|
|
|
// GetEquipment returns the value of Equipment.
|
|
func (s *InvitationPackage) GetEquipment() InvitationPackageItem {
|
|
return s.Equipment
|
|
}
|
|
|
|
// GetTraining returns the value of Training.
|
|
func (s *InvitationPackage) GetTraining() InvitationPackageItem {
|
|
return s.Training
|
|
}
|
|
|
|
// GetHealthInsurance returns the value of HealthInsurance.
|
|
func (s *InvitationPackage) GetHealthInsurance() InvitationPackageItem {
|
|
return s.HealthInsurance
|
|
}
|
|
|
|
// SetBonus sets the value of Bonus.
|
|
func (s *InvitationPackage) SetBonus(val InvitationPackageItem) {
|
|
s.Bonus = val
|
|
}
|
|
|
|
// SetEquipment sets the value of Equipment.
|
|
func (s *InvitationPackage) SetEquipment(val InvitationPackageItem) {
|
|
s.Equipment = val
|
|
}
|
|
|
|
// SetTraining sets the value of Training.
|
|
func (s *InvitationPackage) SetTraining(val InvitationPackageItem) {
|
|
s.Training = val
|
|
}
|
|
|
|
// SetHealthInsurance sets the value of HealthInsurance.
|
|
func (s *InvitationPackage) SetHealthInsurance(val InvitationPackageItem) {
|
|
s.HealthInsurance = val
|
|
}
|
|
|
|
// One required condition of the package, selected by `status`: `provided` with a description, or
|
|
// `not_provided` without one. Not providing a condition is an explicit choice: the field is required
|
|
// in the package, so an absent field fails validation instead of meaning "not provided": it answers
|
|
// 400 `required` with its pointer, such as `/terms/package/training`. A `provided` item without a
|
|
// description answers `required` with the pointer of the description, and a `not_provided` item with a
|
|
// description answers `invalid` with the pointer of the item. ogen selects the variant by the value of
|
|
// `status`.
|
|
// Ref: #/components/schemas/InvitationPackageItem
|
|
// InvitationPackageItem represents sum type.
|
|
type InvitationPackageItem struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type InvitationPackageItemType
|
|
InvitationPackageItemProvided InvitationPackageItemProvided
|
|
InvitationPackageItemNotProvided InvitationPackageItemNotProvided
|
|
}
|
|
|
|
// InvitationPackageItemType is oneOf type of InvitationPackageItem.
|
|
type InvitationPackageItemType string
|
|
|
|
// Possible values for InvitationPackageItemType.
|
|
const (
|
|
InvitationPackageItemProvidedInvitationPackageItem InvitationPackageItemType = "InvitationPackageItemProvided"
|
|
InvitationPackageItemNotProvidedInvitationPackageItem InvitationPackageItemType = "InvitationPackageItemNotProvided"
|
|
)
|
|
|
|
// IsInvitationPackageItemProvided reports whether InvitationPackageItem is InvitationPackageItemProvided.
|
|
func (s InvitationPackageItem) IsInvitationPackageItemProvided() bool {
|
|
return s.Type == InvitationPackageItemProvidedInvitationPackageItem
|
|
}
|
|
|
|
// IsInvitationPackageItemNotProvided reports whether InvitationPackageItem is InvitationPackageItemNotProvided.
|
|
func (s InvitationPackageItem) IsInvitationPackageItemNotProvided() bool {
|
|
return s.Type == InvitationPackageItemNotProvidedInvitationPackageItem
|
|
}
|
|
|
|
// SetInvitationPackageItemProvided sets InvitationPackageItem to InvitationPackageItemProvided.
|
|
func (s *InvitationPackageItem) SetInvitationPackageItemProvided(v InvitationPackageItemProvided) {
|
|
s.Type = InvitationPackageItemProvidedInvitationPackageItem
|
|
s.InvitationPackageItemProvided = v
|
|
}
|
|
|
|
// GetInvitationPackageItemProvided returns InvitationPackageItemProvided and true boolean if InvitationPackageItem is InvitationPackageItemProvided.
|
|
func (s InvitationPackageItem) GetInvitationPackageItemProvided() (v InvitationPackageItemProvided, ok bool) {
|
|
if !s.IsInvitationPackageItemProvided() {
|
|
return v, false
|
|
}
|
|
return s.InvitationPackageItemProvided, true
|
|
}
|
|
|
|
// NewInvitationPackageItemProvidedInvitationPackageItem returns new InvitationPackageItem from InvitationPackageItemProvided.
|
|
func NewInvitationPackageItemProvidedInvitationPackageItem(v InvitationPackageItemProvided) InvitationPackageItem {
|
|
var s InvitationPackageItem
|
|
s.SetInvitationPackageItemProvided(v)
|
|
return s
|
|
}
|
|
|
|
// SetInvitationPackageItemNotProvided sets InvitationPackageItem to InvitationPackageItemNotProvided.
|
|
func (s *InvitationPackageItem) SetInvitationPackageItemNotProvided(v InvitationPackageItemNotProvided) {
|
|
s.Type = InvitationPackageItemNotProvidedInvitationPackageItem
|
|
s.InvitationPackageItemNotProvided = v
|
|
}
|
|
|
|
// GetInvitationPackageItemNotProvided returns InvitationPackageItemNotProvided and true boolean if InvitationPackageItem is InvitationPackageItemNotProvided.
|
|
func (s InvitationPackageItem) GetInvitationPackageItemNotProvided() (v InvitationPackageItemNotProvided, ok bool) {
|
|
if !s.IsInvitationPackageItemNotProvided() {
|
|
return v, false
|
|
}
|
|
return s.InvitationPackageItemNotProvided, true
|
|
}
|
|
|
|
// NewInvitationPackageItemNotProvidedInvitationPackageItem returns new InvitationPackageItem from InvitationPackageItemNotProvided.
|
|
func NewInvitationPackageItemNotProvidedInvitationPackageItem(v InvitationPackageItemNotProvided) InvitationPackageItem {
|
|
var s InvitationPackageItem
|
|
s.SetInvitationPackageItemNotProvided(v)
|
|
return s
|
|
}
|
|
|
|
// The organization states explicitly that the offer does not include the condition ("Не
|
|
// предусмотрено" in the interface). It has no description.
|
|
// Ref: #/components/schemas/InvitationPackageItemNotProvided
|
|
type InvitationPackageItemNotProvided struct {
|
|
Status InvitationPackageItemNotProvidedStatus `json:"status"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *InvitationPackageItemNotProvided) GetStatus() InvitationPackageItemNotProvidedStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *InvitationPackageItemNotProvided) SetStatus(val InvitationPackageItemNotProvidedStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type InvitationPackageItemNotProvidedStatus string
|
|
|
|
const (
|
|
InvitationPackageItemNotProvidedStatusNotProvided InvitationPackageItemNotProvidedStatus = "not_provided"
|
|
)
|
|
|
|
// AllValues returns all InvitationPackageItemNotProvidedStatus values.
|
|
func (InvitationPackageItemNotProvidedStatus) AllValues() []InvitationPackageItemNotProvidedStatus {
|
|
return []InvitationPackageItemNotProvidedStatus{
|
|
InvitationPackageItemNotProvidedStatusNotProvided,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationPackageItemNotProvidedStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationPackageItemNotProvidedStatusNotProvided:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationPackageItemNotProvidedStatus) UnmarshalText(data []byte) error {
|
|
switch InvitationPackageItemNotProvidedStatus(data) {
|
|
case InvitationPackageItemNotProvidedStatusNotProvided:
|
|
*s = InvitationPackageItemNotProvidedStatusNotProvided
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The condition is part of the offer, with its description.
|
|
// Ref: #/components/schemas/InvitationPackageItemProvided
|
|
type InvitationPackageItemProvided struct {
|
|
Status InvitationPackageItemProvidedStatus `json:"status"`
|
|
Description InvitationPackageItemText `json:"description"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *InvitationPackageItemProvided) GetStatus() InvitationPackageItemProvidedStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *InvitationPackageItemProvided) GetDescription() InvitationPackageItemText {
|
|
return s.Description
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *InvitationPackageItemProvided) SetStatus(val InvitationPackageItemProvidedStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *InvitationPackageItemProvided) SetDescription(val InvitationPackageItemText) {
|
|
s.Description = val
|
|
}
|
|
|
|
type InvitationPackageItemProvidedStatus string
|
|
|
|
const (
|
|
InvitationPackageItemProvidedStatusProvided InvitationPackageItemProvidedStatus = "provided"
|
|
)
|
|
|
|
// AllValues returns all InvitationPackageItemProvidedStatus values.
|
|
func (InvitationPackageItemProvidedStatus) AllValues() []InvitationPackageItemProvidedStatus {
|
|
return []InvitationPackageItemProvidedStatus{
|
|
InvitationPackageItemProvidedStatusProvided,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationPackageItemProvidedStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationPackageItemProvidedStatusProvided:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationPackageItemProvidedStatus) UnmarshalText(data []byte) error {
|
|
switch InvitationPackageItemProvidedStatus(data) {
|
|
case InvitationPackageItemProvidedStatusProvided:
|
|
*s = InvitationPackageItemProvidedStatusProvided
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type InvitationPackageItemText string
|
|
|
|
// Days the candidate has to answer, chosen by the organization in the draft from the product policy:
|
|
// 3, 7, or 14. The deadline starts at the first delivery and is never reset by an email, a view, or a
|
|
// counter offer.
|
|
// Ref: #/components/schemas/InvitationResponsePeriod
|
|
type InvitationResponsePeriod int32
|
|
|
|
const (
|
|
InvitationResponsePeriod3 InvitationResponsePeriod = 3
|
|
InvitationResponsePeriod7 InvitationResponsePeriod = 7
|
|
InvitationResponsePeriod14 InvitationResponsePeriod = 14
|
|
)
|
|
|
|
// AllValues returns all InvitationResponsePeriod values.
|
|
func (InvitationResponsePeriod) AllValues() []InvitationResponsePeriod {
|
|
return []InvitationResponsePeriod{
|
|
InvitationResponsePeriod3,
|
|
InvitationResponsePeriod7,
|
|
InvitationResponsePeriod14,
|
|
}
|
|
}
|
|
|
|
type InvitationRoleTitle string
|
|
|
|
// Coarse indicator for the organization of how the salary range relates to the candidate's hidden
|
|
// minimum (PRD FR13). It is the only information about the minimum that the organization receives; the
|
|
// exact minimum never appears in any response, log, or problem. The server compares the upper bound
|
|
// `B` with the lowest minimum the candidate set for the offered work formats, in integer arithmetic
|
|
// and only in the same tax basis.
|
|
//
|
|
// - within_range: the minimum is not above `B`.
|
|
// - up_to_10_percent_above: the minimum is above `B` by at most 10%, that is
|
|
// `10 * minimum <= 11 * B`.
|
|
// - above: the minimum is more than 10% above `B`.
|
|
// - withheld: the organization made five indicator-relevant settings within seven days, so the
|
|
// indicator is off for seven days from the fifth. The response to the fifth setting already carries
|
|
// `withheld`, and so does every draft and invitation of the organization, existing ones included,
|
|
// until the period ends.
|
|
// - not_available: the candidate set no minimum for the offered formats, or set it in the other tax
|
|
// basis.
|
|
//
|
|
// Every change that can move this indicator is an indicator-relevant setting: the range set on
|
|
// creation, and in a draft a change of either bound, of the tax basis, or of `work_formats`, since the
|
|
// minimum depends on the format. Each counts against the organization-wide limit of three settings a
|
|
// day (429) and against the withheld counter of five settings within seven days, together with the
|
|
// ranges of needs. The one raise of the upper bound of a sent invitation counts against the withheld
|
|
// counter but not against the daily limit, because FR13 gives it its own once-only rule. Switching the
|
|
// tax basis turns `not_available` into a band or back and so tells the organization the basis of the
|
|
// minimum; this is accepted, and the switch counts against the limit like any other setting.
|
|
//
|
|
// The server never rejects or changes a range because of the minimum: a rejection would itself reveal
|
|
// it.
|
|
// Ref: #/components/schemas/InvitationSalaryFit
|
|
type InvitationSalaryFit string
|
|
|
|
const (
|
|
InvitationSalaryFitWithinRange InvitationSalaryFit = "within_range"
|
|
InvitationSalaryFitUpTo10PercentAbove InvitationSalaryFit = "up_to_10_percent_above"
|
|
InvitationSalaryFitAbove InvitationSalaryFit = "above"
|
|
InvitationSalaryFitWithheld InvitationSalaryFit = "withheld"
|
|
InvitationSalaryFitNotAvailable InvitationSalaryFit = "not_available"
|
|
)
|
|
|
|
// AllValues returns all InvitationSalaryFit values.
|
|
func (InvitationSalaryFit) AllValues() []InvitationSalaryFit {
|
|
return []InvitationSalaryFit{
|
|
InvitationSalaryFitWithinRange,
|
|
InvitationSalaryFitUpTo10PercentAbove,
|
|
InvitationSalaryFitAbove,
|
|
InvitationSalaryFitWithheld,
|
|
InvitationSalaryFitNotAvailable,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationSalaryFit) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationSalaryFitWithinRange:
|
|
return []byte(s), nil
|
|
case InvitationSalaryFitUpTo10PercentAbove:
|
|
return []byte(s), nil
|
|
case InvitationSalaryFitAbove:
|
|
return []byte(s), nil
|
|
case InvitationSalaryFitWithheld:
|
|
return []byte(s), nil
|
|
case InvitationSalaryFitNotAvailable:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationSalaryFit) UnmarshalText(data []byte) error {
|
|
switch InvitationSalaryFit(data) {
|
|
case InvitationSalaryFitWithinRange:
|
|
*s = InvitationSalaryFitWithinRange
|
|
return nil
|
|
case InvitationSalaryFitUpTo10PercentAbove:
|
|
*s = InvitationSalaryFitUpTo10PercentAbove
|
|
return nil
|
|
case InvitationSalaryFitAbove:
|
|
*s = InvitationSalaryFitAbove
|
|
return nil
|
|
case InvitationSalaryFitWithheld:
|
|
*s = InvitationSalaryFitWithheld
|
|
return nil
|
|
case InvitationSalaryFitNotAvailable:
|
|
*s = InvitationSalaryFitNotAvailable
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The one raise of the upper salary bound of a sent invitation (PRD FR13). Only `salary_to` changes;
|
|
// the lower bound, the currency, the period, and the tax basis stay fixed. Unknown fields are
|
|
// rejected, so the request cannot lower the lower bound or change the basis.
|
|
// Ref: #/components/schemas/InvitationSalaryRaise
|
|
type InvitationSalaryRaise struct {
|
|
ExpectedVersion InvitationVersion `json:"expected_version"`
|
|
// New upper bound, above the current one, with a width of the range from 10% to 40% of its midpoint.
|
|
SalaryTo RubAmount `json:"salary_to"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *InvitationSalaryRaise) GetExpectedVersion() InvitationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetSalaryTo returns the value of SalaryTo.
|
|
func (s *InvitationSalaryRaise) GetSalaryTo() RubAmount {
|
|
return s.SalaryTo
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *InvitationSalaryRaise) SetExpectedVersion(val InvitationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetSalaryTo sets the value of SalaryTo.
|
|
func (s *InvitationSalaryRaise) SetSalaryTo(val RubAmount) {
|
|
s.SalaryTo = val
|
|
}
|
|
|
|
// State of an invitation (PRD FR12). The internal sending step is never visible: a successful send
|
|
// already answers with `delivered`.
|
|
//
|
|
// - draft: the organization prepares the terms. The candidate does not see the invitation.
|
|
// - delivered: the invitation is in the candidate's inbox and the response deadline runs.
|
|
// - viewed: the candidate opened the terms; ViewMyInvitation records it. The deadline is unchanged.
|
|
// - counter: planned; the candidate sent the one counter offer. No MVP operation produces it.
|
|
// - accepted: the candidate accepted the current terms version and gave the consent C4; the contact
|
|
// grant exists.
|
|
// - interview_scheduled, interviewed, negotiation, terms_agreed, no_deal: planned stages after an
|
|
// acceptance (interview and the sealed final of FR13). No MVP operation produces them.
|
|
// - declined: terminal; the candidate declined with a structured reason. No access arises.
|
|
// - expired: terminal; a server deadline passed, see `expiry_reason`. No access arises.
|
|
// - withdrawn: terminal; the organization withdrew the invitation. A grant that already exists is not
|
|
// revoked by it.
|
|
// - cancelled_by_candidate: terminal; the candidate cancelled the participation. The grant of this
|
|
// invitation is revoked.
|
|
//
|
|
// Planned states are listed now so that generated clients accept them when their operations arrive.
|
|
// Adding another value is a contract change.
|
|
// Ref: #/components/schemas/InvitationState
|
|
type InvitationState string
|
|
|
|
const (
|
|
InvitationStateDraft InvitationState = "draft"
|
|
InvitationStateDelivered InvitationState = "delivered"
|
|
InvitationStateViewed InvitationState = "viewed"
|
|
InvitationStateCounter InvitationState = "counter"
|
|
InvitationStateAccepted InvitationState = "accepted"
|
|
InvitationStateInterviewScheduled InvitationState = "interview_scheduled"
|
|
InvitationStateInterviewed InvitationState = "interviewed"
|
|
InvitationStateNegotiation InvitationState = "negotiation"
|
|
InvitationStateTermsAgreed InvitationState = "terms_agreed"
|
|
InvitationStateNoDeal InvitationState = "no_deal"
|
|
InvitationStateDeclined InvitationState = "declined"
|
|
InvitationStateExpired InvitationState = "expired"
|
|
InvitationStateWithdrawn InvitationState = "withdrawn"
|
|
InvitationStateCancelledByCandidate InvitationState = "cancelled_by_candidate"
|
|
)
|
|
|
|
// AllValues returns all InvitationState values.
|
|
func (InvitationState) AllValues() []InvitationState {
|
|
return []InvitationState{
|
|
InvitationStateDraft,
|
|
InvitationStateDelivered,
|
|
InvitationStateViewed,
|
|
InvitationStateCounter,
|
|
InvitationStateAccepted,
|
|
InvitationStateInterviewScheduled,
|
|
InvitationStateInterviewed,
|
|
InvitationStateNegotiation,
|
|
InvitationStateTermsAgreed,
|
|
InvitationStateNoDeal,
|
|
InvitationStateDeclined,
|
|
InvitationStateExpired,
|
|
InvitationStateWithdrawn,
|
|
InvitationStateCancelledByCandidate,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s InvitationState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case InvitationStateDraft:
|
|
return []byte(s), nil
|
|
case InvitationStateDelivered:
|
|
return []byte(s), nil
|
|
case InvitationStateViewed:
|
|
return []byte(s), nil
|
|
case InvitationStateCounter:
|
|
return []byte(s), nil
|
|
case InvitationStateAccepted:
|
|
return []byte(s), nil
|
|
case InvitationStateInterviewScheduled:
|
|
return []byte(s), nil
|
|
case InvitationStateInterviewed:
|
|
return []byte(s), nil
|
|
case InvitationStateNegotiation:
|
|
return []byte(s), nil
|
|
case InvitationStateTermsAgreed:
|
|
return []byte(s), nil
|
|
case InvitationStateNoDeal:
|
|
return []byte(s), nil
|
|
case InvitationStateDeclined:
|
|
return []byte(s), nil
|
|
case InvitationStateExpired:
|
|
return []byte(s), nil
|
|
case InvitationStateWithdrawn:
|
|
return []byte(s), nil
|
|
case InvitationStateCancelledByCandidate:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *InvitationState) UnmarshalText(data []byte) error {
|
|
switch InvitationState(data) {
|
|
case InvitationStateDraft:
|
|
*s = InvitationStateDraft
|
|
return nil
|
|
case InvitationStateDelivered:
|
|
*s = InvitationStateDelivered
|
|
return nil
|
|
case InvitationStateViewed:
|
|
*s = InvitationStateViewed
|
|
return nil
|
|
case InvitationStateCounter:
|
|
*s = InvitationStateCounter
|
|
return nil
|
|
case InvitationStateAccepted:
|
|
*s = InvitationStateAccepted
|
|
return nil
|
|
case InvitationStateInterviewScheduled:
|
|
*s = InvitationStateInterviewScheduled
|
|
return nil
|
|
case InvitationStateInterviewed:
|
|
*s = InvitationStateInterviewed
|
|
return nil
|
|
case InvitationStateNegotiation:
|
|
*s = InvitationStateNegotiation
|
|
return nil
|
|
case InvitationStateTermsAgreed:
|
|
*s = InvitationStateTermsAgreed
|
|
return nil
|
|
case InvitationStateNoDeal:
|
|
*s = InvitationStateNoDeal
|
|
return nil
|
|
case InvitationStateDeclined:
|
|
*s = InvitationStateDeclined
|
|
return nil
|
|
case InvitationStateExpired:
|
|
*s = InvitationStateExpired
|
|
return nil
|
|
case InvitationStateWithdrawn:
|
|
*s = InvitationStateWithdrawn
|
|
return nil
|
|
case InvitationStateCancelledByCandidate:
|
|
*s = InvitationStateCancelledByCandidate
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type InvitationTeamDescription string
|
|
|
|
// Terms of an invitation: everything the candidate sees before deciding and before any contact is
|
|
// disclosed. The same schema is the request field of a draft and the stored snapshot of a terms
|
|
// version, so a response can be sent back unchanged. Every field is required; a field that may have no
|
|
// value says so with an explicit variant (`location` null for a remote role, a package item
|
|
// `not_provided`). The terms never contain data of the candidate: no contact, no salary minimum, and
|
|
// no indicator derived from it. The server checks the cross-field rules after the schema and answers
|
|
// 400 validation_failed with the pointer of the field: the salary rules of SalaryRange with
|
|
// `/terms/salary/salary_to`, a missing place of work for the `office` or `hybrid` format with
|
|
// `/terms/location`, and a repeated technology in `tech_stack` with the pointer of the later item.
|
|
// Ref: #/components/schemas/InvitationTerms
|
|
type InvitationTerms struct {
|
|
RoleTitle InvitationRoleTitle `json:"role_title"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
Grade GradeCode `json:"grade"`
|
|
OfferType InvitationOfferType `json:"offer_type"`
|
|
// Work tasks of the role in the order given.
|
|
Tasks []NeedTaskText `json:"tasks"`
|
|
Team InvitationTeamDescription `json:"team"`
|
|
// Technologies of the role. The server compares names without regard to letter case.
|
|
TechStack []SkillName `json:"tech_stack"`
|
|
// Work formats the organization offers; the candidate may choose any of them.
|
|
WorkFormats []WorkFormat `json:"work_formats"`
|
|
// Place of work for the `office` or `hybrid` format, or null when the only format is `remote`. It is
|
|
// required with either of those formats.
|
|
Location NilNeedLocationName `json:"location"`
|
|
CommunicationMethod InvitationCommunicationMethod `json:"communication_method"`
|
|
Salary SalaryRange `json:"salary"`
|
|
Package InvitationPackage `json:"package"`
|
|
}
|
|
|
|
// GetRoleTitle returns the value of RoleTitle.
|
|
func (s *InvitationTerms) GetRoleTitle() InvitationRoleTitle {
|
|
return s.RoleTitle
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *InvitationTerms) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *InvitationTerms) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetOfferType returns the value of OfferType.
|
|
func (s *InvitationTerms) GetOfferType() InvitationOfferType {
|
|
return s.OfferType
|
|
}
|
|
|
|
// GetTasks returns the value of Tasks.
|
|
func (s *InvitationTerms) GetTasks() []NeedTaskText {
|
|
return s.Tasks
|
|
}
|
|
|
|
// GetTeam returns the value of Team.
|
|
func (s *InvitationTerms) GetTeam() InvitationTeamDescription {
|
|
return s.Team
|
|
}
|
|
|
|
// GetTechStack returns the value of TechStack.
|
|
func (s *InvitationTerms) GetTechStack() []SkillName {
|
|
return s.TechStack
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *InvitationTerms) GetWorkFormats() []WorkFormat {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *InvitationTerms) GetLocation() NilNeedLocationName {
|
|
return s.Location
|
|
}
|
|
|
|
// GetCommunicationMethod returns the value of CommunicationMethod.
|
|
func (s *InvitationTerms) GetCommunicationMethod() InvitationCommunicationMethod {
|
|
return s.CommunicationMethod
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *InvitationTerms) GetSalary() SalaryRange {
|
|
return s.Salary
|
|
}
|
|
|
|
// GetPackage returns the value of Package.
|
|
func (s *InvitationTerms) GetPackage() InvitationPackage {
|
|
return s.Package
|
|
}
|
|
|
|
// SetRoleTitle sets the value of RoleTitle.
|
|
func (s *InvitationTerms) SetRoleTitle(val InvitationRoleTitle) {
|
|
s.RoleTitle = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *InvitationTerms) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *InvitationTerms) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetOfferType sets the value of OfferType.
|
|
func (s *InvitationTerms) SetOfferType(val InvitationOfferType) {
|
|
s.OfferType = val
|
|
}
|
|
|
|
// SetTasks sets the value of Tasks.
|
|
func (s *InvitationTerms) SetTasks(val []NeedTaskText) {
|
|
s.Tasks = val
|
|
}
|
|
|
|
// SetTeam sets the value of Team.
|
|
func (s *InvitationTerms) SetTeam(val InvitationTeamDescription) {
|
|
s.Team = val
|
|
}
|
|
|
|
// SetTechStack sets the value of TechStack.
|
|
func (s *InvitationTerms) SetTechStack(val []SkillName) {
|
|
s.TechStack = val
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *InvitationTerms) SetWorkFormats(val []WorkFormat) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *InvitationTerms) SetLocation(val NilNeedLocationName) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetCommunicationMethod sets the value of CommunicationMethod.
|
|
func (s *InvitationTerms) SetCommunicationMethod(val InvitationCommunicationMethod) {
|
|
s.CommunicationMethod = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *InvitationTerms) SetSalary(val SalaryRange) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// SetPackage sets the value of Package.
|
|
func (s *InvitationTerms) SetPackage(val InvitationPackage) {
|
|
s.Package = val
|
|
}
|
|
|
|
type InvitationTermsVersion int64
|
|
|
|
type InvitationVersion int64
|
|
|
|
// Format-specific part of an item, selected by `format`. It holds only what the candidate needs to
|
|
// answer: never an answer key, a correct option, a score, a family or variant identifier, a seed, or a
|
|
// hidden check. Limits such as `multiple`, `max_selections`, and `max_length` belong to the format or
|
|
// the task family and never reveal the key.
|
|
// Ref: #/components/schemas/ItemContent
|
|
// ItemContent represents sum type.
|
|
type ItemContent struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type ItemContentType
|
|
ChoiceItemContent ChoiceItemContent
|
|
NumberItemContent NumberItemContent
|
|
StringItemContent StringItemContent
|
|
OrderItemContent OrderItemContent
|
|
FindErrorItemContent FindErrorItemContent
|
|
ConfigurationItemContent ConfigurationItemContent
|
|
PracticeItemContent PracticeItemContent
|
|
}
|
|
|
|
// ItemContentType is oneOf type of ItemContent.
|
|
type ItemContentType string
|
|
|
|
// Possible values for ItemContentType.
|
|
const (
|
|
ChoiceItemContentItemContent ItemContentType = "ChoiceItemContent"
|
|
NumberItemContentItemContent ItemContentType = "NumberItemContent"
|
|
StringItemContentItemContent ItemContentType = "StringItemContent"
|
|
OrderItemContentItemContent ItemContentType = "OrderItemContent"
|
|
FindErrorItemContentItemContent ItemContentType = "FindErrorItemContent"
|
|
ConfigurationItemContentItemContent ItemContentType = "ConfigurationItemContent"
|
|
PracticeItemContentItemContent ItemContentType = "PracticeItemContent"
|
|
)
|
|
|
|
// IsChoiceItemContent reports whether ItemContent is ChoiceItemContent.
|
|
func (s ItemContent) IsChoiceItemContent() bool { return s.Type == ChoiceItemContentItemContent }
|
|
|
|
// IsNumberItemContent reports whether ItemContent is NumberItemContent.
|
|
func (s ItemContent) IsNumberItemContent() bool { return s.Type == NumberItemContentItemContent }
|
|
|
|
// IsStringItemContent reports whether ItemContent is StringItemContent.
|
|
func (s ItemContent) IsStringItemContent() bool { return s.Type == StringItemContentItemContent }
|
|
|
|
// IsOrderItemContent reports whether ItemContent is OrderItemContent.
|
|
func (s ItemContent) IsOrderItemContent() bool { return s.Type == OrderItemContentItemContent }
|
|
|
|
// IsFindErrorItemContent reports whether ItemContent is FindErrorItemContent.
|
|
func (s ItemContent) IsFindErrorItemContent() bool { return s.Type == FindErrorItemContentItemContent }
|
|
|
|
// IsConfigurationItemContent reports whether ItemContent is ConfigurationItemContent.
|
|
func (s ItemContent) IsConfigurationItemContent() bool {
|
|
return s.Type == ConfigurationItemContentItemContent
|
|
}
|
|
|
|
// IsPracticeItemContent reports whether ItemContent is PracticeItemContent.
|
|
func (s ItemContent) IsPracticeItemContent() bool { return s.Type == PracticeItemContentItemContent }
|
|
|
|
// SetChoiceItemContent sets ItemContent to ChoiceItemContent.
|
|
func (s *ItemContent) SetChoiceItemContent(v ChoiceItemContent) {
|
|
s.Type = ChoiceItemContentItemContent
|
|
s.ChoiceItemContent = v
|
|
}
|
|
|
|
// GetChoiceItemContent returns ChoiceItemContent and true boolean if ItemContent is ChoiceItemContent.
|
|
func (s ItemContent) GetChoiceItemContent() (v ChoiceItemContent, ok bool) {
|
|
if !s.IsChoiceItemContent() {
|
|
return v, false
|
|
}
|
|
return s.ChoiceItemContent, true
|
|
}
|
|
|
|
// NewChoiceItemContentItemContent returns new ItemContent from ChoiceItemContent.
|
|
func NewChoiceItemContentItemContent(v ChoiceItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetChoiceItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetNumberItemContent sets ItemContent to NumberItemContent.
|
|
func (s *ItemContent) SetNumberItemContent(v NumberItemContent) {
|
|
s.Type = NumberItemContentItemContent
|
|
s.NumberItemContent = v
|
|
}
|
|
|
|
// GetNumberItemContent returns NumberItemContent and true boolean if ItemContent is NumberItemContent.
|
|
func (s ItemContent) GetNumberItemContent() (v NumberItemContent, ok bool) {
|
|
if !s.IsNumberItemContent() {
|
|
return v, false
|
|
}
|
|
return s.NumberItemContent, true
|
|
}
|
|
|
|
// NewNumberItemContentItemContent returns new ItemContent from NumberItemContent.
|
|
func NewNumberItemContentItemContent(v NumberItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetNumberItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetStringItemContent sets ItemContent to StringItemContent.
|
|
func (s *ItemContent) SetStringItemContent(v StringItemContent) {
|
|
s.Type = StringItemContentItemContent
|
|
s.StringItemContent = v
|
|
}
|
|
|
|
// GetStringItemContent returns StringItemContent and true boolean if ItemContent is StringItemContent.
|
|
func (s ItemContent) GetStringItemContent() (v StringItemContent, ok bool) {
|
|
if !s.IsStringItemContent() {
|
|
return v, false
|
|
}
|
|
return s.StringItemContent, true
|
|
}
|
|
|
|
// NewStringItemContentItemContent returns new ItemContent from StringItemContent.
|
|
func NewStringItemContentItemContent(v StringItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetStringItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetOrderItemContent sets ItemContent to OrderItemContent.
|
|
func (s *ItemContent) SetOrderItemContent(v OrderItemContent) {
|
|
s.Type = OrderItemContentItemContent
|
|
s.OrderItemContent = v
|
|
}
|
|
|
|
// GetOrderItemContent returns OrderItemContent and true boolean if ItemContent is OrderItemContent.
|
|
func (s ItemContent) GetOrderItemContent() (v OrderItemContent, ok bool) {
|
|
if !s.IsOrderItemContent() {
|
|
return v, false
|
|
}
|
|
return s.OrderItemContent, true
|
|
}
|
|
|
|
// NewOrderItemContentItemContent returns new ItemContent from OrderItemContent.
|
|
func NewOrderItemContentItemContent(v OrderItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetOrderItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetFindErrorItemContent sets ItemContent to FindErrorItemContent.
|
|
func (s *ItemContent) SetFindErrorItemContent(v FindErrorItemContent) {
|
|
s.Type = FindErrorItemContentItemContent
|
|
s.FindErrorItemContent = v
|
|
}
|
|
|
|
// GetFindErrorItemContent returns FindErrorItemContent and true boolean if ItemContent is FindErrorItemContent.
|
|
func (s ItemContent) GetFindErrorItemContent() (v FindErrorItemContent, ok bool) {
|
|
if !s.IsFindErrorItemContent() {
|
|
return v, false
|
|
}
|
|
return s.FindErrorItemContent, true
|
|
}
|
|
|
|
// NewFindErrorItemContentItemContent returns new ItemContent from FindErrorItemContent.
|
|
func NewFindErrorItemContentItemContent(v FindErrorItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetFindErrorItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetConfigurationItemContent sets ItemContent to ConfigurationItemContent.
|
|
func (s *ItemContent) SetConfigurationItemContent(v ConfigurationItemContent) {
|
|
s.Type = ConfigurationItemContentItemContent
|
|
s.ConfigurationItemContent = v
|
|
}
|
|
|
|
// GetConfigurationItemContent returns ConfigurationItemContent and true boolean if ItemContent is ConfigurationItemContent.
|
|
func (s ItemContent) GetConfigurationItemContent() (v ConfigurationItemContent, ok bool) {
|
|
if !s.IsConfigurationItemContent() {
|
|
return v, false
|
|
}
|
|
return s.ConfigurationItemContent, true
|
|
}
|
|
|
|
// NewConfigurationItemContentItemContent returns new ItemContent from ConfigurationItemContent.
|
|
func NewConfigurationItemContentItemContent(v ConfigurationItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetConfigurationItemContent(v)
|
|
return s
|
|
}
|
|
|
|
// SetPracticeItemContent sets ItemContent to PracticeItemContent.
|
|
func (s *ItemContent) SetPracticeItemContent(v PracticeItemContent) {
|
|
s.Type = PracticeItemContentItemContent
|
|
s.PracticeItemContent = v
|
|
}
|
|
|
|
// GetPracticeItemContent returns PracticeItemContent and true boolean if ItemContent is PracticeItemContent.
|
|
func (s ItemContent) GetPracticeItemContent() (v PracticeItemContent, ok bool) {
|
|
if !s.IsPracticeItemContent() {
|
|
return v, false
|
|
}
|
|
return s.PracticeItemContent, true
|
|
}
|
|
|
|
// NewPracticeItemContentItemContent returns new ItemContent from PracticeItemContent.
|
|
func NewPracticeItemContentItemContent(v PracticeItemContent) ItemContent {
|
|
var s ItemContent
|
|
s.SetPracticeItemContent(v)
|
|
return s
|
|
}
|
|
|
|
type ListMyCardAccessHistoryBadRequest Problem
|
|
|
|
func (*ListMyCardAccessHistoryBadRequest) listMyCardAccessHistoryRes() {}
|
|
|
|
type ListMyCardAccessHistoryForbidden Problem
|
|
|
|
func (*ListMyCardAccessHistoryForbidden) listMyCardAccessHistoryRes() {}
|
|
|
|
type ListMyCardAccessHistoryUnauthorized Problem
|
|
|
|
func (*ListMyCardAccessHistoryUnauthorized) listMyCardAccessHistoryRes() {}
|
|
|
|
type ListMyConsentsBadRequest Problem
|
|
|
|
func (*ListMyConsentsBadRequest) listMyConsentsRes() {}
|
|
|
|
type ListMyConsentsUnauthorized Problem
|
|
|
|
func (*ListMyConsentsUnauthorized) listMyConsentsRes() {}
|
|
|
|
type ListMyHiddenOrganizationsBadRequest Problem
|
|
|
|
func (*ListMyHiddenOrganizationsBadRequest) listMyHiddenOrganizationsRes() {}
|
|
|
|
type ListMyHiddenOrganizationsForbidden Problem
|
|
|
|
func (*ListMyHiddenOrganizationsForbidden) listMyHiddenOrganizationsRes() {}
|
|
|
|
type ListMyHiddenOrganizationsUnauthorized Problem
|
|
|
|
func (*ListMyHiddenOrganizationsUnauthorized) listMyHiddenOrganizationsRes() {}
|
|
|
|
type ListMyInvitationsBadRequest Problem
|
|
|
|
func (*ListMyInvitationsBadRequest) listMyInvitationsRes() {}
|
|
|
|
type ListMyInvitationsForbidden Problem
|
|
|
|
func (*ListMyInvitationsForbidden) listMyInvitationsRes() {}
|
|
|
|
type ListMyInvitationsUnauthorized Problem
|
|
|
|
func (*ListMyInvitationsUnauthorized) listMyInvitationsRes() {}
|
|
|
|
type ListMyOrganizationsBadRequest Problem
|
|
|
|
func (*ListMyOrganizationsBadRequest) listMyOrganizationsRes() {}
|
|
|
|
type ListMyOrganizationsForbidden Problem
|
|
|
|
func (*ListMyOrganizationsForbidden) listMyOrganizationsRes() {}
|
|
|
|
type ListMyOrganizationsUnauthorized Problem
|
|
|
|
func (*ListMyOrganizationsUnauthorized) listMyOrganizationsRes() {}
|
|
|
|
type ListMyPrivacyHistoryBadRequest Problem
|
|
|
|
func (*ListMyPrivacyHistoryBadRequest) listMyPrivacyHistoryRes() {}
|
|
|
|
type ListMyPrivacyHistoryForbidden Problem
|
|
|
|
func (*ListMyPrivacyHistoryForbidden) listMyPrivacyHistoryRes() {}
|
|
|
|
type ListMyPrivacyHistoryUnauthorized Problem
|
|
|
|
func (*ListMyPrivacyHistoryUnauthorized) listMyPrivacyHistoryRes() {}
|
|
|
|
type ListMySupportCasesBadRequest Problem
|
|
|
|
func (*ListMySupportCasesBadRequest) listMySupportCasesRes() {}
|
|
|
|
type ListMySupportCasesUnauthorized Problem
|
|
|
|
func (*ListMySupportCasesUnauthorized) listMySupportCasesRes() {}
|
|
|
|
type ListOrganizationInvitationsBadRequest Problem
|
|
|
|
func (*ListOrganizationInvitationsBadRequest) listOrganizationInvitationsRes() {}
|
|
|
|
type ListOrganizationInvitationsForbidden Problem
|
|
|
|
func (*ListOrganizationInvitationsForbidden) listOrganizationInvitationsRes() {}
|
|
|
|
type ListOrganizationInvitationsNotFound Problem
|
|
|
|
func (*ListOrganizationInvitationsNotFound) listOrganizationInvitationsRes() {}
|
|
|
|
type ListOrganizationInvitationsUnauthorized Problem
|
|
|
|
func (*ListOrganizationInvitationsUnauthorized) listOrganizationInvitationsRes() {}
|
|
|
|
type ListOrganizationNeedsBadRequest Problem
|
|
|
|
func (*ListOrganizationNeedsBadRequest) listOrganizationNeedsRes() {}
|
|
|
|
type ListOrganizationNeedsForbidden Problem
|
|
|
|
func (*ListOrganizationNeedsForbidden) listOrganizationNeedsRes() {}
|
|
|
|
type ListOrganizationNeedsNotFound Problem
|
|
|
|
func (*ListOrganizationNeedsNotFound) listOrganizationNeedsRes() {}
|
|
|
|
type ListOrganizationNeedsUnauthorized Problem
|
|
|
|
func (*ListOrganizationNeedsUnauthorized) listOrganizationNeedsRes() {}
|
|
|
|
type LoginBadRequest Problem
|
|
|
|
func (*LoginBadRequest) loginRes() {}
|
|
|
|
type LoginForbidden Problem
|
|
|
|
func (*LoginForbidden) loginRes() {}
|
|
|
|
type LoginPassword string
|
|
|
|
// Email and password of the account.
|
|
// Ref: #/components/schemas/LoginRequest
|
|
type LoginRequest struct {
|
|
Email EmailAddress `json:"email"`
|
|
Password LoginPassword `json:"password"`
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *LoginRequest) GetEmail() EmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPassword returns the value of Password.
|
|
func (s *LoginRequest) GetPassword() LoginPassword {
|
|
return s.Password
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *LoginRequest) SetEmail(val EmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPassword sets the value of Password.
|
|
func (s *LoginRequest) SetPassword(val LoginPassword) {
|
|
s.Password = val
|
|
}
|
|
|
|
type LoginUnauthorized Problem
|
|
|
|
func (*LoginUnauthorized) loginRes() {}
|
|
|
|
// LogoutNoContent is response for Logout operation.
|
|
type LogoutNoContent struct {
|
|
SetCookie string
|
|
}
|
|
|
|
// GetSetCookie returns the value of SetCookie.
|
|
func (s *LogoutNoContent) GetSetCookie() string {
|
|
return s.SetCookie
|
|
}
|
|
|
|
// SetSetCookie sets the value of SetCookie.
|
|
func (s *LogoutNoContent) SetSetCookie(val string) {
|
|
s.SetCookie = val
|
|
}
|
|
|
|
func (*LogoutNoContent) logoutRes() {}
|
|
|
|
// State of a membership. Only `active` gives access: every other state answers as if the account were
|
|
// no member.
|
|
//
|
|
// - active: the member works in the organization with the role.
|
|
// - suspended: access is stopped, and the owner or the platform may restore it.
|
|
// - removed: the owner or the platform ended the membership. A removal by the platform is not undone
|
|
// by the owner or by an invitation: the acceptance of an employee invitation and the member
|
|
// management must not reactivate it on their own. Who removed the member and why become additive
|
|
// fields of the member management.
|
|
// - left: the member ended the membership.
|
|
//
|
|
// One account has at most one membership per organization, so a former member who returns gets the
|
|
// same membership back in `active`, and the history of the pair is the history of its audit events
|
|
// (planned). The listing of this contract returns only `active` memberships; the other states are
|
|
// listed now so that generated clients accept them when the member management reads them. Adding a
|
|
// state is a contract change.
|
|
// Ref: #/components/schemas/MembershipState
|
|
type MembershipState string
|
|
|
|
const (
|
|
MembershipStateActive MembershipState = "active"
|
|
MembershipStateSuspended MembershipState = "suspended"
|
|
MembershipStateRemoved MembershipState = "removed"
|
|
MembershipStateLeft MembershipState = "left"
|
|
)
|
|
|
|
// AllValues returns all MembershipState values.
|
|
func (MembershipState) AllValues() []MembershipState {
|
|
return []MembershipState{
|
|
MembershipStateActive,
|
|
MembershipStateSuspended,
|
|
MembershipStateRemoved,
|
|
MembershipStateLeft,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s MembershipState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case MembershipStateActive:
|
|
return []byte(s), nil
|
|
case MembershipStateSuspended:
|
|
return []byte(s), nil
|
|
case MembershipStateRemoved:
|
|
return []byte(s), nil
|
|
case MembershipStateLeft:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *MembershipState) UnmarshalText(data []byte) error {
|
|
switch MembershipState(data) {
|
|
case MembershipStateActive:
|
|
*s = MembershipStateActive
|
|
return nil
|
|
case MembershipStateSuspended:
|
|
*s = MembershipStateSuspended
|
|
return nil
|
|
case MembershipStateRemoved:
|
|
*s = MembershipStateRemoved
|
|
return nil
|
|
case MembershipStateLeft:
|
|
*s = MembershipStateLeft
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// An organization available to the caller together with the caller's membership in it.
|
|
// Ref: #/components/schemas/MyOrganization
|
|
type MyOrganization struct {
|
|
Organization OrganizationSummary `json:"organization"`
|
|
Membership OrganizationMembership `json:"membership"`
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *MyOrganization) GetOrganization() OrganizationSummary {
|
|
return s.Organization
|
|
}
|
|
|
|
// GetMembership returns the value of Membership.
|
|
func (s *MyOrganization) GetMembership() OrganizationMembership {
|
|
return s.Membership
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *MyOrganization) SetOrganization(val OrganizationSummary) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// SetMembership sets the value of Membership.
|
|
func (s *MyOrganization) SetMembership(val OrganizationMembership) {
|
|
s.Membership = val
|
|
}
|
|
|
|
// One page of the organizations available to the caller, newest membership first. It holds only
|
|
// organizations where the caller has an `active` membership, so it is also the list of contexts the
|
|
// caller can work in; it never names an organization the caller cannot enter.
|
|
// Ref: #/components/schemas/MyOrganizationList
|
|
type MyOrganizationList struct {
|
|
// Organizations of the page.
|
|
Items []MyOrganization `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *MyOrganizationList) GetItems() []MyOrganization {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *MyOrganizationList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *MyOrganizationList) SetItems(val []MyOrganization) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *MyOrganizationList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// MyOrganizationListHeaders wraps MyOrganizationList with response headers.
|
|
type MyOrganizationListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response MyOrganizationList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *MyOrganizationListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *MyOrganizationListHeaders) GetResponse() MyOrganizationList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *MyOrganizationListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *MyOrganizationListHeaders) SetResponse(val MyOrganizationList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*MyOrganizationListHeaders) listMyOrganizationsRes() {}
|
|
|
|
// Hiring need of an organization: what the team needs, independent of any published vacancy. It holds
|
|
// the current version of the requirements with their provenance, the readiness of the critical fields,
|
|
// and the category recommendations. It never contains membership data, a candidate's personal data, or
|
|
// a candidate's salary minimum.
|
|
// Ref: #/components/schemas/Need
|
|
type Need struct {
|
|
// Identifier of the need.
|
|
ID uuid.UUID `json:"id"`
|
|
// Organization that owns the need, equal to `org_id` of the path. It never changes.
|
|
OrganizationID uuid.UUID `json:"organization_id"`
|
|
// Linked vacancy of the same organization, or null. A need never requires a vacancy.
|
|
VacancyID NilUUID `json:"vacancy_id"`
|
|
Title NeedTitle `json:"title"`
|
|
// Text the requirements were extracted from, or null.
|
|
SourceText NilNeedSourceText `json:"source_text"`
|
|
Version NeedVersion `json:"version"`
|
|
// Need version in which the current confirmed requirements were last changed, at most `version`. A
|
|
// change that confirms, changes, or removes a requirement makes it equal to the new `version`. A
|
|
// change of the title, the vacancy link, or the text, or of suggestions only, creates a new `version`
|
|
// but keeps `requirements_version`, so it invalidates neither the recommendations nor search results
|
|
// and selection snapshots. Search runs and selection snapshots (PRD FR10) refer to
|
|
// `(need id, requirements_version)`, and a new selection snapshot is due only when it changes.
|
|
RequirementsVersion NeedVersion `json:"requirements_version"`
|
|
Requirements NeedRequirementSet `json:"requirements"`
|
|
Readiness NeedReadinessReport `json:"readiness"`
|
|
Recommendations NeedCategoryRecommendations `json:"recommendations"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *Need) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetOrganizationID returns the value of OrganizationID.
|
|
func (s *Need) GetOrganizationID() uuid.UUID {
|
|
return s.OrganizationID
|
|
}
|
|
|
|
// GetVacancyID returns the value of VacancyID.
|
|
func (s *Need) GetVacancyID() NilUUID {
|
|
return s.VacancyID
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *Need) GetTitle() NeedTitle {
|
|
return s.Title
|
|
}
|
|
|
|
// GetSourceText returns the value of SourceText.
|
|
func (s *Need) GetSourceText() NilNeedSourceText {
|
|
return s.SourceText
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *Need) GetVersion() NeedVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetRequirementsVersion returns the value of RequirementsVersion.
|
|
func (s *Need) GetRequirementsVersion() NeedVersion {
|
|
return s.RequirementsVersion
|
|
}
|
|
|
|
// GetRequirements returns the value of Requirements.
|
|
func (s *Need) GetRequirements() NeedRequirementSet {
|
|
return s.Requirements
|
|
}
|
|
|
|
// GetReadiness returns the value of Readiness.
|
|
func (s *Need) GetReadiness() NeedReadinessReport {
|
|
return s.Readiness
|
|
}
|
|
|
|
// GetRecommendations returns the value of Recommendations.
|
|
func (s *Need) GetRecommendations() NeedCategoryRecommendations {
|
|
return s.Recommendations
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *Need) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *Need) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *Need) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetOrganizationID sets the value of OrganizationID.
|
|
func (s *Need) SetOrganizationID(val uuid.UUID) {
|
|
s.OrganizationID = val
|
|
}
|
|
|
|
// SetVacancyID sets the value of VacancyID.
|
|
func (s *Need) SetVacancyID(val NilUUID) {
|
|
s.VacancyID = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *Need) SetTitle(val NeedTitle) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetSourceText sets the value of SourceText.
|
|
func (s *Need) SetSourceText(val NilNeedSourceText) {
|
|
s.SourceText = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *Need) SetVersion(val NeedVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetRequirementsVersion sets the value of RequirementsVersion.
|
|
func (s *Need) SetRequirementsVersion(val NeedVersion) {
|
|
s.RequirementsVersion = val
|
|
}
|
|
|
|
// SetRequirements sets the value of Requirements.
|
|
func (s *Need) SetRequirements(val NeedRequirementSet) {
|
|
s.Requirements = val
|
|
}
|
|
|
|
// SetReadiness sets the value of Readiness.
|
|
func (s *Need) SetReadiness(val NeedReadinessReport) {
|
|
s.Readiness = val
|
|
}
|
|
|
|
// SetRecommendations sets the value of Recommendations.
|
|
func (s *Need) SetRecommendations(val NeedCategoryRecommendations) {
|
|
s.Recommendations = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *Need) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *Need) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// One recommended category, a specialization with a grade, with its score and the reasons for it. The
|
|
// score is `0.5 * Overlap + 0.3 * Money + 0.2 * Supply` (PRD FR08) computed from the published
|
|
// components: the exact skill overlap, the money share rounded down to a quarter or the neutral 0.5,
|
|
// and `Supply = min(1, active / 30)` when at least five candidates are available. For a group of fewer
|
|
// than five, Supply enters the ranking as 0, the same for every such group, so neither the score nor
|
|
// the order reveals the exact size of a group below five.
|
|
// Ref: #/components/schemas/NeedCategoryRecommendation
|
|
type NeedCategoryRecommendation struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
Grade GradeCode `json:"grade"`
|
|
// Recommendation score from 0 to 1, rounded half up to two decimals, or null when `supply` is
|
|
// `fewer_than_5`. Read-only; no request can set it.
|
|
Score NilFloat64 `json:"score"`
|
|
SkillOverlap NeedSkillOverlap `json:"skill_overlap"`
|
|
Money NeedMoneyFit `json:"money"`
|
|
Supply NeedSupplyBand `json:"supply"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *NeedCategoryRecommendation) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *NeedCategoryRecommendation) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetScore returns the value of Score.
|
|
func (s *NeedCategoryRecommendation) GetScore() NilFloat64 {
|
|
return s.Score
|
|
}
|
|
|
|
// GetSkillOverlap returns the value of SkillOverlap.
|
|
func (s *NeedCategoryRecommendation) GetSkillOverlap() NeedSkillOverlap {
|
|
return s.SkillOverlap
|
|
}
|
|
|
|
// GetMoney returns the value of Money.
|
|
func (s *NeedCategoryRecommendation) GetMoney() NeedMoneyFit {
|
|
return s.Money
|
|
}
|
|
|
|
// GetSupply returns the value of Supply.
|
|
func (s *NeedCategoryRecommendation) GetSupply() NeedSupplyBand {
|
|
return s.Supply
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *NeedCategoryRecommendation) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *NeedCategoryRecommendation) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetScore sets the value of Score.
|
|
func (s *NeedCategoryRecommendation) SetScore(val NilFloat64) {
|
|
s.Score = val
|
|
}
|
|
|
|
// SetSkillOverlap sets the value of SkillOverlap.
|
|
func (s *NeedCategoryRecommendation) SetSkillOverlap(val NeedSkillOverlap) {
|
|
s.SkillOverlap = val
|
|
}
|
|
|
|
// SetMoney sets the value of Money.
|
|
func (s *NeedCategoryRecommendation) SetMoney(val NeedMoneyFit) {
|
|
s.Money = val
|
|
}
|
|
|
|
// SetSupply sets the value of Supply.
|
|
func (s *NeedCategoryRecommendation) SetSupply(val NeedSupplyBand) {
|
|
s.Supply = val
|
|
}
|
|
|
|
// Category recommendations computed by the server from the confirmed requirements of
|
|
// `requirements_version` with a versioned policy (PRD FR08). Read-only: no request can set a
|
|
// recommendation, a score, or one of its components. The server may recompute them for the same
|
|
// requirements version, for example for a new policy or a changed pool of available candidates,
|
|
// without a new need version; `computed_at` and `policy_version` then change. The policy version and
|
|
// the candidate group used are stored with each computation, so a later policy never rewrites it.
|
|
// Ref: #/components/schemas/NeedCategoryRecommendations
|
|
type NeedCategoryRecommendations struct {
|
|
Status NeedRecommendationStatus `json:"status"`
|
|
RequirementsVersion NeedVersion `json:"requirements_version"`
|
|
// Number of the policy version whose weights were applied, or null unless `status` is `computed`.
|
|
PolicyVersion NilInt32 `json:"policy_version"`
|
|
// Version of the recommendation algorithm, or null unless `status` is `computed`.
|
|
AlgorithmVersion NilNeedVersionLabel `json:"algorithm_version"`
|
|
// Time of the computation, or null unless `status` is `computed`.
|
|
ComputedAt NilTimestamp `json:"computed_at"`
|
|
// Recommended categories, best first by the score described in NeedCategoryRecommendation. Empty
|
|
// unless `status` is `computed`.
|
|
Categories []NeedCategoryRecommendation `json:"categories"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedCategoryRecommendations) GetStatus() NeedRecommendationStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetRequirementsVersion returns the value of RequirementsVersion.
|
|
func (s *NeedCategoryRecommendations) GetRequirementsVersion() NeedVersion {
|
|
return s.RequirementsVersion
|
|
}
|
|
|
|
// GetPolicyVersion returns the value of PolicyVersion.
|
|
func (s *NeedCategoryRecommendations) GetPolicyVersion() NilInt32 {
|
|
return s.PolicyVersion
|
|
}
|
|
|
|
// GetAlgorithmVersion returns the value of AlgorithmVersion.
|
|
func (s *NeedCategoryRecommendations) GetAlgorithmVersion() NilNeedVersionLabel {
|
|
return s.AlgorithmVersion
|
|
}
|
|
|
|
// GetComputedAt returns the value of ComputedAt.
|
|
func (s *NeedCategoryRecommendations) GetComputedAt() NilTimestamp {
|
|
return s.ComputedAt
|
|
}
|
|
|
|
// GetCategories returns the value of Categories.
|
|
func (s *NeedCategoryRecommendations) GetCategories() []NeedCategoryRecommendation {
|
|
return s.Categories
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedCategoryRecommendations) SetStatus(val NeedRecommendationStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetRequirementsVersion sets the value of RequirementsVersion.
|
|
func (s *NeedCategoryRecommendations) SetRequirementsVersion(val NeedVersion) {
|
|
s.RequirementsVersion = val
|
|
}
|
|
|
|
// SetPolicyVersion sets the value of PolicyVersion.
|
|
func (s *NeedCategoryRecommendations) SetPolicyVersion(val NilInt32) {
|
|
s.PolicyVersion = val
|
|
}
|
|
|
|
// SetAlgorithmVersion sets the value of AlgorithmVersion.
|
|
func (s *NeedCategoryRecommendations) SetAlgorithmVersion(val NilNeedVersionLabel) {
|
|
s.AlgorithmVersion = val
|
|
}
|
|
|
|
// SetComputedAt sets the value of ComputedAt.
|
|
func (s *NeedCategoryRecommendations) SetComputedAt(val NilTimestamp) {
|
|
s.ComputedAt = val
|
|
}
|
|
|
|
// SetCategories sets the value of Categories.
|
|
func (s *NeedCategoryRecommendations) SetCategories(val []NeedCategoryRecommendation) {
|
|
s.Categories = val
|
|
}
|
|
|
|
// New need. Only `title` is required, so a need can start from a title, from a text, or from form
|
|
// fields, and with or without a vacancy. A field or list item given here must have `status`
|
|
// `confirmed` and becomes a confirmed manual value; `extracted` answers 400 with the pointer of that
|
|
// `status`, such as `/grade/status`, because a new need has no stored suggestion. A field that is
|
|
// absent is extracted from `source_text` when the text is given and is left unknown or empty
|
|
// otherwise. A nullable field sent as null, and a skill or task list sent as an empty list, stays
|
|
// unknown or empty and is not extracted; an empty `work_formats` value fails `minItems`. Unknown
|
|
// fields are rejected, so a request cannot set membership, a role, a status of the need, a provenance,
|
|
// readiness, a recommendation or its score, or a candidate's salary minimum.
|
|
// Ref: #/components/schemas/NeedCreate
|
|
type NeedCreate struct {
|
|
Title NeedTitle `json:"title"`
|
|
// Vacancy of the same organization to link, or null or absent for a need without a vacancy.
|
|
VacancyID OptNilUUID `json:"vacancy_id"`
|
|
SourceText OptNilNeedSourceText `json:"source_text"`
|
|
Specialization OptNilNeedSpecializationInput `json:"specialization"`
|
|
Grade OptNilNeedGradeInput `json:"grade"`
|
|
RequiredSkills []NeedSkillInput `json:"required_skills"`
|
|
DesiredSkills []NeedSkillInput `json:"desired_skills"`
|
|
Tasks []NeedTaskInput `json:"tasks"`
|
|
Domain OptNilNeedDomainInput `json:"domain"`
|
|
WorkFormats OptNilNeedWorkFormatsInput `json:"work_formats"`
|
|
Location OptNilNeedLocationInput `json:"location"`
|
|
Salary OptNilNeedSalaryInput `json:"salary"`
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *NeedCreate) GetTitle() NeedTitle {
|
|
return s.Title
|
|
}
|
|
|
|
// GetVacancyID returns the value of VacancyID.
|
|
func (s *NeedCreate) GetVacancyID() OptNilUUID {
|
|
return s.VacancyID
|
|
}
|
|
|
|
// GetSourceText returns the value of SourceText.
|
|
func (s *NeedCreate) GetSourceText() OptNilNeedSourceText {
|
|
return s.SourceText
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *NeedCreate) GetSpecialization() OptNilNeedSpecializationInput {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *NeedCreate) GetGrade() OptNilNeedGradeInput {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetRequiredSkills returns the value of RequiredSkills.
|
|
func (s *NeedCreate) GetRequiredSkills() []NeedSkillInput {
|
|
return s.RequiredSkills
|
|
}
|
|
|
|
// GetDesiredSkills returns the value of DesiredSkills.
|
|
func (s *NeedCreate) GetDesiredSkills() []NeedSkillInput {
|
|
return s.DesiredSkills
|
|
}
|
|
|
|
// GetTasks returns the value of Tasks.
|
|
func (s *NeedCreate) GetTasks() []NeedTaskInput {
|
|
return s.Tasks
|
|
}
|
|
|
|
// GetDomain returns the value of Domain.
|
|
func (s *NeedCreate) GetDomain() OptNilNeedDomainInput {
|
|
return s.Domain
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *NeedCreate) GetWorkFormats() OptNilNeedWorkFormatsInput {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *NeedCreate) GetLocation() OptNilNeedLocationInput {
|
|
return s.Location
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *NeedCreate) GetSalary() OptNilNeedSalaryInput {
|
|
return s.Salary
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *NeedCreate) SetTitle(val NeedTitle) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetVacancyID sets the value of VacancyID.
|
|
func (s *NeedCreate) SetVacancyID(val OptNilUUID) {
|
|
s.VacancyID = val
|
|
}
|
|
|
|
// SetSourceText sets the value of SourceText.
|
|
func (s *NeedCreate) SetSourceText(val OptNilNeedSourceText) {
|
|
s.SourceText = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *NeedCreate) SetSpecialization(val OptNilNeedSpecializationInput) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *NeedCreate) SetGrade(val OptNilNeedGradeInput) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetRequiredSkills sets the value of RequiredSkills.
|
|
func (s *NeedCreate) SetRequiredSkills(val []NeedSkillInput) {
|
|
s.RequiredSkills = val
|
|
}
|
|
|
|
// SetDesiredSkills sets the value of DesiredSkills.
|
|
func (s *NeedCreate) SetDesiredSkills(val []NeedSkillInput) {
|
|
s.DesiredSkills = val
|
|
}
|
|
|
|
// SetTasks sets the value of Tasks.
|
|
func (s *NeedCreate) SetTasks(val []NeedTaskInput) {
|
|
s.Tasks = val
|
|
}
|
|
|
|
// SetDomain sets the value of Domain.
|
|
func (s *NeedCreate) SetDomain(val OptNilNeedDomainInput) {
|
|
s.Domain = val
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *NeedCreate) SetWorkFormats(val OptNilNeedWorkFormatsInput) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *NeedCreate) SetLocation(val OptNilNeedLocationInput) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *NeedCreate) SetSalary(val OptNilNeedSalaryInput) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// Business domain of the need with its confirmation state and provenance. `value` and `source` are
|
|
// null exactly when `status` is `unknown`.
|
|
// Ref: #/components/schemas/NeedDomain
|
|
type NeedDomain struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value NilNeedDomainName `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedDomain) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedDomain) GetValue() NilNeedDomainName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedDomain) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedDomain) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedDomain) SetValue(val NilNeedDomainName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedDomain) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the domain in a request; see NeedUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/NeedDomainInput
|
|
type NeedDomainInput struct {
|
|
Value NeedDomainName `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedDomainInput) GetValue() NeedDomainName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedDomainInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedDomainInput) SetValue(val NeedDomainName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedDomainInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type NeedDomainName string
|
|
|
|
// Name of a need field, equal to its property name in NeedRequirementSet and in the request bodies.
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/NeedFieldName
|
|
type NeedFieldName string
|
|
|
|
const (
|
|
NeedFieldNameSpecialization NeedFieldName = "specialization"
|
|
NeedFieldNameGrade NeedFieldName = "grade"
|
|
NeedFieldNameRequiredSkills NeedFieldName = "required_skills"
|
|
NeedFieldNameDesiredSkills NeedFieldName = "desired_skills"
|
|
NeedFieldNameTasks NeedFieldName = "tasks"
|
|
NeedFieldNameDomain NeedFieldName = "domain"
|
|
NeedFieldNameWorkFormats NeedFieldName = "work_formats"
|
|
NeedFieldNameLocation NeedFieldName = "location"
|
|
NeedFieldNameSalary NeedFieldName = "salary"
|
|
)
|
|
|
|
// AllValues returns all NeedFieldName values.
|
|
func (NeedFieldName) AllValues() []NeedFieldName {
|
|
return []NeedFieldName{
|
|
NeedFieldNameSpecialization,
|
|
NeedFieldNameGrade,
|
|
NeedFieldNameRequiredSkills,
|
|
NeedFieldNameDesiredSkills,
|
|
NeedFieldNameTasks,
|
|
NeedFieldNameDomain,
|
|
NeedFieldNameWorkFormats,
|
|
NeedFieldNameLocation,
|
|
NeedFieldNameSalary,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedFieldName) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedFieldNameSpecialization:
|
|
return []byte(s), nil
|
|
case NeedFieldNameGrade:
|
|
return []byte(s), nil
|
|
case NeedFieldNameRequiredSkills:
|
|
return []byte(s), nil
|
|
case NeedFieldNameDesiredSkills:
|
|
return []byte(s), nil
|
|
case NeedFieldNameTasks:
|
|
return []byte(s), nil
|
|
case NeedFieldNameDomain:
|
|
return []byte(s), nil
|
|
case NeedFieldNameWorkFormats:
|
|
return []byte(s), nil
|
|
case NeedFieldNameLocation:
|
|
return []byte(s), nil
|
|
case NeedFieldNameSalary:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedFieldName) UnmarshalText(data []byte) error {
|
|
switch NeedFieldName(data) {
|
|
case NeedFieldNameSpecialization:
|
|
*s = NeedFieldNameSpecialization
|
|
return nil
|
|
case NeedFieldNameGrade:
|
|
*s = NeedFieldNameGrade
|
|
return nil
|
|
case NeedFieldNameRequiredSkills:
|
|
*s = NeedFieldNameRequiredSkills
|
|
return nil
|
|
case NeedFieldNameDesiredSkills:
|
|
*s = NeedFieldNameDesiredSkills
|
|
return nil
|
|
case NeedFieldNameTasks:
|
|
*s = NeedFieldNameTasks
|
|
return nil
|
|
case NeedFieldNameDomain:
|
|
*s = NeedFieldNameDomain
|
|
return nil
|
|
case NeedFieldNameWorkFormats:
|
|
*s = NeedFieldNameWorkFormats
|
|
return nil
|
|
case NeedFieldNameLocation:
|
|
*s = NeedFieldNameLocation
|
|
return nil
|
|
case NeedFieldNameSalary:
|
|
*s = NeedFieldNameSalary
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Target grade of the need with its confirmation state and provenance. `value` and `source` are null
|
|
// exactly when `status` is `unknown`; a text that names no grade leaves the grade unknown instead of
|
|
// assuming one.
|
|
// Ref: #/components/schemas/NeedGrade
|
|
type NeedGrade struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value NilGradeCode `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedGrade) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedGrade) GetValue() NilGradeCode {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedGrade) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedGrade) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedGrade) SetValue(val NilGradeCode) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedGrade) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the grade in a request; see NeedUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/NeedGradeInput
|
|
type NeedGradeInput struct {
|
|
Value GradeCode `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedGradeInput) GetValue() GradeCode {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedGradeInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedGradeInput) SetValue(val GradeCode) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedGradeInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// NeedHeaders wraps Need with response headers.
|
|
type NeedHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response Need
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *NeedHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *NeedHeaders) GetResponse() Need {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *NeedHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *NeedHeaders) SetResponse(val Need) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*NeedHeaders) createOrganizationNeedRes() {}
|
|
func (*NeedHeaders) getOrganizationNeedRes() {}
|
|
func (*NeedHeaders) updateOrganizationNeedRes() {}
|
|
|
|
// Confirmation state of a list item, and the decision that a request sends for a field or an item:
|
|
// `confirmed` or `extracted`, with the meaning of NeedValueStatus. A request sends `confirmed` to
|
|
// confirm a suggestion or to set a manual value, and `extracted` only to keep a stored suggestion
|
|
// unconfirmed with exactly its stored value. An item is never `unknown`; a list with no confirmed item
|
|
// is what readiness reports as missing.
|
|
// Ref: #/components/schemas/NeedItemStatus
|
|
type NeedItemStatus string
|
|
|
|
const (
|
|
NeedItemStatusConfirmed NeedItemStatus = "confirmed"
|
|
NeedItemStatusExtracted NeedItemStatus = "extracted"
|
|
)
|
|
|
|
// AllValues returns all NeedItemStatus values.
|
|
func (NeedItemStatus) AllValues() []NeedItemStatus {
|
|
return []NeedItemStatus{
|
|
NeedItemStatusConfirmed,
|
|
NeedItemStatusExtracted,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedItemStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedItemStatusConfirmed:
|
|
return []byte(s), nil
|
|
case NeedItemStatusExtracted:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedItemStatus) UnmarshalText(data []byte) error {
|
|
switch NeedItemStatus(data) {
|
|
case NeedItemStatusConfirmed:
|
|
*s = NeedItemStatusConfirmed
|
|
return nil
|
|
case NeedItemStatusExtracted:
|
|
*s = NeedItemStatusExtracted
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One page of the needs of an organization, newest first by creation time.
|
|
// Ref: #/components/schemas/NeedList
|
|
type NeedList struct {
|
|
// Needs of the page.
|
|
Items []NeedSummary `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *NeedList) GetItems() []NeedSummary {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *NeedList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *NeedList) SetItems(val []NeedSummary) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *NeedList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// NeedListHeaders wraps NeedList with response headers.
|
|
type NeedListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response NeedList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *NeedListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *NeedListHeaders) GetResponse() NeedList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *NeedListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *NeedListHeaders) SetResponse(val NeedList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*NeedListHeaders) listOrganizationNeedsRes() {}
|
|
|
|
// Place of work with its confirmation state and provenance. `value` and `source` are null exactly when
|
|
// `status` is `unknown`. Readiness requires a confirmed place only when the confirmed work formats
|
|
// include `office` or `hybrid`.
|
|
// Ref: #/components/schemas/NeedLocation
|
|
type NeedLocation struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value NilNeedLocationName `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedLocation) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedLocation) GetValue() NilNeedLocationName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedLocation) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedLocation) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedLocation) SetValue(val NilNeedLocationName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedLocation) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the place of work in a request; see NeedUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/NeedLocationInput
|
|
type NeedLocationInput struct {
|
|
Value NeedLocationName `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedLocationInput) GetValue() NeedLocationName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedLocationInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedLocationInput) SetValue(val NeedLocationName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedLocationInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type NeedLocationName string
|
|
|
|
// One critical field that has no confirmed value, with a specific question that the client shows next
|
|
// to the field.
|
|
// Ref: #/components/schemas/NeedMissingField
|
|
type NeedMissingField struct {
|
|
Field NeedFieldName `json:"field"`
|
|
Reason NeedMissingReason `json:"reason"`
|
|
// Specific Russian question about the missing value, for example which grade is needed. Plain text;
|
|
// the client shows it as text, never as HTML.
|
|
Question string `json:"question"`
|
|
}
|
|
|
|
// GetField returns the value of Field.
|
|
func (s *NeedMissingField) GetField() NeedFieldName {
|
|
return s.Field
|
|
}
|
|
|
|
// GetReason returns the value of Reason.
|
|
func (s *NeedMissingField) GetReason() NeedMissingReason {
|
|
return s.Reason
|
|
}
|
|
|
|
// GetQuestion returns the value of Question.
|
|
func (s *NeedMissingField) GetQuestion() string {
|
|
return s.Question
|
|
}
|
|
|
|
// SetField sets the value of Field.
|
|
func (s *NeedMissingField) SetField(val NeedFieldName) {
|
|
s.Field = val
|
|
}
|
|
|
|
// SetReason sets the value of Reason.
|
|
func (s *NeedMissingField) SetReason(val NeedMissingReason) {
|
|
s.Reason = val
|
|
}
|
|
|
|
// SetQuestion sets the value of Question.
|
|
func (s *NeedMissingField) SetQuestion(val string) {
|
|
s.Question = val
|
|
}
|
|
|
|
// Why a critical field is missing: `unknown`, the field has no value, or `unconfirmed`, it has only an
|
|
// extracted value or, for required skills, only extracted items that wait for confirmation.
|
|
// Ref: #/components/schemas/NeedMissingReason
|
|
type NeedMissingReason string
|
|
|
|
const (
|
|
NeedMissingReasonUnknown NeedMissingReason = "unknown"
|
|
NeedMissingReasonUnconfirmed NeedMissingReason = "unconfirmed"
|
|
)
|
|
|
|
// AllValues returns all NeedMissingReason values.
|
|
func (NeedMissingReason) AllValues() []NeedMissingReason {
|
|
return []NeedMissingReason{
|
|
NeedMissingReasonUnknown,
|
|
NeedMissingReasonUnconfirmed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedMissingReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedMissingReasonUnknown:
|
|
return []byte(s), nil
|
|
case NeedMissingReasonUnconfirmed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedMissingReason) UnmarshalText(data []byte) error {
|
|
switch NeedMissingReason(data) {
|
|
case NeedMissingReasonUnknown:
|
|
*s = NeedMissingReasonUnknown
|
|
return nil
|
|
case NeedMissingReasonUnconfirmed:
|
|
*s = NeedMissingReasonUnconfirmed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Salary component of a recommendation. It is an aggregate over at least five candidates and never
|
|
// reveals a minimum of any candidate.
|
|
// Ref: #/components/schemas/NeedMoneyFit
|
|
type NeedMoneyFit struct {
|
|
Status NeedMoneyStatus `json:"status"`
|
|
// Share of those candidates whose minimum is not above the upper bound of the range, rounded down to a
|
|
// multiple of 0.25 (one of 0, 0.25, 0.5, 0.75, 1), or null unless `status` is `computed`. The score
|
|
// and the ranking use this rounded value, never the exact share. A quarter step gives five levels:
|
|
// each probe of a new upper bound tells at most which quarter of the group accepts it, and in the
|
|
// smallest allowed group of five candidates a single minimum often does not move the value, while the
|
|
// share still separates a range that most candidates accept from one that few accept.
|
|
Share NilFloat64 `json:"share"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedMoneyFit) GetStatus() NeedMoneyStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetShare returns the value of Share.
|
|
func (s *NeedMoneyFit) GetShare() NilFloat64 {
|
|
return s.Share
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedMoneyFit) SetStatus(val NeedMoneyStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetShare sets the value of Share.
|
|
func (s *NeedMoneyFit) SetShare(val NilFloat64) {
|
|
s.Share = val
|
|
}
|
|
|
|
// How the salary component of a recommendation was obtained.
|
|
//
|
|
// - computed: at least five available candidates of the category have a known minimum comparable with
|
|
// the confirmed range; `share` is given.
|
|
// - insufficient_data: fewer than five such candidates; the policy uses the neutral value 0.5 and
|
|
// `share` is null.
|
|
// - no_salary: the need has no confirmed salary range; the policy uses the neutral value 0.5 and
|
|
// `share` is null.
|
|
// - withheld: the organization changed salary ranges five times within seven days, so salary
|
|
// aggregates are withheld for seven days (PRD FR13, enforcement planned); the policy uses the
|
|
// neutral value 0.5 and `share` is null.
|
|
//
|
|
// An unknown candidate minimum never counts as zero.
|
|
// Ref: #/components/schemas/NeedMoneyStatus
|
|
type NeedMoneyStatus string
|
|
|
|
const (
|
|
NeedMoneyStatusComputed NeedMoneyStatus = "computed"
|
|
NeedMoneyStatusInsufficientData NeedMoneyStatus = "insufficient_data"
|
|
NeedMoneyStatusNoSalary NeedMoneyStatus = "no_salary"
|
|
NeedMoneyStatusWithheld NeedMoneyStatus = "withheld"
|
|
)
|
|
|
|
// AllValues returns all NeedMoneyStatus values.
|
|
func (NeedMoneyStatus) AllValues() []NeedMoneyStatus {
|
|
return []NeedMoneyStatus{
|
|
NeedMoneyStatusComputed,
|
|
NeedMoneyStatusInsufficientData,
|
|
NeedMoneyStatusNoSalary,
|
|
NeedMoneyStatusWithheld,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedMoneyStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedMoneyStatusComputed:
|
|
return []byte(s), nil
|
|
case NeedMoneyStatusInsufficientData:
|
|
return []byte(s), nil
|
|
case NeedMoneyStatusNoSalary:
|
|
return []byte(s), nil
|
|
case NeedMoneyStatusWithheld:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedMoneyStatus) UnmarshalText(data []byte) error {
|
|
switch NeedMoneyStatus(data) {
|
|
case NeedMoneyStatusComputed:
|
|
*s = NeedMoneyStatusComputed
|
|
return nil
|
|
case NeedMoneyStatusInsufficientData:
|
|
*s = NeedMoneyStatusInsufficientData
|
|
return nil
|
|
case NeedMoneyStatusNoSalary:
|
|
*s = NeedMoneyStatusNoSalary
|
|
return nil
|
|
case NeedMoneyStatusWithheld:
|
|
*s = NeedMoneyStatusWithheld
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Completeness of the critical fields, computed by the server for the current version. The critical
|
|
// fields are `specialization`, `grade`, `required_skills` (at least one confirmed skill),
|
|
// `work_formats`, `salary`, and `location` when the confirmed work formats include `office` or
|
|
// `hybrid`. An incomplete need is still a valid saved need; each later operation, such as search or an
|
|
// invitation, states which readiness it requires.
|
|
// Ref: #/components/schemas/NeedReadinessReport
|
|
type NeedReadinessReport struct {
|
|
Status NeedReadinessStatus `json:"status"`
|
|
// Critical fields without a confirmed value, each at most once, in the order of NeedFieldName. Empty
|
|
// exactly when `status` is `complete`.
|
|
MissingFields []NeedMissingField `json:"missing_fields"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedReadinessReport) GetStatus() NeedReadinessStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetMissingFields returns the value of MissingFields.
|
|
func (s *NeedReadinessReport) GetMissingFields() []NeedMissingField {
|
|
return s.MissingFields
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedReadinessReport) SetStatus(val NeedReadinessStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetMissingFields sets the value of MissingFields.
|
|
func (s *NeedReadinessReport) SetMissingFields(val []NeedMissingField) {
|
|
s.MissingFields = val
|
|
}
|
|
|
|
// `complete` when every critical field has a confirmed value, otherwise `incomplete`.
|
|
// Ref: #/components/schemas/NeedReadinessStatus
|
|
type NeedReadinessStatus string
|
|
|
|
const (
|
|
NeedReadinessStatusComplete NeedReadinessStatus = "complete"
|
|
NeedReadinessStatusIncomplete NeedReadinessStatus = "incomplete"
|
|
)
|
|
|
|
// AllValues returns all NeedReadinessStatus values.
|
|
func (NeedReadinessStatus) AllValues() []NeedReadinessStatus {
|
|
return []NeedReadinessStatus{
|
|
NeedReadinessStatusComplete,
|
|
NeedReadinessStatusIncomplete,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedReadinessStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedReadinessStatusComplete:
|
|
return []byte(s), nil
|
|
case NeedReadinessStatusIncomplete:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedReadinessStatus) UnmarshalText(data []byte) error {
|
|
switch NeedReadinessStatus(data) {
|
|
case NeedReadinessStatusComplete:
|
|
*s = NeedReadinessStatusComplete
|
|
return nil
|
|
case NeedReadinessStatusIncomplete:
|
|
*s = NeedReadinessStatusIncomplete
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// State of the category recommendations of the current requirements version.
|
|
//
|
|
// - computed: `categories` holds the recommendations computed from the confirmed requirements of
|
|
// `requirements_version`.
|
|
// - pending: the computation for the current requirements version has not finished yet; `categories`
|
|
// is empty. Read the need again later.
|
|
// - not_available: the current requirements have no confirmed required or desired skill to compute
|
|
// from; `categories` is empty.
|
|
//
|
|
// Ref: #/components/schemas/NeedRecommendationStatus
|
|
type NeedRecommendationStatus string
|
|
|
|
const (
|
|
NeedRecommendationStatusComputed NeedRecommendationStatus = "computed"
|
|
NeedRecommendationStatusPending NeedRecommendationStatus = "pending"
|
|
NeedRecommendationStatusNotAvailable NeedRecommendationStatus = "not_available"
|
|
)
|
|
|
|
// AllValues returns all NeedRecommendationStatus values.
|
|
func (NeedRecommendationStatus) AllValues() []NeedRecommendationStatus {
|
|
return []NeedRecommendationStatus{
|
|
NeedRecommendationStatusComputed,
|
|
NeedRecommendationStatusPending,
|
|
NeedRecommendationStatusNotAvailable,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedRecommendationStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedRecommendationStatusComputed:
|
|
return []byte(s), nil
|
|
case NeedRecommendationStatusPending:
|
|
return []byte(s), nil
|
|
case NeedRecommendationStatusNotAvailable:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedRecommendationStatus) UnmarshalText(data []byte) error {
|
|
switch NeedRecommendationStatus(data) {
|
|
case NeedRecommendationStatusComputed:
|
|
*s = NeedRecommendationStatusComputed
|
|
return nil
|
|
case NeedRecommendationStatusPending:
|
|
*s = NeedRecommendationStatusPending
|
|
return nil
|
|
case NeedRecommendationStatusNotAvailable:
|
|
*s = NeedRecommendationStatusNotAvailable
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Requirements of one need version, each with its confirmation state and provenance. Read-only;
|
|
// requests change them through the fields of NeedCreate and NeedUpdate.
|
|
// Ref: #/components/schemas/NeedRequirementSet
|
|
type NeedRequirementSet struct {
|
|
Specialization NeedSpecialization `json:"specialization"`
|
|
Grade NeedGrade `json:"grade"`
|
|
// Required skills; each has weight 2 in skill coverage. Only confirmed skills count.
|
|
RequiredSkills []NeedSkill `json:"required_skills"`
|
|
// Desired skills; each has weight 1 in skill coverage. Only confirmed skills count.
|
|
DesiredSkills []NeedSkill `json:"desired_skills"`
|
|
// Work tasks of the team in the order given.
|
|
Tasks []NeedTask `json:"tasks"`
|
|
Domain NeedDomain `json:"domain"`
|
|
WorkFormats NeedWorkFormats `json:"work_formats"`
|
|
Location NeedLocation `json:"location"`
|
|
Salary NeedSalary `json:"salary"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *NeedRequirementSet) GetSpecialization() NeedSpecialization {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *NeedRequirementSet) GetGrade() NeedGrade {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetRequiredSkills returns the value of RequiredSkills.
|
|
func (s *NeedRequirementSet) GetRequiredSkills() []NeedSkill {
|
|
return s.RequiredSkills
|
|
}
|
|
|
|
// GetDesiredSkills returns the value of DesiredSkills.
|
|
func (s *NeedRequirementSet) GetDesiredSkills() []NeedSkill {
|
|
return s.DesiredSkills
|
|
}
|
|
|
|
// GetTasks returns the value of Tasks.
|
|
func (s *NeedRequirementSet) GetTasks() []NeedTask {
|
|
return s.Tasks
|
|
}
|
|
|
|
// GetDomain returns the value of Domain.
|
|
func (s *NeedRequirementSet) GetDomain() NeedDomain {
|
|
return s.Domain
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *NeedRequirementSet) GetWorkFormats() NeedWorkFormats {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *NeedRequirementSet) GetLocation() NeedLocation {
|
|
return s.Location
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *NeedRequirementSet) GetSalary() NeedSalary {
|
|
return s.Salary
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *NeedRequirementSet) SetSpecialization(val NeedSpecialization) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *NeedRequirementSet) SetGrade(val NeedGrade) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetRequiredSkills sets the value of RequiredSkills.
|
|
func (s *NeedRequirementSet) SetRequiredSkills(val []NeedSkill) {
|
|
s.RequiredSkills = val
|
|
}
|
|
|
|
// SetDesiredSkills sets the value of DesiredSkills.
|
|
func (s *NeedRequirementSet) SetDesiredSkills(val []NeedSkill) {
|
|
s.DesiredSkills = val
|
|
}
|
|
|
|
// SetTasks sets the value of Tasks.
|
|
func (s *NeedRequirementSet) SetTasks(val []NeedTask) {
|
|
s.Tasks = val
|
|
}
|
|
|
|
// SetDomain sets the value of Domain.
|
|
func (s *NeedRequirementSet) SetDomain(val NeedDomain) {
|
|
s.Domain = val
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *NeedRequirementSet) SetWorkFormats(val NeedWorkFormats) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *NeedRequirementSet) SetLocation(val NeedLocation) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *NeedRequirementSet) SetSalary(val NeedSalary) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// Salary range that the employer offers, with its confirmation state and provenance. `value` and
|
|
// `source` are null exactly when `status` is `unknown`. A text without a salary leaves it unknown; the
|
|
// server never substitutes zero, a market estimate, or a range from another need.
|
|
// Ref: #/components/schemas/NeedSalary
|
|
type NeedSalary struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value NilSalaryRange `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSalary) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedSalary) GetValue() NilSalaryRange {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedSalary) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSalary) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedSalary) SetValue(val NilSalaryRange) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedSalary) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the salary range in a request; see NeedUpdate for the rules of `status` and
|
|
// SalaryRange for the rules of the range, whose pointers are under `/salary/value`.
|
|
// Ref: #/components/schemas/NeedSalaryInput
|
|
type NeedSalaryInput struct {
|
|
Value SalaryRange `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedSalaryInput) GetValue() SalaryRange {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSalaryInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedSalaryInput) SetValue(val SalaryRange) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSalaryInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// One required or desired skill of the need. `taxonomy_code` is null for a skill that the platform
|
|
// taxonomy does not know: the server keeps the name as given, never maps it to a guessed code, and
|
|
// counts it as not covered in category recommendations.
|
|
// Ref: #/components/schemas/NeedSkill
|
|
type NeedSkill struct {
|
|
Name SkillName `json:"name"`
|
|
TaxonomyCode NilSkillTaxonomyCode `json:"taxonomy_code"`
|
|
Status NeedItemStatus `json:"status"`
|
|
Source NeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *NeedSkill) GetName() SkillName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetTaxonomyCode returns the value of TaxonomyCode.
|
|
func (s *NeedSkill) GetTaxonomyCode() NilSkillTaxonomyCode {
|
|
return s.TaxonomyCode
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSkill) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedSkill) GetSource() NeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *NeedSkill) SetName(val SkillName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetTaxonomyCode sets the value of TaxonomyCode.
|
|
func (s *NeedSkill) SetTaxonomyCode(val NilSkillTaxonomyCode) {
|
|
s.TaxonomyCode = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSkill) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedSkill) SetSource(val NeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// One skill of a list in a request. A name that equals, without regard to letter case, a skill of the
|
|
// current version in either skill list refers to that skill and keeps its origin, quote, and taxonomy
|
|
// code; this is how an extracted skill is confirmed or moved between the required and desired lists.
|
|
// Any other name is a new manual skill. `status` follows the rules of NeedUpdate: `extracted` for a
|
|
// name that is not a stored suggestion answers 400 validation_failed with the pointer of that
|
|
// `status`, for example `/required_skills/2/status`. A name repeated within or across the two skill
|
|
// lists answers 400 with the pointer of the later `name`.
|
|
// Ref: #/components/schemas/NeedSkillInput
|
|
type NeedSkillInput struct {
|
|
Name SkillName `json:"name"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *NeedSkillInput) GetName() SkillName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSkillInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *NeedSkillInput) SetName(val SkillName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSkillInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Skill coverage of a category: the weighted share of the confirmed skills of the need that the
|
|
// category taxonomy covers, with weight 2 for a required and 1 for a desired skill.
|
|
// Ref: #/components/schemas/NeedSkillOverlap
|
|
type NeedSkillOverlap struct {
|
|
// Weighted share from 0 to 1, rounded to two decimals.
|
|
Share float64 `json:"share"`
|
|
// Confirmed skills of the need that the category covers.
|
|
CoveredSkills []SkillName `json:"covered_skills"`
|
|
// Confirmed skills of the need that the category does not cover, including skills without a taxonomy
|
|
// code.
|
|
UncoveredSkills []SkillName `json:"uncovered_skills"`
|
|
}
|
|
|
|
// GetShare returns the value of Share.
|
|
func (s *NeedSkillOverlap) GetShare() float64 {
|
|
return s.Share
|
|
}
|
|
|
|
// GetCoveredSkills returns the value of CoveredSkills.
|
|
func (s *NeedSkillOverlap) GetCoveredSkills() []SkillName {
|
|
return s.CoveredSkills
|
|
}
|
|
|
|
// GetUncoveredSkills returns the value of UncoveredSkills.
|
|
func (s *NeedSkillOverlap) GetUncoveredSkills() []SkillName {
|
|
return s.UncoveredSkills
|
|
}
|
|
|
|
// SetShare sets the value of Share.
|
|
func (s *NeedSkillOverlap) SetShare(val float64) {
|
|
s.Share = val
|
|
}
|
|
|
|
// SetCoveredSkills sets the value of CoveredSkills.
|
|
func (s *NeedSkillOverlap) SetCoveredSkills(val []SkillName) {
|
|
s.CoveredSkills = val
|
|
}
|
|
|
|
// SetUncoveredSkills sets the value of UncoveredSkills.
|
|
func (s *NeedSkillOverlap) SetUncoveredSkills(val []SkillName) {
|
|
s.UncoveredSkills = val
|
|
}
|
|
|
|
type NeedSourceQuote string
|
|
|
|
type NeedSourceText string
|
|
|
|
// Target specialization of the need with its confirmation state and provenance. `value` and `source`
|
|
// are null exactly when `status` is `unknown`.
|
|
// Ref: #/components/schemas/NeedSpecialization
|
|
type NeedSpecialization struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value NilSpecializationCode `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSpecialization) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedSpecialization) GetValue() NilSpecializationCode {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedSpecialization) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSpecialization) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedSpecialization) SetValue(val NilSpecializationCode) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedSpecialization) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the specialization in a request; see NeedUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/NeedSpecializationInput
|
|
type NeedSpecializationInput struct {
|
|
Value SpecializationCode `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedSpecializationInput) GetValue() SpecializationCode {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedSpecializationInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedSpecializationInput) SetValue(val SpecializationCode) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedSpecializationInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Need in a list: its identity, current version, target category fields, and readiness. Read the need
|
|
// for the requirements and the recommendations.
|
|
// Ref: #/components/schemas/NeedSummary
|
|
type NeedSummary struct {
|
|
// Identifier of the need.
|
|
ID uuid.UUID `json:"id"`
|
|
// Linked vacancy, or null.
|
|
VacancyID NilUUID `json:"vacancy_id"`
|
|
Title NeedTitle `json:"title"`
|
|
Version NeedVersion `json:"version"`
|
|
Specialization NeedSpecialization `json:"specialization"`
|
|
Grade NeedGrade `json:"grade"`
|
|
Readiness NeedReadinessReport `json:"readiness"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *NeedSummary) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetVacancyID returns the value of VacancyID.
|
|
func (s *NeedSummary) GetVacancyID() NilUUID {
|
|
return s.VacancyID
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *NeedSummary) GetTitle() NeedTitle {
|
|
return s.Title
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *NeedSummary) GetVersion() NeedVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *NeedSummary) GetSpecialization() NeedSpecialization {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *NeedSummary) GetGrade() NeedGrade {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetReadiness returns the value of Readiness.
|
|
func (s *NeedSummary) GetReadiness() NeedReadinessReport {
|
|
return s.Readiness
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *NeedSummary) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *NeedSummary) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *NeedSummary) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetVacancyID sets the value of VacancyID.
|
|
func (s *NeedSummary) SetVacancyID(val NilUUID) {
|
|
s.VacancyID = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *NeedSummary) SetTitle(val NeedTitle) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *NeedSummary) SetVersion(val NeedVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *NeedSummary) SetSpecialization(val NeedSpecialization) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *NeedSummary) SetGrade(val NeedGrade) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetReadiness sets the value of Readiness.
|
|
func (s *NeedSummary) SetReadiness(val NeedReadinessReport) {
|
|
s.Readiness = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *NeedSummary) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *NeedSummary) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// Number of available candidates of the category in the allowed detail: `fewer_than_5`,
|
|
// `from_5_to_29`, or `30_or_more`. Smaller groups are never counted exactly.
|
|
// Ref: #/components/schemas/NeedSupplyBand
|
|
type NeedSupplyBand string
|
|
|
|
const (
|
|
NeedSupplyBandFewerThan5 NeedSupplyBand = "fewer_than_5"
|
|
NeedSupplyBandFrom5To29 NeedSupplyBand = "from_5_to_29"
|
|
NeedSupplyBand30OrMore NeedSupplyBand = "30_or_more"
|
|
)
|
|
|
|
// AllValues returns all NeedSupplyBand values.
|
|
func (NeedSupplyBand) AllValues() []NeedSupplyBand {
|
|
return []NeedSupplyBand{
|
|
NeedSupplyBandFewerThan5,
|
|
NeedSupplyBandFrom5To29,
|
|
NeedSupplyBand30OrMore,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedSupplyBand) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedSupplyBandFewerThan5:
|
|
return []byte(s), nil
|
|
case NeedSupplyBandFrom5To29:
|
|
return []byte(s), nil
|
|
case NeedSupplyBand30OrMore:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedSupplyBand) UnmarshalText(data []byte) error {
|
|
switch NeedSupplyBand(data) {
|
|
case NeedSupplyBandFewerThan5:
|
|
*s = NeedSupplyBandFewerThan5
|
|
return nil
|
|
case NeedSupplyBandFrom5To29:
|
|
*s = NeedSupplyBandFrom5To29
|
|
return nil
|
|
case NeedSupplyBand30OrMore:
|
|
*s = NeedSupplyBand30OrMore
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One work task of the team with its confirmation state and provenance.
|
|
// Ref: #/components/schemas/NeedTask
|
|
type NeedTask struct {
|
|
Text NeedTaskText `json:"text"`
|
|
Status NeedItemStatus `json:"status"`
|
|
Source NeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *NeedTask) GetText() NeedTaskText {
|
|
return s.Text
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedTask) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedTask) GetSource() NeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *NeedTask) SetText(val NeedTaskText) {
|
|
s.Text = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedTask) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedTask) SetSource(val NeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// One task of the list in a request. A text equal to a task of the current version refers to that task
|
|
// and keeps its origin and quote; any other text is a new manual task. `status` and repeated texts
|
|
// follow the rules of NeedSkillInput.
|
|
// Ref: #/components/schemas/NeedTaskInput
|
|
type NeedTaskInput struct {
|
|
Text NeedTaskText `json:"text"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *NeedTaskInput) GetText() NeedTaskText {
|
|
return s.Text
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedTaskInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *NeedTaskInput) SetText(val NeedTaskText) {
|
|
s.Text = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedTaskInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type NeedTaskText string
|
|
|
|
type NeedTitle string
|
|
|
|
// Change of a need over the version the client read. Each field present in the body replaces that
|
|
// field as a whole; an absent field stays unchanged. Nested objects and lists are not merged: a field
|
|
// decision and each list are replaced entirely, and a stored item missing from a sent list is deleted.
|
|
// A nullable field sent as null becomes unknown, or unlinked for `vacancy_id`; a skill or task list
|
|
// sent empty deletes every item; a list sent as null fails validation. A field decision
|
|
// `{value, status}` and a list item follow the same rules: `confirmed` with the stored value confirms
|
|
// it and keeps its origin and quote, and `confirmed` with another value sets a confirmed manual value;
|
|
// `extracted` keeps a stored suggestion unconfirmed and is allowed only with exactly the stored
|
|
// suggested value, otherwise it answers 400 with the pointer of that `status`, such as `/grade/status`
|
|
// or `/required_skills/0/status`. A client that sends back an unchanged form therefore confirms
|
|
// nothing by accident: it sends each suggestion with `extracted`, or leaves the field out. Sending a
|
|
// different `source_text` extracts again: new suggestions replace only the `extracted` values and
|
|
// items of fields not named in this body; confirmed values are never overwritten, a suggested skill
|
|
// whose name is already in either skill list is skipped, and a suggestion that a member deleted is not
|
|
// proposed again for this need. Unknown fields are rejected, so a request cannot set membership, a
|
|
// role, a provenance, readiness, a recommendation or its score, or a candidate's salary minimum.
|
|
// Ref: #/components/schemas/NeedUpdate
|
|
type NeedUpdate struct {
|
|
ExpectedVersion NeedVersion `json:"expected_version"`
|
|
Title OptNeedTitle `json:"title"`
|
|
// Vacancy of the same organization to link, or null to unlink.
|
|
VacancyID OptNilUUID `json:"vacancy_id"`
|
|
SourceText OptNilNeedSourceText `json:"source_text"`
|
|
Specialization OptNilNeedSpecializationInput `json:"specialization"`
|
|
Grade OptNilNeedGradeInput `json:"grade"`
|
|
RequiredSkills []NeedSkillInput `json:"required_skills"`
|
|
DesiredSkills []NeedSkillInput `json:"desired_skills"`
|
|
Tasks []NeedTaskInput `json:"tasks"`
|
|
Domain OptNilNeedDomainInput `json:"domain"`
|
|
WorkFormats OptNilNeedWorkFormatsInput `json:"work_formats"`
|
|
Location OptNilNeedLocationInput `json:"location"`
|
|
Salary OptNilNeedSalaryInput `json:"salary"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *NeedUpdate) GetExpectedVersion() NeedVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *NeedUpdate) GetTitle() OptNeedTitle {
|
|
return s.Title
|
|
}
|
|
|
|
// GetVacancyID returns the value of VacancyID.
|
|
func (s *NeedUpdate) GetVacancyID() OptNilUUID {
|
|
return s.VacancyID
|
|
}
|
|
|
|
// GetSourceText returns the value of SourceText.
|
|
func (s *NeedUpdate) GetSourceText() OptNilNeedSourceText {
|
|
return s.SourceText
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *NeedUpdate) GetSpecialization() OptNilNeedSpecializationInput {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *NeedUpdate) GetGrade() OptNilNeedGradeInput {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetRequiredSkills returns the value of RequiredSkills.
|
|
func (s *NeedUpdate) GetRequiredSkills() []NeedSkillInput {
|
|
return s.RequiredSkills
|
|
}
|
|
|
|
// GetDesiredSkills returns the value of DesiredSkills.
|
|
func (s *NeedUpdate) GetDesiredSkills() []NeedSkillInput {
|
|
return s.DesiredSkills
|
|
}
|
|
|
|
// GetTasks returns the value of Tasks.
|
|
func (s *NeedUpdate) GetTasks() []NeedTaskInput {
|
|
return s.Tasks
|
|
}
|
|
|
|
// GetDomain returns the value of Domain.
|
|
func (s *NeedUpdate) GetDomain() OptNilNeedDomainInput {
|
|
return s.Domain
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *NeedUpdate) GetWorkFormats() OptNilNeedWorkFormatsInput {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *NeedUpdate) GetLocation() OptNilNeedLocationInput {
|
|
return s.Location
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *NeedUpdate) GetSalary() OptNilNeedSalaryInput {
|
|
return s.Salary
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *NeedUpdate) SetExpectedVersion(val NeedVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *NeedUpdate) SetTitle(val OptNeedTitle) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetVacancyID sets the value of VacancyID.
|
|
func (s *NeedUpdate) SetVacancyID(val OptNilUUID) {
|
|
s.VacancyID = val
|
|
}
|
|
|
|
// SetSourceText sets the value of SourceText.
|
|
func (s *NeedUpdate) SetSourceText(val OptNilNeedSourceText) {
|
|
s.SourceText = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *NeedUpdate) SetSpecialization(val OptNilNeedSpecializationInput) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *NeedUpdate) SetGrade(val OptNilNeedGradeInput) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetRequiredSkills sets the value of RequiredSkills.
|
|
func (s *NeedUpdate) SetRequiredSkills(val []NeedSkillInput) {
|
|
s.RequiredSkills = val
|
|
}
|
|
|
|
// SetDesiredSkills sets the value of DesiredSkills.
|
|
func (s *NeedUpdate) SetDesiredSkills(val []NeedSkillInput) {
|
|
s.DesiredSkills = val
|
|
}
|
|
|
|
// SetTasks sets the value of Tasks.
|
|
func (s *NeedUpdate) SetTasks(val []NeedTaskInput) {
|
|
s.Tasks = val
|
|
}
|
|
|
|
// SetDomain sets the value of Domain.
|
|
func (s *NeedUpdate) SetDomain(val OptNilNeedDomainInput) {
|
|
s.Domain = val
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *NeedUpdate) SetWorkFormats(val OptNilNeedWorkFormatsInput) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *NeedUpdate) SetLocation(val OptNilNeedLocationInput) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *NeedUpdate) SetSalary(val OptNilNeedSalaryInput) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// Where the value of a field or item came from. The server sets it; a request never sends it.
|
|
//
|
|
// - manual: a member of the organization typed the value in the form. `quote`, `extraction_version`,
|
|
// and `extracted_in_version` are null.
|
|
// - extracted_from_text: the server extracted the value from `source_text`, with the deterministic
|
|
// rules and dictionary or, planned, with the ML service. `extraction_version` names the extractor
|
|
// version.
|
|
// - imported: planned; the value was copied from a linked vacancy or an import. No MVP operation
|
|
// produces it.
|
|
//
|
|
// Confirming an extracted value keeps its origin and quote; changing the value makes it `manual`.
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/NeedValueOrigin
|
|
type NeedValueOrigin string
|
|
|
|
const (
|
|
NeedValueOriginManual NeedValueOrigin = "manual"
|
|
NeedValueOriginExtractedFromText NeedValueOrigin = "extracted_from_text"
|
|
NeedValueOriginImported NeedValueOrigin = "imported"
|
|
)
|
|
|
|
// AllValues returns all NeedValueOrigin values.
|
|
func (NeedValueOrigin) AllValues() []NeedValueOrigin {
|
|
return []NeedValueOrigin{
|
|
NeedValueOriginManual,
|
|
NeedValueOriginExtractedFromText,
|
|
NeedValueOriginImported,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedValueOrigin) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedValueOriginManual:
|
|
return []byte(s), nil
|
|
case NeedValueOriginExtractedFromText:
|
|
return []byte(s), nil
|
|
case NeedValueOriginImported:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedValueOrigin) UnmarshalText(data []byte) error {
|
|
switch NeedValueOrigin(data) {
|
|
case NeedValueOriginManual:
|
|
*s = NeedValueOriginManual
|
|
return nil
|
|
case NeedValueOriginExtractedFromText:
|
|
*s = NeedValueOriginExtractedFromText
|
|
return nil
|
|
case NeedValueOriginImported:
|
|
*s = NeedValueOriginImported
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Provenance of a value: its origin, the quote it was extracted from, the need version whose text the
|
|
// quote belongs to, and the extractor version. Read-only; the server derives it and a request cannot
|
|
// set it.
|
|
// Ref: #/components/schemas/NeedValueSource
|
|
type NeedValueSource struct {
|
|
Origin NeedValueOrigin `json:"origin"`
|
|
// Excerpt of the need text that supports the value, or null for a manual value and for an extracted
|
|
// value that the extractor did not tie to one excerpt.
|
|
Quote NilNeedSourceQuote `json:"quote"`
|
|
// Need version whose `source_text` the value was extracted from and the quote is an excerpt of, or
|
|
// null for a manual value. A confirmed value keeps it after the text changes, so its quote may be
|
|
// absent from the current `source_text`.
|
|
ExtractedInVersion NilNeedVersion `json:"extracted_in_version"`
|
|
// Extractor version for an extracted or imported value, or null for a manual value.
|
|
ExtractionVersion NilNeedVersionLabel `json:"extraction_version"`
|
|
}
|
|
|
|
// GetOrigin returns the value of Origin.
|
|
func (s *NeedValueSource) GetOrigin() NeedValueOrigin {
|
|
return s.Origin
|
|
}
|
|
|
|
// GetQuote returns the value of Quote.
|
|
func (s *NeedValueSource) GetQuote() NilNeedSourceQuote {
|
|
return s.Quote
|
|
}
|
|
|
|
// GetExtractedInVersion returns the value of ExtractedInVersion.
|
|
func (s *NeedValueSource) GetExtractedInVersion() NilNeedVersion {
|
|
return s.ExtractedInVersion
|
|
}
|
|
|
|
// GetExtractionVersion returns the value of ExtractionVersion.
|
|
func (s *NeedValueSource) GetExtractionVersion() NilNeedVersionLabel {
|
|
return s.ExtractionVersion
|
|
}
|
|
|
|
// SetOrigin sets the value of Origin.
|
|
func (s *NeedValueSource) SetOrigin(val NeedValueOrigin) {
|
|
s.Origin = val
|
|
}
|
|
|
|
// SetQuote sets the value of Quote.
|
|
func (s *NeedValueSource) SetQuote(val NilNeedSourceQuote) {
|
|
s.Quote = val
|
|
}
|
|
|
|
// SetExtractedInVersion sets the value of ExtractedInVersion.
|
|
func (s *NeedValueSource) SetExtractedInVersion(val NilNeedVersion) {
|
|
s.ExtractedInVersion = val
|
|
}
|
|
|
|
// SetExtractionVersion sets the value of ExtractionVersion.
|
|
func (s *NeedValueSource) SetExtractionVersion(val NilNeedVersionLabel) {
|
|
s.ExtractionVersion = val
|
|
}
|
|
|
|
// Confirmation state of one need field.
|
|
//
|
|
// - confirmed: a member of the organization entered the value or confirmed it. Only confirmed values
|
|
// feed readiness, category recommendations, search, and invitations.
|
|
// - extracted: the server proposed the value from the need text or an import, and nobody has
|
|
// confirmed it yet. It is a suggestion: it never feeds search or recommendations and never counts
|
|
// as an answer in readiness.
|
|
// - unknown: the field has no value. `value` and `source` are null. The server never fills an unknown
|
|
// field with a default or a guess, such as a Senior grade, the remote format, or a zero salary.
|
|
//
|
|
// Ref: #/components/schemas/NeedValueStatus
|
|
type NeedValueStatus string
|
|
|
|
const (
|
|
NeedValueStatusConfirmed NeedValueStatus = "confirmed"
|
|
NeedValueStatusExtracted NeedValueStatus = "extracted"
|
|
NeedValueStatusUnknown NeedValueStatus = "unknown"
|
|
)
|
|
|
|
// AllValues returns all NeedValueStatus values.
|
|
func (NeedValueStatus) AllValues() []NeedValueStatus {
|
|
return []NeedValueStatus{
|
|
NeedValueStatusConfirmed,
|
|
NeedValueStatusExtracted,
|
|
NeedValueStatusUnknown,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NeedValueStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NeedValueStatusConfirmed:
|
|
return []byte(s), nil
|
|
case NeedValueStatusExtracted:
|
|
return []byte(s), nil
|
|
case NeedValueStatusUnknown:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NeedValueStatus) UnmarshalText(data []byte) error {
|
|
switch NeedValueStatus(data) {
|
|
case NeedValueStatusConfirmed:
|
|
*s = NeedValueStatusConfirmed
|
|
return nil
|
|
case NeedValueStatusExtracted:
|
|
*s = NeedValueStatusExtracted
|
|
return nil
|
|
case NeedValueStatusUnknown:
|
|
*s = NeedValueStatusUnknown
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type NeedVersion int64
|
|
|
|
type NeedVersionLabel string
|
|
|
|
// Work formats that the employer offers, with their confirmation state and provenance. `value` and
|
|
// `source` are null exactly when `status` is `unknown`; a known value lists one to three formats.
|
|
// Ref: #/components/schemas/NeedWorkFormats
|
|
type NeedWorkFormats struct {
|
|
Status NeedValueStatus `json:"status"`
|
|
Value []WorkFormat `json:"value"`
|
|
Source NilNeedValueSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedWorkFormats) GetStatus() NeedValueStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedWorkFormats) GetValue() []WorkFormat {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *NeedWorkFormats) GetSource() NilNeedValueSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedWorkFormats) SetStatus(val NeedValueStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedWorkFormats) SetValue(val []WorkFormat) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *NeedWorkFormats) SetSource(val NilNeedValueSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the work formats in a request; see NeedUpdate for the rules of `status`. Formats are
|
|
// compared as a set.
|
|
// Ref: #/components/schemas/NeedWorkFormatsInput
|
|
type NeedWorkFormatsInput struct {
|
|
Value []WorkFormat `json:"value"`
|
|
Status NeedItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *NeedWorkFormatsInput) GetValue() []WorkFormat {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *NeedWorkFormatsInput) GetStatus() NeedItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *NeedWorkFormatsInput) SetValue(val []WorkFormat) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *NeedWorkFormatsInput) SetStatus(val NeedItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type NewPassword string
|
|
|
|
// NewNilAnonymousCardContent returns new NilAnonymousCardContent with value set to v.
|
|
func NewNilAnonymousCardContent(v AnonymousCardContent) NilAnonymousCardContent {
|
|
return NilAnonymousCardContent{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAnonymousCardContent is nullable AnonymousCardContent.
|
|
type NilAnonymousCardContent struct {
|
|
Value AnonymousCardContent
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAnonymousCardContent) SetTo(v AnonymousCardContent) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAnonymousCardContent) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAnonymousCardContent) SetToNull() {
|
|
o.Null = true
|
|
var v AnonymousCardContent
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAnonymousCardContent) Get() (v AnonymousCardContent, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAnonymousCardContent) Or(d AnonymousCardContent) AnonymousCardContent {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentItem returns new NilAssessmentItem with value set to v.
|
|
func NewNilAssessmentItem(v AssessmentItem) NilAssessmentItem {
|
|
return NilAssessmentItem{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentItem is nullable AssessmentItem.
|
|
type NilAssessmentItem struct {
|
|
Value AssessmentItem
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentItem) SetTo(v AssessmentItem) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentItem) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentItem) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentItem
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentItem) Get() (v AssessmentItem, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentItem) Or(d AssessmentItem) AssessmentItem {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentNotDeterminedReason returns new NilAssessmentNotDeterminedReason with value set to v.
|
|
func NewNilAssessmentNotDeterminedReason(v AssessmentNotDeterminedReason) NilAssessmentNotDeterminedReason {
|
|
return NilAssessmentNotDeterminedReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentNotDeterminedReason is nullable AssessmentNotDeterminedReason.
|
|
type NilAssessmentNotDeterminedReason struct {
|
|
Value AssessmentNotDeterminedReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentNotDeterminedReason) SetTo(v AssessmentNotDeterminedReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentNotDeterminedReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentNotDeterminedReason) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentNotDeterminedReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentNotDeterminedReason) Get() (v AssessmentNotDeterminedReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentNotDeterminedReason) Or(d AssessmentNotDeterminedReason) AssessmentNotDeterminedReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentRealMode returns new NilAssessmentRealMode with value set to v.
|
|
func NewNilAssessmentRealMode(v AssessmentRealMode) NilAssessmentRealMode {
|
|
return NilAssessmentRealMode{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentRealMode is nullable AssessmentRealMode.
|
|
type NilAssessmentRealMode struct {
|
|
Value AssessmentRealMode
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentRealMode) SetTo(v AssessmentRealMode) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentRealMode) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentRealMode) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentRealMode
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentRealMode) Get() (v AssessmentRealMode, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentRealMode) Or(d AssessmentRealMode) AssessmentRealMode {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentSessions returns new NilAssessmentSessions with value set to v.
|
|
func NewNilAssessmentSessions(v AssessmentSessions) NilAssessmentSessions {
|
|
return NilAssessmentSessions{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentSessions is nullable AssessmentSessions.
|
|
type NilAssessmentSessions struct {
|
|
Value AssessmentSessions
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentSessions) SetTo(v AssessmentSessions) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentSessions) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentSessions) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentSessions
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentSessions) Get() (v AssessmentSessions, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentSessions) Or(d AssessmentSessions) AssessmentSessions {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentStrength returns new NilAssessmentStrength with value set to v.
|
|
func NewNilAssessmentStrength(v AssessmentStrength) NilAssessmentStrength {
|
|
return NilAssessmentStrength{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentStrength is nullable AssessmentStrength.
|
|
type NilAssessmentStrength struct {
|
|
Value AssessmentStrength
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentStrength) SetTo(v AssessmentStrength) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentStrength) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentStrength) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentStrength
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentStrength) Get() (v AssessmentStrength, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentStrength) Or(d AssessmentStrength) AssessmentStrength {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilAssessmentUncertainty returns new NilAssessmentUncertainty with value set to v.
|
|
func NewNilAssessmentUncertainty(v AssessmentUncertainty) NilAssessmentUncertainty {
|
|
return NilAssessmentUncertainty{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilAssessmentUncertainty is nullable AssessmentUncertainty.
|
|
type NilAssessmentUncertainty struct {
|
|
Value AssessmentUncertainty
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilAssessmentUncertainty) SetTo(v AssessmentUncertainty) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilAssessmentUncertainty) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilAssessmentUncertainty) SetToNull() {
|
|
o.Null = true
|
|
var v AssessmentUncertainty
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilAssessmentUncertainty) Get() (v AssessmentUncertainty, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilAssessmentUncertainty) Or(d AssessmentUncertainty) AssessmentUncertainty {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilBasicScore returns new NilBasicScore with value set to v.
|
|
func NewNilBasicScore(v BasicScore) NilBasicScore {
|
|
return NilBasicScore{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilBasicScore is nullable BasicScore.
|
|
type NilBasicScore struct {
|
|
Value BasicScore
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilBasicScore) SetTo(v BasicScore) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilBasicScore) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilBasicScore) SetToNull() {
|
|
o.Null = true
|
|
var v BasicScore
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilBasicScore) Get() (v BasicScore, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilBasicScore) Or(d BasicScore) BasicScore {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilBool returns new NilBool with value set to v.
|
|
func NewNilBool(v bool) NilBool {
|
|
return NilBool{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilBool is nullable bool.
|
|
type NilBool struct {
|
|
Value bool
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilBool) SetTo(v bool) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilBool) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilBool) SetToNull() {
|
|
o.Null = true
|
|
var v bool
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilBool) Get() (v bool, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilBool) Or(d bool) bool {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilCandidateExperience returns new NilCandidateExperience with value set to v.
|
|
func NewNilCandidateExperience(v CandidateExperience) NilCandidateExperience {
|
|
return NilCandidateExperience{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilCandidateExperience is nullable CandidateExperience.
|
|
type NilCandidateExperience struct {
|
|
Value CandidateExperience
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilCandidateExperience) SetTo(v CandidateExperience) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilCandidateExperience) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilCandidateExperience) SetToNull() {
|
|
o.Null = true
|
|
var v CandidateExperience
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilCandidateExperience) Get() (v CandidateExperience, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilCandidateExperience) Or(d CandidateExperience) CandidateExperience {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilConsentOrganization returns new NilConsentOrganization with value set to v.
|
|
func NewNilConsentOrganization(v ConsentOrganization) NilConsentOrganization {
|
|
return NilConsentOrganization{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilConsentOrganization is nullable ConsentOrganization.
|
|
type NilConsentOrganization struct {
|
|
Value ConsentOrganization
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilConsentOrganization) SetTo(v ConsentOrganization) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilConsentOrganization) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilConsentOrganization) SetToNull() {
|
|
o.Null = true
|
|
var v ConsentOrganization
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilConsentOrganization) Get() (v ConsentOrganization, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilConsentOrganization) Or(d ConsentOrganization) ConsentOrganization {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilConsentRevocationSource returns new NilConsentRevocationSource with value set to v.
|
|
func NewNilConsentRevocationSource(v ConsentRevocationSource) NilConsentRevocationSource {
|
|
return NilConsentRevocationSource{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilConsentRevocationSource is nullable ConsentRevocationSource.
|
|
type NilConsentRevocationSource struct {
|
|
Value ConsentRevocationSource
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilConsentRevocationSource) SetTo(v ConsentRevocationSource) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilConsentRevocationSource) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilConsentRevocationSource) SetToNull() {
|
|
o.Null = true
|
|
var v ConsentRevocationSource
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilConsentRevocationSource) Get() (v ConsentRevocationSource, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilConsentRevocationSource) Or(d ConsentRevocationSource) ConsentRevocationSource {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactAccessBlock returns new NilContactAccessBlock with value set to v.
|
|
func NewNilContactAccessBlock(v ContactAccessBlock) NilContactAccessBlock {
|
|
return NilContactAccessBlock{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactAccessBlock is nullable ContactAccessBlock.
|
|
type NilContactAccessBlock struct {
|
|
Value ContactAccessBlock
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactAccessBlock) SetTo(v ContactAccessBlock) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactAccessBlock) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactAccessBlock) SetToNull() {
|
|
o.Null = true
|
|
var v ContactAccessBlock
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactAccessBlock) Get() (v ContactAccessBlock, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactAccessBlock) Or(d ContactAccessBlock) ContactAccessBlock {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactConsentOffer returns new NilContactConsentOffer with value set to v.
|
|
func NewNilContactConsentOffer(v ContactConsentOffer) NilContactConsentOffer {
|
|
return NilContactConsentOffer{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactConsentOffer is nullable ContactConsentOffer.
|
|
type NilContactConsentOffer struct {
|
|
Value ContactConsentOffer
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactConsentOffer) SetTo(v ContactConsentOffer) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactConsentOffer) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactConsentOffer) SetToNull() {
|
|
o.Null = true
|
|
var v ContactConsentOffer
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactConsentOffer) Get() (v ContactConsentOffer, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactConsentOffer) Or(d ContactConsentOffer) ContactConsentOffer {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactFullName returns new NilContactFullName with value set to v.
|
|
func NewNilContactFullName(v ContactFullName) NilContactFullName {
|
|
return NilContactFullName{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactFullName is nullable ContactFullName.
|
|
type NilContactFullName struct {
|
|
Value ContactFullName
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactFullName) SetTo(v ContactFullName) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactFullName) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactFullName) SetToNull() {
|
|
o.Null = true
|
|
var v ContactFullName
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactFullName) Get() (v ContactFullName, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactFullName) Or(d ContactFullName) ContactFullName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactGrant returns new NilContactGrant with value set to v.
|
|
func NewNilContactGrant(v ContactGrant) NilContactGrant {
|
|
return NilContactGrant{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactGrant is nullable ContactGrant.
|
|
type NilContactGrant struct {
|
|
Value ContactGrant
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactGrant) SetTo(v ContactGrant) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactGrant) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactGrant) SetToNull() {
|
|
o.Null = true
|
|
var v ContactGrant
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactGrant) Get() (v ContactGrant, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactGrant) Or(d ContactGrant) ContactGrant {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactPhoneNumber returns new NilContactPhoneNumber with value set to v.
|
|
func NewNilContactPhoneNumber(v ContactPhoneNumber) NilContactPhoneNumber {
|
|
return NilContactPhoneNumber{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactPhoneNumber is nullable ContactPhoneNumber.
|
|
type NilContactPhoneNumber struct {
|
|
Value ContactPhoneNumber
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactPhoneNumber) SetTo(v ContactPhoneNumber) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactPhoneNumber) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactPhoneNumber) SetToNull() {
|
|
o.Null = true
|
|
var v ContactPhoneNumber
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactPhoneNumber) Get() (v ContactPhoneNumber, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactPhoneNumber) Or(d ContactPhoneNumber) ContactPhoneNumber {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactRevocationReason returns new NilContactRevocationReason with value set to v.
|
|
func NewNilContactRevocationReason(v ContactRevocationReason) NilContactRevocationReason {
|
|
return NilContactRevocationReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactRevocationReason is nullable ContactRevocationReason.
|
|
type NilContactRevocationReason struct {
|
|
Value ContactRevocationReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactRevocationReason) SetTo(v ContactRevocationReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactRevocationReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactRevocationReason) SetToNull() {
|
|
o.Null = true
|
|
var v ContactRevocationReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactRevocationReason) Get() (v ContactRevocationReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactRevocationReason) Or(d ContactRevocationReason) ContactRevocationReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilContactTelegramUsername returns new NilContactTelegramUsername with value set to v.
|
|
func NewNilContactTelegramUsername(v ContactTelegramUsername) NilContactTelegramUsername {
|
|
return NilContactTelegramUsername{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilContactTelegramUsername is nullable ContactTelegramUsername.
|
|
type NilContactTelegramUsername struct {
|
|
Value ContactTelegramUsername
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilContactTelegramUsername) SetTo(v ContactTelegramUsername) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilContactTelegramUsername) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilContactTelegramUsername) SetToNull() {
|
|
o.Null = true
|
|
var v ContactTelegramUsername
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilContactTelegramUsername) Get() (v ContactTelegramUsername, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilContactTelegramUsername) Or(d ContactTelegramUsername) ContactTelegramUsername {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilEmailAddress returns new NilEmailAddress with value set to v.
|
|
func NewNilEmailAddress(v EmailAddress) NilEmailAddress {
|
|
return NilEmailAddress{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilEmailAddress is nullable EmailAddress.
|
|
type NilEmailAddress struct {
|
|
Value EmailAddress
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilEmailAddress) SetTo(v EmailAddress) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilEmailAddress) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilEmailAddress) SetToNull() {
|
|
o.Null = true
|
|
var v EmailAddress
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilEmailAddress) Get() (v EmailAddress, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilEmailAddress) Or(d EmailAddress) EmailAddress {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilFloat64 returns new NilFloat64 with value set to v.
|
|
func NewNilFloat64(v float64) NilFloat64 {
|
|
return NilFloat64{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilFloat64 is nullable float64.
|
|
type NilFloat64 struct {
|
|
Value float64
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilFloat64) SetTo(v float64) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilFloat64) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilFloat64) SetToNull() {
|
|
o.Null = true
|
|
var v float64
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilFloat64) Get() (v float64, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilFloat64) Or(d float64) float64 {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilGradeCode returns new NilGradeCode with value set to v.
|
|
func NewNilGradeCode(v GradeCode) NilGradeCode {
|
|
return NilGradeCode{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilGradeCode is nullable GradeCode.
|
|
type NilGradeCode struct {
|
|
Value GradeCode
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilGradeCode) SetTo(v GradeCode) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilGradeCode) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilGradeCode) SetToNull() {
|
|
o.Null = true
|
|
var v GradeCode
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilGradeCode) Get() (v GradeCode, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilGradeCode) Or(d GradeCode) GradeCode {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInt returns new NilInt with value set to v.
|
|
func NewNilInt(v int) NilInt {
|
|
return NilInt{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInt is nullable int.
|
|
type NilInt struct {
|
|
Value int
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInt) SetTo(v int) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInt) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInt) SetToNull() {
|
|
o.Null = true
|
|
var v int
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInt) Get() (v int, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInt) Or(d int) int {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInt32 returns new NilInt32 with value set to v.
|
|
func NewNilInt32(v int32) NilInt32 {
|
|
return NilInt32{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInt32 is nullable int32.
|
|
type NilInt32 struct {
|
|
Value int32
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInt32) SetTo(v int32) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInt32) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInt32) SetToNull() {
|
|
o.Null = true
|
|
var v int32
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInt32) Get() (v int32, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInt32) Or(d int32) int32 {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationCommunicationNote returns new NilInvitationCommunicationNote with value set to v.
|
|
func NewNilInvitationCommunicationNote(v InvitationCommunicationNote) NilInvitationCommunicationNote {
|
|
return NilInvitationCommunicationNote{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationCommunicationNote is nullable InvitationCommunicationNote.
|
|
type NilInvitationCommunicationNote struct {
|
|
Value InvitationCommunicationNote
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationCommunicationNote) SetTo(v InvitationCommunicationNote) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationCommunicationNote) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationCommunicationNote) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationCommunicationNote
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationCommunicationNote) Get() (v InvitationCommunicationNote, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationCommunicationNote) Or(d InvitationCommunicationNote) InvitationCommunicationNote {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationDeclineComment returns new NilInvitationDeclineComment with value set to v.
|
|
func NewNilInvitationDeclineComment(v InvitationDeclineComment) NilInvitationDeclineComment {
|
|
return NilInvitationDeclineComment{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationDeclineComment is nullable InvitationDeclineComment.
|
|
type NilInvitationDeclineComment struct {
|
|
Value InvitationDeclineComment
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationDeclineComment) SetTo(v InvitationDeclineComment) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationDeclineComment) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationDeclineComment) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationDeclineComment
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationDeclineComment) Get() (v InvitationDeclineComment, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationDeclineComment) Or(d InvitationDeclineComment) InvitationDeclineComment {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationDeclineRecord returns new NilInvitationDeclineRecord with value set to v.
|
|
func NewNilInvitationDeclineRecord(v InvitationDeclineRecord) NilInvitationDeclineRecord {
|
|
return NilInvitationDeclineRecord{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationDeclineRecord is nullable InvitationDeclineRecord.
|
|
type NilInvitationDeclineRecord struct {
|
|
Value InvitationDeclineRecord
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationDeclineRecord) SetTo(v InvitationDeclineRecord) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationDeclineRecord) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationDeclineRecord) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationDeclineRecord
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationDeclineRecord) Get() (v InvitationDeclineRecord, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationDeclineRecord) Or(d InvitationDeclineRecord) InvitationDeclineRecord {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationExpiryReason returns new NilInvitationExpiryReason with value set to v.
|
|
func NewNilInvitationExpiryReason(v InvitationExpiryReason) NilInvitationExpiryReason {
|
|
return NilInvitationExpiryReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationExpiryReason is nullable InvitationExpiryReason.
|
|
type NilInvitationExpiryReason struct {
|
|
Value InvitationExpiryReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationExpiryReason) SetTo(v InvitationExpiryReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationExpiryReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationExpiryReason) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationExpiryReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationExpiryReason) Get() (v InvitationExpiryReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationExpiryReason) Or(d InvitationExpiryReason) InvitationExpiryReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationNeedReference returns new NilInvitationNeedReference with value set to v.
|
|
func NewNilInvitationNeedReference(v InvitationNeedReference) NilInvitationNeedReference {
|
|
return NilInvitationNeedReference{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationNeedReference is nullable InvitationNeedReference.
|
|
type NilInvitationNeedReference struct {
|
|
Value InvitationNeedReference
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationNeedReference) SetTo(v InvitationNeedReference) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationNeedReference) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationNeedReference) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationNeedReference
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationNeedReference) Get() (v InvitationNeedReference, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationNeedReference) Or(d InvitationNeedReference) InvitationNeedReference {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilInvitationTermsVersion returns new NilInvitationTermsVersion with value set to v.
|
|
func NewNilInvitationTermsVersion(v InvitationTermsVersion) NilInvitationTermsVersion {
|
|
return NilInvitationTermsVersion{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilInvitationTermsVersion is nullable InvitationTermsVersion.
|
|
type NilInvitationTermsVersion struct {
|
|
Value InvitationTermsVersion
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilInvitationTermsVersion) SetTo(v InvitationTermsVersion) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilInvitationTermsVersion) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilInvitationTermsVersion) SetToNull() {
|
|
o.Null = true
|
|
var v InvitationTermsVersion
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilInvitationTermsVersion) Get() (v InvitationTermsVersion, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilInvitationTermsVersion) Or(d InvitationTermsVersion) InvitationTermsVersion {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedDomainName returns new NilNeedDomainName with value set to v.
|
|
func NewNilNeedDomainName(v NeedDomainName) NilNeedDomainName {
|
|
return NilNeedDomainName{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedDomainName is nullable NeedDomainName.
|
|
type NilNeedDomainName struct {
|
|
Value NeedDomainName
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedDomainName) SetTo(v NeedDomainName) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedDomainName) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedDomainName) SetToNull() {
|
|
o.Null = true
|
|
var v NeedDomainName
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedDomainName) Get() (v NeedDomainName, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedDomainName) Or(d NeedDomainName) NeedDomainName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedLocationName returns new NilNeedLocationName with value set to v.
|
|
func NewNilNeedLocationName(v NeedLocationName) NilNeedLocationName {
|
|
return NilNeedLocationName{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedLocationName is nullable NeedLocationName.
|
|
type NilNeedLocationName struct {
|
|
Value NeedLocationName
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedLocationName) SetTo(v NeedLocationName) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedLocationName) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedLocationName) SetToNull() {
|
|
o.Null = true
|
|
var v NeedLocationName
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedLocationName) Get() (v NeedLocationName, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedLocationName) Or(d NeedLocationName) NeedLocationName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedSourceQuote returns new NilNeedSourceQuote with value set to v.
|
|
func NewNilNeedSourceQuote(v NeedSourceQuote) NilNeedSourceQuote {
|
|
return NilNeedSourceQuote{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedSourceQuote is nullable NeedSourceQuote.
|
|
type NilNeedSourceQuote struct {
|
|
Value NeedSourceQuote
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedSourceQuote) SetTo(v NeedSourceQuote) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedSourceQuote) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedSourceQuote) SetToNull() {
|
|
o.Null = true
|
|
var v NeedSourceQuote
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedSourceQuote) Get() (v NeedSourceQuote, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedSourceQuote) Or(d NeedSourceQuote) NeedSourceQuote {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedSourceText returns new NilNeedSourceText with value set to v.
|
|
func NewNilNeedSourceText(v NeedSourceText) NilNeedSourceText {
|
|
return NilNeedSourceText{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedSourceText is nullable NeedSourceText.
|
|
type NilNeedSourceText struct {
|
|
Value NeedSourceText
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedSourceText) SetTo(v NeedSourceText) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedSourceText) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedSourceText) SetToNull() {
|
|
o.Null = true
|
|
var v NeedSourceText
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedSourceText) Get() (v NeedSourceText, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedSourceText) Or(d NeedSourceText) NeedSourceText {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedValueSource returns new NilNeedValueSource with value set to v.
|
|
func NewNilNeedValueSource(v NeedValueSource) NilNeedValueSource {
|
|
return NilNeedValueSource{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedValueSource is nullable NeedValueSource.
|
|
type NilNeedValueSource struct {
|
|
Value NeedValueSource
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedValueSource) SetTo(v NeedValueSource) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedValueSource) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedValueSource) SetToNull() {
|
|
o.Null = true
|
|
var v NeedValueSource
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedValueSource) Get() (v NeedValueSource, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedValueSource) Or(d NeedValueSource) NeedValueSource {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedVersion returns new NilNeedVersion with value set to v.
|
|
func NewNilNeedVersion(v NeedVersion) NilNeedVersion {
|
|
return NilNeedVersion{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedVersion is nullable NeedVersion.
|
|
type NilNeedVersion struct {
|
|
Value NeedVersion
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedVersion) SetTo(v NeedVersion) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedVersion) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedVersion) SetToNull() {
|
|
o.Null = true
|
|
var v NeedVersion
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedVersion) Get() (v NeedVersion, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedVersion) Or(d NeedVersion) NeedVersion {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilNeedVersionLabel returns new NilNeedVersionLabel with value set to v.
|
|
func NewNilNeedVersionLabel(v NeedVersionLabel) NilNeedVersionLabel {
|
|
return NilNeedVersionLabel{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilNeedVersionLabel is nullable NeedVersionLabel.
|
|
type NilNeedVersionLabel struct {
|
|
Value NeedVersionLabel
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilNeedVersionLabel) SetTo(v NeedVersionLabel) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilNeedVersionLabel) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilNeedVersionLabel) SetToNull() {
|
|
o.Null = true
|
|
var v NeedVersionLabel
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilNeedVersionLabel) Get() (v NeedVersionLabel, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilNeedVersionLabel) Or(d NeedVersionLabel) NeedVersionLabel {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilOrganizationDescription returns new NilOrganizationDescription with value set to v.
|
|
func NewNilOrganizationDescription(v OrganizationDescription) NilOrganizationDescription {
|
|
return NilOrganizationDescription{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilOrganizationDescription is nullable OrganizationDescription.
|
|
type NilOrganizationDescription struct {
|
|
Value OrganizationDescription
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilOrganizationDescription) SetTo(v OrganizationDescription) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilOrganizationDescription) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilOrganizationDescription) SetToNull() {
|
|
o.Null = true
|
|
var v OrganizationDescription
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilOrganizationDescription) Get() (v OrganizationDescription, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilOrganizationDescription) Or(d OrganizationDescription) OrganizationDescription {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilOrganizationSphere returns new NilOrganizationSphere with value set to v.
|
|
func NewNilOrganizationSphere(v OrganizationSphere) NilOrganizationSphere {
|
|
return NilOrganizationSphere{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilOrganizationSphere is nullable OrganizationSphere.
|
|
type NilOrganizationSphere struct {
|
|
Value OrganizationSphere
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilOrganizationSphere) SetTo(v OrganizationSphere) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilOrganizationSphere) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilOrganizationSphere) SetToNull() {
|
|
o.Null = true
|
|
var v OrganizationSphere
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilOrganizationSphere) Get() (v OrganizationSphere, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilOrganizationSphere) Or(d OrganizationSphere) OrganizationSphere {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilOrganizationWebsite returns new NilOrganizationWebsite with value set to v.
|
|
func NewNilOrganizationWebsite(v OrganizationWebsite) NilOrganizationWebsite {
|
|
return NilOrganizationWebsite{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilOrganizationWebsite is nullable OrganizationWebsite.
|
|
type NilOrganizationWebsite struct {
|
|
Value OrganizationWebsite
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilOrganizationWebsite) SetTo(v OrganizationWebsite) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilOrganizationWebsite) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilOrganizationWebsite) SetToNull() {
|
|
o.Null = true
|
|
var v OrganizationWebsite
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilOrganizationWebsite) Get() (v OrganizationWebsite, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilOrganizationWebsite) Or(d OrganizationWebsite) OrganizationWebsite {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilPracticeFailureReason returns new NilPracticeFailureReason with value set to v.
|
|
func NewNilPracticeFailureReason(v PracticeFailureReason) NilPracticeFailureReason {
|
|
return NilPracticeFailureReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilPracticeFailureReason is nullable PracticeFailureReason.
|
|
type NilPracticeFailureReason struct {
|
|
Value PracticeFailureReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilPracticeFailureReason) SetTo(v PracticeFailureReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilPracticeFailureReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilPracticeFailureReason) SetToNull() {
|
|
o.Null = true
|
|
var v PracticeFailureReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilPracticeFailureReason) Get() (v PracticeFailureReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilPracticeFailureReason) Or(d PracticeFailureReason) PracticeFailureReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilPracticeVerdict returns new NilPracticeVerdict with value set to v.
|
|
func NewNilPracticeVerdict(v PracticeVerdict) NilPracticeVerdict {
|
|
return NilPracticeVerdict{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilPracticeVerdict is nullable PracticeVerdict.
|
|
type NilPracticeVerdict struct {
|
|
Value PracticeVerdict
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilPracticeVerdict) SetTo(v PracticeVerdict) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilPracticeVerdict) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilPracticeVerdict) SetToNull() {
|
|
o.Null = true
|
|
var v PracticeVerdict
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilPracticeVerdict) Get() (v PracticeVerdict, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilPracticeVerdict) Or(d PracticeVerdict) PracticeVerdict {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilPrivacyOrganization returns new NilPrivacyOrganization with value set to v.
|
|
func NewNilPrivacyOrganization(v PrivacyOrganization) NilPrivacyOrganization {
|
|
return NilPrivacyOrganization{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilPrivacyOrganization is nullable PrivacyOrganization.
|
|
type NilPrivacyOrganization struct {
|
|
Value PrivacyOrganization
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilPrivacyOrganization) SetTo(v PrivacyOrganization) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilPrivacyOrganization) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilPrivacyOrganization) SetToNull() {
|
|
o.Null = true
|
|
var v PrivacyOrganization
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilPrivacyOrganization) Get() (v PrivacyOrganization, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilPrivacyOrganization) Or(d PrivacyOrganization) PrivacyOrganization {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileClaimQuote returns new NilProfileClaimQuote with value set to v.
|
|
func NewNilProfileClaimQuote(v ProfileClaimQuote) NilProfileClaimQuote {
|
|
return NilProfileClaimQuote{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileClaimQuote is nullable ProfileClaimQuote.
|
|
type NilProfileClaimQuote struct {
|
|
Value ProfileClaimQuote
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileClaimQuote) SetTo(v ProfileClaimQuote) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileClaimQuote) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileClaimQuote) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileClaimQuote
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileClaimQuote) Get() (v ProfileClaimQuote, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileClaimQuote) Or(d ProfileClaimQuote) ProfileClaimQuote {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileClaimSource returns new NilProfileClaimSource with value set to v.
|
|
func NewNilProfileClaimSource(v ProfileClaimSource) NilProfileClaimSource {
|
|
return NilProfileClaimSource{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileClaimSource is nullable ProfileClaimSource.
|
|
type NilProfileClaimSource struct {
|
|
Value ProfileClaimSource
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileClaimSource) SetTo(v ProfileClaimSource) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileClaimSource) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileClaimSource) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileClaimSource
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileClaimSource) Get() (v ProfileClaimSource, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileClaimSource) Or(d ProfileClaimSource) ProfileClaimSource {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileEmailInput returns new NilProfileEmailInput with value set to v.
|
|
func NewNilProfileEmailInput(v ProfileEmailInput) NilProfileEmailInput {
|
|
return NilProfileEmailInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileEmailInput is nullable ProfileEmailInput.
|
|
type NilProfileEmailInput struct {
|
|
Value ProfileEmailInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileEmailInput) SetTo(v ProfileEmailInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileEmailInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileEmailInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileEmailInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileEmailInput) Get() (v ProfileEmailInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileEmailInput) Or(d ProfileEmailInput) ProfileEmailInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileEmployerName returns new NilProfileEmployerName with value set to v.
|
|
func NewNilProfileEmployerName(v ProfileEmployerName) NilProfileEmployerName {
|
|
return NilProfileEmployerName{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileEmployerName is nullable ProfileEmployerName.
|
|
type NilProfileEmployerName struct {
|
|
Value ProfileEmployerName
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileEmployerName) SetTo(v ProfileEmployerName) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileEmployerName) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileEmployerName) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileEmployerName
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileEmployerName) Get() (v ProfileEmployerName, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileEmployerName) Or(d ProfileEmployerName) ProfileEmployerName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileExperienceSummary returns new NilProfileExperienceSummary with value set to v.
|
|
func NewNilProfileExperienceSummary(v ProfileExperienceSummary) NilProfileExperienceSummary {
|
|
return NilProfileExperienceSummary{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileExperienceSummary is nullable ProfileExperienceSummary.
|
|
type NilProfileExperienceSummary struct {
|
|
Value ProfileExperienceSummary
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileExperienceSummary) SetTo(v ProfileExperienceSummary) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileExperienceSummary) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileExperienceSummary) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileExperienceSummary
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileExperienceSummary) Get() (v ProfileExperienceSummary, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileExperienceSummary) Or(d ProfileExperienceSummary) ProfileExperienceSummary {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileFullNameInput returns new NilProfileFullNameInput with value set to v.
|
|
func NewNilProfileFullNameInput(v ProfileFullNameInput) NilProfileFullNameInput {
|
|
return NilProfileFullNameInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileFullNameInput is nullable ProfileFullNameInput.
|
|
type NilProfileFullNameInput struct {
|
|
Value ProfileFullNameInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileFullNameInput) SetTo(v ProfileFullNameInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileFullNameInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileFullNameInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileFullNameInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileFullNameInput) Get() (v ProfileFullNameInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileFullNameInput) Or(d ProfileFullNameInput) ProfileFullNameInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileLocationInput returns new NilProfileLocationInput with value set to v.
|
|
func NewNilProfileLocationInput(v ProfileLocationInput) NilProfileLocationInput {
|
|
return NilProfileLocationInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileLocationInput is nullable ProfileLocationInput.
|
|
type NilProfileLocationInput struct {
|
|
Value ProfileLocationInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileLocationInput) SetTo(v ProfileLocationInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileLocationInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileLocationInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileLocationInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileLocationInput) Get() (v ProfileLocationInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileLocationInput) Or(d ProfileLocationInput) ProfileLocationInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileLocationName returns new NilProfileLocationName with value set to v.
|
|
func NewNilProfileLocationName(v ProfileLocationName) NilProfileLocationName {
|
|
return NilProfileLocationName{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileLocationName is nullable ProfileLocationName.
|
|
type NilProfileLocationName struct {
|
|
Value ProfileLocationName
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileLocationName) SetTo(v ProfileLocationName) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileLocationName) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileLocationName) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileLocationName
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileLocationName) Get() (v ProfileLocationName, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileLocationName) Or(d ProfileLocationName) ProfileLocationName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfilePhoneInput returns new NilProfilePhoneInput with value set to v.
|
|
func NewNilProfilePhoneInput(v ProfilePhoneInput) NilProfilePhoneInput {
|
|
return NilProfilePhoneInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfilePhoneInput is nullable ProfilePhoneInput.
|
|
type NilProfilePhoneInput struct {
|
|
Value ProfilePhoneInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfilePhoneInput) SetTo(v ProfilePhoneInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfilePhoneInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfilePhoneInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfilePhoneInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfilePhoneInput) Get() (v ProfilePhoneInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfilePhoneInput) Or(d ProfilePhoneInput) ProfilePhoneInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileRelocationInput returns new NilProfileRelocationInput with value set to v.
|
|
func NewNilProfileRelocationInput(v ProfileRelocationInput) NilProfileRelocationInput {
|
|
return NilProfileRelocationInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileRelocationInput is nullable ProfileRelocationInput.
|
|
type NilProfileRelocationInput struct {
|
|
Value ProfileRelocationInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileRelocationInput) SetTo(v ProfileRelocationInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileRelocationInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileRelocationInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileRelocationInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileRelocationInput) Get() (v ProfileRelocationInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileRelocationInput) Or(d ProfileRelocationInput) ProfileRelocationInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileSalaryMinimum returns new NilProfileSalaryMinimum with value set to v.
|
|
func NewNilProfileSalaryMinimum(v ProfileSalaryMinimum) NilProfileSalaryMinimum {
|
|
return NilProfileSalaryMinimum{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileSalaryMinimum is nullable ProfileSalaryMinimum.
|
|
type NilProfileSalaryMinimum struct {
|
|
Value ProfileSalaryMinimum
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileSalaryMinimum) SetTo(v ProfileSalaryMinimum) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileSalaryMinimum) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileSalaryMinimum) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileSalaryMinimum
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileSalaryMinimum) Get() (v ProfileSalaryMinimum, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileSalaryMinimum) Or(d ProfileSalaryMinimum) ProfileSalaryMinimum {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileSalaryMinimumInput returns new NilProfileSalaryMinimumInput with value set to v.
|
|
func NewNilProfileSalaryMinimumInput(v ProfileSalaryMinimumInput) NilProfileSalaryMinimumInput {
|
|
return NilProfileSalaryMinimumInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileSalaryMinimumInput is nullable ProfileSalaryMinimumInput.
|
|
type NilProfileSalaryMinimumInput struct {
|
|
Value ProfileSalaryMinimumInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileSalaryMinimumInput) SetTo(v ProfileSalaryMinimumInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileSalaryMinimumInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileSalaryMinimumInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileSalaryMinimumInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileSalaryMinimumInput) Get() (v ProfileSalaryMinimumInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileSalaryMinimumInput) Or(d ProfileSalaryMinimumInput) ProfileSalaryMinimumInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileTelegramInput returns new NilProfileTelegramInput with value set to v.
|
|
func NewNilProfileTelegramInput(v ProfileTelegramInput) NilProfileTelegramInput {
|
|
return NilProfileTelegramInput{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileTelegramInput is nullable ProfileTelegramInput.
|
|
type NilProfileTelegramInput struct {
|
|
Value ProfileTelegramInput
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileTelegramInput) SetTo(v ProfileTelegramInput) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileTelegramInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileTelegramInput) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileTelegramInput
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileTelegramInput) Get() (v ProfileTelegramInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileTelegramInput) Or(d ProfileTelegramInput) ProfileTelegramInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilProfileYearMonth returns new NilProfileYearMonth with value set to v.
|
|
func NewNilProfileYearMonth(v ProfileYearMonth) NilProfileYearMonth {
|
|
return NilProfileYearMonth{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilProfileYearMonth is nullable ProfileYearMonth.
|
|
type NilProfileYearMonth struct {
|
|
Value ProfileYearMonth
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilProfileYearMonth) SetTo(v ProfileYearMonth) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilProfileYearMonth) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilProfileYearMonth) SetToNull() {
|
|
o.Null = true
|
|
var v ProfileYearMonth
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilProfileYearMonth) Get() (v ProfileYearMonth, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilProfileYearMonth) Or(d ProfileYearMonth) ProfileYearMonth {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilPublicationClosedReason returns new NilPublicationClosedReason with value set to v.
|
|
func NewNilPublicationClosedReason(v PublicationClosedReason) NilPublicationClosedReason {
|
|
return NilPublicationClosedReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilPublicationClosedReason is nullable PublicationClosedReason.
|
|
type NilPublicationClosedReason struct {
|
|
Value PublicationClosedReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilPublicationClosedReason) SetTo(v PublicationClosedReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilPublicationClosedReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilPublicationClosedReason) SetToNull() {
|
|
o.Null = true
|
|
var v PublicationClosedReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilPublicationClosedReason) Get() (v PublicationClosedReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilPublicationClosedReason) Or(d PublicationClosedReason) PublicationClosedReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSalaryRange returns new NilSalaryRange with value set to v.
|
|
func NewNilSalaryRange(v SalaryRange) NilSalaryRange {
|
|
return NilSalaryRange{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSalaryRange is nullable SalaryRange.
|
|
type NilSalaryRange struct {
|
|
Value SalaryRange
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSalaryRange) SetTo(v SalaryRange) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSalaryRange) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSalaryRange) SetToNull() {
|
|
o.Null = true
|
|
var v SalaryRange
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSalaryRange) Get() (v SalaryRange, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSalaryRange) Or(d SalaryRange) SalaryRange {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSkillTaxonomyCode returns new NilSkillTaxonomyCode with value set to v.
|
|
func NewNilSkillTaxonomyCode(v SkillTaxonomyCode) NilSkillTaxonomyCode {
|
|
return NilSkillTaxonomyCode{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSkillTaxonomyCode is nullable SkillTaxonomyCode.
|
|
type NilSkillTaxonomyCode struct {
|
|
Value SkillTaxonomyCode
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSkillTaxonomyCode) SetTo(v SkillTaxonomyCode) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSkillTaxonomyCode) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSkillTaxonomyCode) SetToNull() {
|
|
o.Null = true
|
|
var v SkillTaxonomyCode
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSkillTaxonomyCode) Get() (v SkillTaxonomyCode, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSkillTaxonomyCode) Or(d SkillTaxonomyCode) SkillTaxonomyCode {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSpecializationCode returns new NilSpecializationCode with value set to v.
|
|
func NewNilSpecializationCode(v SpecializationCode) NilSpecializationCode {
|
|
return NilSpecializationCode{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSpecializationCode is nullable SpecializationCode.
|
|
type NilSpecializationCode struct {
|
|
Value SpecializationCode
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSpecializationCode) SetTo(v SpecializationCode) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSpecializationCode) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSpecializationCode) SetToNull() {
|
|
o.Null = true
|
|
var v SpecializationCode
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSpecializationCode) Get() (v SpecializationCode, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSpecializationCode) Or(d SpecializationCode) SpecializationCode {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilString returns new NilString with value set to v.
|
|
func NewNilString(v string) NilString {
|
|
return NilString{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilString is nullable string.
|
|
type NilString struct {
|
|
Value string
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilString) SetTo(v string) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilString) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilString) SetToNull() {
|
|
o.Null = true
|
|
var v string
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilString) Get() (v string, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilString) Or(d string) string {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseAssessmentTarget returns new NilSupportCaseAssessmentTarget with value set to v.
|
|
func NewNilSupportCaseAssessmentTarget(v SupportCaseAssessmentTarget) NilSupportCaseAssessmentTarget {
|
|
return NilSupportCaseAssessmentTarget{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseAssessmentTarget is nullable SupportCaseAssessmentTarget.
|
|
type NilSupportCaseAssessmentTarget struct {
|
|
Value SupportCaseAssessmentTarget
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseAssessmentTarget) SetTo(v SupportCaseAssessmentTarget) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseAssessmentTarget) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseAssessmentTarget) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseAssessmentTarget
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseAssessmentTarget) Get() (v SupportCaseAssessmentTarget, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseAssessmentTarget) Or(d SupportCaseAssessmentTarget) SupportCaseAssessmentTarget {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseComplaintReason returns new NilSupportCaseComplaintReason with value set to v.
|
|
func NewNilSupportCaseComplaintReason(v SupportCaseComplaintReason) NilSupportCaseComplaintReason {
|
|
return NilSupportCaseComplaintReason{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseComplaintReason is nullable SupportCaseComplaintReason.
|
|
type NilSupportCaseComplaintReason struct {
|
|
Value SupportCaseComplaintReason
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseComplaintReason) SetTo(v SupportCaseComplaintReason) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseComplaintReason) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseComplaintReason) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseComplaintReason
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseComplaintReason) Get() (v SupportCaseComplaintReason, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseComplaintReason) Or(d SupportCaseComplaintReason) SupportCaseComplaintReason {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseDecision returns new NilSupportCaseDecision with value set to v.
|
|
func NewNilSupportCaseDecision(v SupportCaseDecision) NilSupportCaseDecision {
|
|
return NilSupportCaseDecision{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseDecision is nullable SupportCaseDecision.
|
|
type NilSupportCaseDecision struct {
|
|
Value SupportCaseDecision
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseDecision) SetTo(v SupportCaseDecision) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseDecision) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseDecision) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseDecision
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseDecision) Get() (v SupportCaseDecision, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseDecision) Or(d SupportCaseDecision) SupportCaseDecision {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseDecisionOutcome returns new NilSupportCaseDecisionOutcome with value set to v.
|
|
func NewNilSupportCaseDecisionOutcome(v SupportCaseDecisionOutcome) NilSupportCaseDecisionOutcome {
|
|
return NilSupportCaseDecisionOutcome{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseDecisionOutcome is nullable SupportCaseDecisionOutcome.
|
|
type NilSupportCaseDecisionOutcome struct {
|
|
Value SupportCaseDecisionOutcome
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseDecisionOutcome) SetTo(v SupportCaseDecisionOutcome) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseDecisionOutcome) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseDecisionOutcome) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseDecisionOutcome
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseDecisionOutcome) Get() (v SupportCaseDecisionOutcome, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseDecisionOutcome) Or(d SupportCaseDecisionOutcome) SupportCaseDecisionOutcome {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseObjectReference returns new NilSupportCaseObjectReference with value set to v.
|
|
func NewNilSupportCaseObjectReference(v SupportCaseObjectReference) NilSupportCaseObjectReference {
|
|
return NilSupportCaseObjectReference{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseObjectReference is nullable SupportCaseObjectReference.
|
|
type NilSupportCaseObjectReference struct {
|
|
Value SupportCaseObjectReference
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseObjectReference) SetTo(v SupportCaseObjectReference) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseObjectReference) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseObjectReference) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseObjectReference
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseObjectReference) Get() (v SupportCaseObjectReference, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseObjectReference) Or(d SupportCaseObjectReference) SupportCaseObjectReference {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCasePublicText returns new NilSupportCasePublicText with value set to v.
|
|
func NewNilSupportCasePublicText(v SupportCasePublicText) NilSupportCasePublicText {
|
|
return NilSupportCasePublicText{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCasePublicText is nullable SupportCasePublicText.
|
|
type NilSupportCasePublicText struct {
|
|
Value SupportCasePublicText
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCasePublicText) SetTo(v SupportCasePublicText) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCasePublicText) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCasePublicText) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCasePublicText
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCasePublicText) Get() (v SupportCasePublicText, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCasePublicText) Or(d SupportCasePublicText) SupportCasePublicText {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilSupportCaseStatus returns new NilSupportCaseStatus with value set to v.
|
|
func NewNilSupportCaseStatus(v SupportCaseStatus) NilSupportCaseStatus {
|
|
return NilSupportCaseStatus{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilSupportCaseStatus is nullable SupportCaseStatus.
|
|
type NilSupportCaseStatus struct {
|
|
Value SupportCaseStatus
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilSupportCaseStatus) SetTo(v SupportCaseStatus) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilSupportCaseStatus) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilSupportCaseStatus) SetToNull() {
|
|
o.Null = true
|
|
var v SupportCaseStatus
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilSupportCaseStatus) Get() (v SupportCaseStatus, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilSupportCaseStatus) Or(d SupportCaseStatus) SupportCaseStatus {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilTaskLanguage returns new NilTaskLanguage with value set to v.
|
|
func NewNilTaskLanguage(v TaskLanguage) NilTaskLanguage {
|
|
return NilTaskLanguage{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilTaskLanguage is nullable TaskLanguage.
|
|
type NilTaskLanguage struct {
|
|
Value TaskLanguage
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilTaskLanguage) SetTo(v TaskLanguage) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilTaskLanguage) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilTaskLanguage) SetToNull() {
|
|
o.Null = true
|
|
var v TaskLanguage
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilTaskLanguage) Get() (v TaskLanguage, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilTaskLanguage) Or(d TaskLanguage) TaskLanguage {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilTimestamp returns new NilTimestamp with value set to v.
|
|
func NewNilTimestamp(v Timestamp) NilTimestamp {
|
|
return NilTimestamp{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilTimestamp is nullable Timestamp.
|
|
type NilTimestamp struct {
|
|
Value Timestamp
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilTimestamp) SetTo(v Timestamp) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilTimestamp) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilTimestamp) SetToNull() {
|
|
o.Null = true
|
|
var v Timestamp
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilTimestamp) Get() (v Timestamp, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilTimestamp) Or(d Timestamp) Timestamp {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilUUID returns new NilUUID with value set to v.
|
|
func NewNilUUID(v uuid.UUID) NilUUID {
|
|
return NilUUID{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilUUID is nullable uuid.UUID.
|
|
type NilUUID struct {
|
|
Value uuid.UUID
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilUUID) SetTo(v uuid.UUID) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilUUID) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilUUID) SetToNull() {
|
|
o.Null = true
|
|
var v uuid.UUID
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilUUID) Get() (v uuid.UUID, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilUUID) Or(d uuid.UUID) uuid.UUID {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewNilWorkContext returns new NilWorkContext with value set to v.
|
|
func NewNilWorkContext(v WorkContext) NilWorkContext {
|
|
return NilWorkContext{
|
|
Value: v,
|
|
}
|
|
}
|
|
|
|
// NilWorkContext is nullable WorkContext.
|
|
type NilWorkContext struct {
|
|
Value WorkContext
|
|
Null bool
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *NilWorkContext) SetTo(v WorkContext) {
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o NilWorkContext) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *NilWorkContext) SetToNull() {
|
|
o.Null = true
|
|
var v WorkContext
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o NilWorkContext) Get() (v WorkContext, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o NilWorkContext) Or(d WorkContext) WorkContext {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// Numeric answer in the unit of the item. Two answers are equal when their decoded values are
|
|
// numerically equal, so 254 and 254.0 are the same answer.
|
|
// Ref: #/components/schemas/NumberAnswer
|
|
type NumberAnswer struct {
|
|
Format NumberAnswerFormat `json:"format"`
|
|
Number float64 `json:"number"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *NumberAnswer) GetFormat() NumberAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetNumber returns the value of Number.
|
|
func (s *NumberAnswer) GetNumber() float64 {
|
|
return s.Number
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *NumberAnswer) SetFormat(val NumberAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetNumber sets the value of Number.
|
|
func (s *NumberAnswer) SetNumber(val float64) {
|
|
s.Number = val
|
|
}
|
|
|
|
type NumberAnswerFormat string
|
|
|
|
const (
|
|
NumberAnswerFormatNumber NumberAnswerFormat = "number"
|
|
)
|
|
|
|
// AllValues returns all NumberAnswerFormat values.
|
|
func (NumberAnswerFormat) AllValues() []NumberAnswerFormat {
|
|
return []NumberAnswerFormat{
|
|
NumberAnswerFormatNumber,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NumberAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NumberAnswerFormatNumber:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NumberAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch NumberAnswerFormat(data) {
|
|
case NumberAnswerFormatNumber:
|
|
*s = NumberAnswerFormatNumber
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Enter a number, optionally in the given unit.
|
|
// Ref: #/components/schemas/NumberItemContent
|
|
type NumberItemContent struct {
|
|
Format NumberItemContentFormat `json:"format"`
|
|
// Unit of the expected value, for example `ms`, or null.
|
|
Unit NilString `json:"unit"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *NumberItemContent) GetFormat() NumberItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetUnit returns the value of Unit.
|
|
func (s *NumberItemContent) GetUnit() NilString {
|
|
return s.Unit
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *NumberItemContent) SetFormat(val NumberItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetUnit sets the value of Unit.
|
|
func (s *NumberItemContent) SetUnit(val NilString) {
|
|
s.Unit = val
|
|
}
|
|
|
|
type NumberItemContentFormat string
|
|
|
|
const (
|
|
NumberItemContentFormatNumber NumberItemContentFormat = "number"
|
|
)
|
|
|
|
// AllValues returns all NumberItemContentFormat values.
|
|
func (NumberItemContentFormat) AllValues() []NumberItemContentFormat {
|
|
return []NumberItemContentFormat{
|
|
NumberItemContentFormatNumber,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s NumberItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case NumberItemContentFormatNumber:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *NumberItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch NumberItemContentFormat(data) {
|
|
case NumberItemContentFormatNumber:
|
|
*s = NumberItemContentFormatNumber
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Saved onboarding step that the account returns to after login. The server stores it and advances it
|
|
// as each step completes; clients route by it and never set it directly.
|
|
//
|
|
// - candidate_consents: candidate consents beyond C1, which was given at registration.
|
|
// - candidate_profile: candidate profile.
|
|
// - candidate_questionnaire: candidate questionnaire.
|
|
// - candidate_assessment: the assessment. The expected grade is the `self_assessed_grade` saved in
|
|
// the questionnaire, and this step offers it first; only an assessment result confirms a grade. A
|
|
// successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step and
|
|
// leaves every other saved step unchanged.
|
|
// - employer_company: company profile of the employer.
|
|
// - completed: onboarding is finished; the client opens the scenario home.
|
|
//
|
|
// Candidate steps follow the order above and end with completed; the employer has employer_company and
|
|
// then completed. New steps may be added as onboarding grows; adding a value is a contract change.
|
|
// Ref: #/components/schemas/OnboardingStep
|
|
type OnboardingStep string
|
|
|
|
const (
|
|
OnboardingStepCandidateConsents OnboardingStep = "candidate_consents"
|
|
OnboardingStepCandidateProfile OnboardingStep = "candidate_profile"
|
|
OnboardingStepCandidateQuestionnaire OnboardingStep = "candidate_questionnaire"
|
|
OnboardingStepCandidateAssessment OnboardingStep = "candidate_assessment"
|
|
OnboardingStepEmployerCompany OnboardingStep = "employer_company"
|
|
OnboardingStepCompleted OnboardingStep = "completed"
|
|
)
|
|
|
|
// AllValues returns all OnboardingStep values.
|
|
func (OnboardingStep) AllValues() []OnboardingStep {
|
|
return []OnboardingStep{
|
|
OnboardingStepCandidateConsents,
|
|
OnboardingStepCandidateProfile,
|
|
OnboardingStepCandidateQuestionnaire,
|
|
OnboardingStepCandidateAssessment,
|
|
OnboardingStepEmployerCompany,
|
|
OnboardingStepCompleted,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OnboardingStep) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OnboardingStepCandidateConsents:
|
|
return []byte(s), nil
|
|
case OnboardingStepCandidateProfile:
|
|
return []byte(s), nil
|
|
case OnboardingStepCandidateQuestionnaire:
|
|
return []byte(s), nil
|
|
case OnboardingStepCandidateAssessment:
|
|
return []byte(s), nil
|
|
case OnboardingStepEmployerCompany:
|
|
return []byte(s), nil
|
|
case OnboardingStepCompleted:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OnboardingStep) UnmarshalText(data []byte) error {
|
|
switch OnboardingStep(data) {
|
|
case OnboardingStepCandidateConsents:
|
|
*s = OnboardingStepCandidateConsents
|
|
return nil
|
|
case OnboardingStepCandidateProfile:
|
|
*s = OnboardingStepCandidateProfile
|
|
return nil
|
|
case OnboardingStepCandidateQuestionnaire:
|
|
*s = OnboardingStepCandidateQuestionnaire
|
|
return nil
|
|
case OnboardingStepCandidateAssessment:
|
|
*s = OnboardingStepCandidateAssessment
|
|
return nil
|
|
case OnboardingStepEmployerCompany:
|
|
*s = OnboardingStepEmployerCompany
|
|
return nil
|
|
case OnboardingStepCompleted:
|
|
*s = OnboardingStepCompleted
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// NewOptConsentState returns new OptConsentState with value set to v.
|
|
func NewOptConsentState(v ConsentState) OptConsentState {
|
|
return OptConsentState{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptConsentState is optional ConsentState.
|
|
type OptConsentState struct {
|
|
Value ConsentState
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptConsentState was set.
|
|
func (o OptConsentState) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptConsentState) Reset() {
|
|
var v ConsentState
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptConsentState) SetTo(v ConsentState) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptConsentState) Get() (v ConsentState, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptConsentState) Or(d ConsentState) ConsentState {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptInt32 returns new OptInt32 with value set to v.
|
|
func NewOptInt32(v int32) OptInt32 {
|
|
return OptInt32{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptInt32 is optional int32.
|
|
type OptInt32 struct {
|
|
Value int32
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptInt32 was set.
|
|
func (o OptInt32) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptInt32) Reset() {
|
|
var v int32
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptInt32) SetTo(v int32) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptInt32) Get() (v int32, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptInt32) Or(d int32) int32 {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptInvitationResponsePeriod returns new OptInvitationResponsePeriod with value set to v.
|
|
func NewOptInvitationResponsePeriod(v InvitationResponsePeriod) OptInvitationResponsePeriod {
|
|
return OptInvitationResponsePeriod{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptInvitationResponsePeriod is optional InvitationResponsePeriod.
|
|
type OptInvitationResponsePeriod struct {
|
|
Value InvitationResponsePeriod
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptInvitationResponsePeriod was set.
|
|
func (o OptInvitationResponsePeriod) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptInvitationResponsePeriod) Reset() {
|
|
var v InvitationResponsePeriod
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptInvitationResponsePeriod) SetTo(v InvitationResponsePeriod) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptInvitationResponsePeriod) Get() (v InvitationResponsePeriod, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptInvitationResponsePeriod) Or(d InvitationResponsePeriod) InvitationResponsePeriod {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptInvitationTerms returns new OptInvitationTerms with value set to v.
|
|
func NewOptInvitationTerms(v InvitationTerms) OptInvitationTerms {
|
|
return OptInvitationTerms{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptInvitationTerms is optional InvitationTerms.
|
|
type OptInvitationTerms struct {
|
|
Value InvitationTerms
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptInvitationTerms was set.
|
|
func (o OptInvitationTerms) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptInvitationTerms) Reset() {
|
|
var v InvitationTerms
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptInvitationTerms) SetTo(v InvitationTerms) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptInvitationTerms) Get() (v InvitationTerms, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptInvitationTerms) Or(d InvitationTerms) InvitationTerms {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNeedTitle returns new OptNeedTitle with value set to v.
|
|
func NewOptNeedTitle(v NeedTitle) OptNeedTitle {
|
|
return OptNeedTitle{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNeedTitle is optional NeedTitle.
|
|
type OptNeedTitle struct {
|
|
Value NeedTitle
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptNeedTitle was set.
|
|
func (o OptNeedTitle) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNeedTitle) Reset() {
|
|
var v NeedTitle
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNeedTitle) SetTo(v NeedTitle) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNeedTitle) Get() (v NeedTitle, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNeedTitle) Or(d NeedTitle) NeedTitle {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilInvitationDeclineComment returns new OptNilInvitationDeclineComment with value set to v.
|
|
func NewOptNilInvitationDeclineComment(v InvitationDeclineComment) OptNilInvitationDeclineComment {
|
|
return OptNilInvitationDeclineComment{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilInvitationDeclineComment is optional nullable InvitationDeclineComment.
|
|
type OptNilInvitationDeclineComment struct {
|
|
Value InvitationDeclineComment
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilInvitationDeclineComment was set.
|
|
func (o OptNilInvitationDeclineComment) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilInvitationDeclineComment) Reset() {
|
|
var v InvitationDeclineComment
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilInvitationDeclineComment) SetTo(v InvitationDeclineComment) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilInvitationDeclineComment) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilInvitationDeclineComment) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v InvitationDeclineComment
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilInvitationDeclineComment) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilInvitationDeclineComment) Get() (v InvitationDeclineComment, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilInvitationDeclineComment) Or(d InvitationDeclineComment) InvitationDeclineComment {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilInvitationNeedReference returns new OptNilInvitationNeedReference with value set to v.
|
|
func NewOptNilInvitationNeedReference(v InvitationNeedReference) OptNilInvitationNeedReference {
|
|
return OptNilInvitationNeedReference{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilInvitationNeedReference is optional nullable InvitationNeedReference.
|
|
type OptNilInvitationNeedReference struct {
|
|
Value InvitationNeedReference
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilInvitationNeedReference was set.
|
|
func (o OptNilInvitationNeedReference) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilInvitationNeedReference) Reset() {
|
|
var v InvitationNeedReference
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilInvitationNeedReference) SetTo(v InvitationNeedReference) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilInvitationNeedReference) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilInvitationNeedReference) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v InvitationNeedReference
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilInvitationNeedReference) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilInvitationNeedReference) Get() (v InvitationNeedReference, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilInvitationNeedReference) Or(d InvitationNeedReference) InvitationNeedReference {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedDomainInput returns new OptNilNeedDomainInput with value set to v.
|
|
func NewOptNilNeedDomainInput(v NeedDomainInput) OptNilNeedDomainInput {
|
|
return OptNilNeedDomainInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedDomainInput is optional nullable NeedDomainInput.
|
|
type OptNilNeedDomainInput struct {
|
|
Value NeedDomainInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedDomainInput was set.
|
|
func (o OptNilNeedDomainInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedDomainInput) Reset() {
|
|
var v NeedDomainInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedDomainInput) SetTo(v NeedDomainInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedDomainInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedDomainInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedDomainInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedDomainInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedDomainInput) Get() (v NeedDomainInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedDomainInput) Or(d NeedDomainInput) NeedDomainInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedGradeInput returns new OptNilNeedGradeInput with value set to v.
|
|
func NewOptNilNeedGradeInput(v NeedGradeInput) OptNilNeedGradeInput {
|
|
return OptNilNeedGradeInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedGradeInput is optional nullable NeedGradeInput.
|
|
type OptNilNeedGradeInput struct {
|
|
Value NeedGradeInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedGradeInput was set.
|
|
func (o OptNilNeedGradeInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedGradeInput) Reset() {
|
|
var v NeedGradeInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedGradeInput) SetTo(v NeedGradeInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedGradeInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedGradeInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedGradeInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedGradeInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedGradeInput) Get() (v NeedGradeInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedGradeInput) Or(d NeedGradeInput) NeedGradeInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedLocationInput returns new OptNilNeedLocationInput with value set to v.
|
|
func NewOptNilNeedLocationInput(v NeedLocationInput) OptNilNeedLocationInput {
|
|
return OptNilNeedLocationInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedLocationInput is optional nullable NeedLocationInput.
|
|
type OptNilNeedLocationInput struct {
|
|
Value NeedLocationInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedLocationInput was set.
|
|
func (o OptNilNeedLocationInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedLocationInput) Reset() {
|
|
var v NeedLocationInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedLocationInput) SetTo(v NeedLocationInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedLocationInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedLocationInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedLocationInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedLocationInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedLocationInput) Get() (v NeedLocationInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedLocationInput) Or(d NeedLocationInput) NeedLocationInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedSalaryInput returns new OptNilNeedSalaryInput with value set to v.
|
|
func NewOptNilNeedSalaryInput(v NeedSalaryInput) OptNilNeedSalaryInput {
|
|
return OptNilNeedSalaryInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedSalaryInput is optional nullable NeedSalaryInput.
|
|
type OptNilNeedSalaryInput struct {
|
|
Value NeedSalaryInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedSalaryInput was set.
|
|
func (o OptNilNeedSalaryInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedSalaryInput) Reset() {
|
|
var v NeedSalaryInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedSalaryInput) SetTo(v NeedSalaryInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedSalaryInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedSalaryInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedSalaryInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedSalaryInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedSalaryInput) Get() (v NeedSalaryInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedSalaryInput) Or(d NeedSalaryInput) NeedSalaryInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedSourceText returns new OptNilNeedSourceText with value set to v.
|
|
func NewOptNilNeedSourceText(v NeedSourceText) OptNilNeedSourceText {
|
|
return OptNilNeedSourceText{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedSourceText is optional nullable NeedSourceText.
|
|
type OptNilNeedSourceText struct {
|
|
Value NeedSourceText
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedSourceText was set.
|
|
func (o OptNilNeedSourceText) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedSourceText) Reset() {
|
|
var v NeedSourceText
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedSourceText) SetTo(v NeedSourceText) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedSourceText) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedSourceText) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedSourceText
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedSourceText) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedSourceText) Get() (v NeedSourceText, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedSourceText) Or(d NeedSourceText) NeedSourceText {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedSpecializationInput returns new OptNilNeedSpecializationInput with value set to v.
|
|
func NewOptNilNeedSpecializationInput(v NeedSpecializationInput) OptNilNeedSpecializationInput {
|
|
return OptNilNeedSpecializationInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedSpecializationInput is optional nullable NeedSpecializationInput.
|
|
type OptNilNeedSpecializationInput struct {
|
|
Value NeedSpecializationInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedSpecializationInput was set.
|
|
func (o OptNilNeedSpecializationInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedSpecializationInput) Reset() {
|
|
var v NeedSpecializationInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedSpecializationInput) SetTo(v NeedSpecializationInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedSpecializationInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedSpecializationInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedSpecializationInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedSpecializationInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedSpecializationInput) Get() (v NeedSpecializationInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedSpecializationInput) Or(d NeedSpecializationInput) NeedSpecializationInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilNeedWorkFormatsInput returns new OptNilNeedWorkFormatsInput with value set to v.
|
|
func NewOptNilNeedWorkFormatsInput(v NeedWorkFormatsInput) OptNilNeedWorkFormatsInput {
|
|
return OptNilNeedWorkFormatsInput{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilNeedWorkFormatsInput is optional nullable NeedWorkFormatsInput.
|
|
type OptNilNeedWorkFormatsInput struct {
|
|
Value NeedWorkFormatsInput
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilNeedWorkFormatsInput was set.
|
|
func (o OptNilNeedWorkFormatsInput) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilNeedWorkFormatsInput) Reset() {
|
|
var v NeedWorkFormatsInput
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilNeedWorkFormatsInput) SetTo(v NeedWorkFormatsInput) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilNeedWorkFormatsInput) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilNeedWorkFormatsInput) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v NeedWorkFormatsInput
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilNeedWorkFormatsInput) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilNeedWorkFormatsInput) Get() (v NeedWorkFormatsInput, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilNeedWorkFormatsInput) Or(d NeedWorkFormatsInput) NeedWorkFormatsInput {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilOrganizationDescription returns new OptNilOrganizationDescription with value set to v.
|
|
func NewOptNilOrganizationDescription(v OrganizationDescription) OptNilOrganizationDescription {
|
|
return OptNilOrganizationDescription{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilOrganizationDescription is optional nullable OrganizationDescription.
|
|
type OptNilOrganizationDescription struct {
|
|
Value OrganizationDescription
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilOrganizationDescription was set.
|
|
func (o OptNilOrganizationDescription) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilOrganizationDescription) Reset() {
|
|
var v OrganizationDescription
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilOrganizationDescription) SetTo(v OrganizationDescription) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilOrganizationDescription) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilOrganizationDescription) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v OrganizationDescription
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilOrganizationDescription) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilOrganizationDescription) Get() (v OrganizationDescription, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilOrganizationDescription) Or(d OrganizationDescription) OrganizationDescription {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilOrganizationRepresentativeArray returns new OptNilOrganizationRepresentativeArray with value set to v.
|
|
func NewOptNilOrganizationRepresentativeArray(v []OrganizationRepresentative) OptNilOrganizationRepresentativeArray {
|
|
return OptNilOrganizationRepresentativeArray{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilOrganizationRepresentativeArray is optional nullable []OrganizationRepresentative.
|
|
type OptNilOrganizationRepresentativeArray struct {
|
|
Value []OrganizationRepresentative
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilOrganizationRepresentativeArray was set.
|
|
func (o OptNilOrganizationRepresentativeArray) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilOrganizationRepresentativeArray) Reset() {
|
|
var v []OrganizationRepresentative
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilOrganizationRepresentativeArray) SetTo(v []OrganizationRepresentative) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilOrganizationRepresentativeArray) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilOrganizationRepresentativeArray) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v []OrganizationRepresentative
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilOrganizationRepresentativeArray) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilOrganizationRepresentativeArray) Get() (v []OrganizationRepresentative, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilOrganizationRepresentativeArray) Or(d []OrganizationRepresentative) []OrganizationRepresentative {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilOrganizationSphere returns new OptNilOrganizationSphere with value set to v.
|
|
func NewOptNilOrganizationSphere(v OrganizationSphere) OptNilOrganizationSphere {
|
|
return OptNilOrganizationSphere{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilOrganizationSphere is optional nullable OrganizationSphere.
|
|
type OptNilOrganizationSphere struct {
|
|
Value OrganizationSphere
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilOrganizationSphere was set.
|
|
func (o OptNilOrganizationSphere) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilOrganizationSphere) Reset() {
|
|
var v OrganizationSphere
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilOrganizationSphere) SetTo(v OrganizationSphere) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilOrganizationSphere) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilOrganizationSphere) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v OrganizationSphere
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilOrganizationSphere) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilOrganizationSphere) Get() (v OrganizationSphere, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilOrganizationSphere) Or(d OrganizationSphere) OrganizationSphere {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptNilUUID returns new OptNilUUID with value set to v.
|
|
func NewOptNilUUID(v uuid.UUID) OptNilUUID {
|
|
return OptNilUUID{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptNilUUID is optional nullable uuid.UUID.
|
|
type OptNilUUID struct {
|
|
Value uuid.UUID
|
|
Set bool
|
|
Null bool
|
|
}
|
|
|
|
// IsSet returns true if OptNilUUID was set.
|
|
func (o OptNilUUID) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptNilUUID) Reset() {
|
|
var v uuid.UUID
|
|
o.Value = v
|
|
o.Set = false
|
|
o.Null = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptNilUUID) SetTo(v uuid.UUID) {
|
|
o.Set = true
|
|
o.Null = false
|
|
o.Value = v
|
|
}
|
|
|
|
// IsNull returns true if value is Null.
|
|
func (o OptNilUUID) IsNull() bool { return o.Null }
|
|
|
|
// SetToNull sets value to null.
|
|
func (o *OptNilUUID) SetToNull() {
|
|
o.Set = true
|
|
o.Null = true
|
|
var v uuid.UUID
|
|
o.Value = v
|
|
}
|
|
|
|
// IsEmpty returns true if the field was omitted from the payload (not Set and not Null).
|
|
func (o OptNilUUID) IsEmpty() bool {
|
|
return !o.Set && !o.Null
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptNilUUID) Get() (v uuid.UUID, ok bool) {
|
|
if o.Null {
|
|
return v, false
|
|
}
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptNilUUID) Or(d uuid.UUID) uuid.UUID {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptOrganizationContactChannels returns new OptOrganizationContactChannels with value set to v.
|
|
func NewOptOrganizationContactChannels(v OrganizationContactChannels) OptOrganizationContactChannels {
|
|
return OptOrganizationContactChannels{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptOrganizationContactChannels is optional OrganizationContactChannels.
|
|
type OptOrganizationContactChannels struct {
|
|
Value OrganizationContactChannels
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptOrganizationContactChannels was set.
|
|
func (o OptOrganizationContactChannels) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptOrganizationContactChannels) Reset() {
|
|
var v OrganizationContactChannels
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptOrganizationContactChannels) SetTo(v OrganizationContactChannels) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptOrganizationContactChannels) Get() (v OrganizationContactChannels, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptOrganizationContactChannels) Or(d OrganizationContactChannels) OrganizationContactChannels {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptOrganizationName returns new OptOrganizationName with value set to v.
|
|
func NewOptOrganizationName(v OrganizationName) OptOrganizationName {
|
|
return OptOrganizationName{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptOrganizationName is optional OrganizationName.
|
|
type OptOrganizationName struct {
|
|
Value OrganizationName
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptOrganizationName was set.
|
|
func (o OptOrganizationName) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptOrganizationName) Reset() {
|
|
var v OrganizationName
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptOrganizationName) SetTo(v OrganizationName) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptOrganizationName) Get() (v OrganizationName, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptOrganizationName) Or(d OrganizationName) OrganizationName {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptString returns new OptString with value set to v.
|
|
func NewOptString(v string) OptString {
|
|
return OptString{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptString is optional string.
|
|
type OptString struct {
|
|
Value string
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptString was set.
|
|
func (o OptString) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptString) Reset() {
|
|
var v string
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptString) SetTo(v string) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptString) Get() (v string, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptString) Or(d string) string {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptSupportCaseAssessmentTarget returns new OptSupportCaseAssessmentTarget with value set to v.
|
|
func NewOptSupportCaseAssessmentTarget(v SupportCaseAssessmentTarget) OptSupportCaseAssessmentTarget {
|
|
return OptSupportCaseAssessmentTarget{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptSupportCaseAssessmentTarget is optional SupportCaseAssessmentTarget.
|
|
type OptSupportCaseAssessmentTarget struct {
|
|
Value SupportCaseAssessmentTarget
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptSupportCaseAssessmentTarget was set.
|
|
func (o OptSupportCaseAssessmentTarget) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptSupportCaseAssessmentTarget) Reset() {
|
|
var v SupportCaseAssessmentTarget
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptSupportCaseAssessmentTarget) SetTo(v SupportCaseAssessmentTarget) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptSupportCaseAssessmentTarget) Get() (v SupportCaseAssessmentTarget, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptSupportCaseAssessmentTarget) Or(d SupportCaseAssessmentTarget) SupportCaseAssessmentTarget {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptSupportCaseAttemptReference returns new OptSupportCaseAttemptReference with value set to v.
|
|
func NewOptSupportCaseAttemptReference(v SupportCaseAttemptReference) OptSupportCaseAttemptReference {
|
|
return OptSupportCaseAttemptReference{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptSupportCaseAttemptReference is optional SupportCaseAttemptReference.
|
|
type OptSupportCaseAttemptReference struct {
|
|
Value SupportCaseAttemptReference
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptSupportCaseAttemptReference was set.
|
|
func (o OptSupportCaseAttemptReference) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptSupportCaseAttemptReference) Reset() {
|
|
var v SupportCaseAttemptReference
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptSupportCaseAttemptReference) SetTo(v SupportCaseAttemptReference) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptSupportCaseAttemptReference) Get() (v SupportCaseAttemptReference, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptSupportCaseAttemptReference) Or(d SupportCaseAttemptReference) SupportCaseAttemptReference {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// NewOptSupportCaseObjectReference returns new OptSupportCaseObjectReference with value set to v.
|
|
func NewOptSupportCaseObjectReference(v SupportCaseObjectReference) OptSupportCaseObjectReference {
|
|
return OptSupportCaseObjectReference{
|
|
Value: v,
|
|
Set: true,
|
|
}
|
|
}
|
|
|
|
// OptSupportCaseObjectReference is optional SupportCaseObjectReference.
|
|
type OptSupportCaseObjectReference struct {
|
|
Value SupportCaseObjectReference
|
|
Set bool
|
|
}
|
|
|
|
// IsSet returns true if OptSupportCaseObjectReference was set.
|
|
func (o OptSupportCaseObjectReference) IsSet() bool { return o.Set }
|
|
|
|
// Reset unsets value.
|
|
func (o *OptSupportCaseObjectReference) Reset() {
|
|
var v SupportCaseObjectReference
|
|
o.Value = v
|
|
o.Set = false
|
|
}
|
|
|
|
// SetTo sets value to v.
|
|
func (o *OptSupportCaseObjectReference) SetTo(v SupportCaseObjectReference) {
|
|
o.Set = true
|
|
o.Value = v
|
|
}
|
|
|
|
// Get returns value and boolean that denotes whether value was set.
|
|
func (o OptSupportCaseObjectReference) Get() (v SupportCaseObjectReference, ok bool) {
|
|
if !o.Set {
|
|
return v, false
|
|
}
|
|
return o.Value, true
|
|
}
|
|
|
|
// Or returns value if set, or given parameter if does not.
|
|
func (o OptSupportCaseObjectReference) Or(d SupportCaseObjectReference) SupportCaseObjectReference {
|
|
if v, ok := o.Get(); ok {
|
|
return v
|
|
}
|
|
return d
|
|
}
|
|
|
|
// Every element of the item exactly once, in the chosen order. Two answers are equal only when the
|
|
// sequences are identical.
|
|
// Ref: #/components/schemas/OrderAnswer
|
|
type OrderAnswer struct {
|
|
Format OrderAnswerFormat `json:"format"`
|
|
ElementIds []AssessmentOptionId `json:"element_ids"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *OrderAnswer) GetFormat() OrderAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetElementIds returns the value of ElementIds.
|
|
func (s *OrderAnswer) GetElementIds() []AssessmentOptionId {
|
|
return s.ElementIds
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *OrderAnswer) SetFormat(val OrderAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetElementIds sets the value of ElementIds.
|
|
func (s *OrderAnswer) SetElementIds(val []AssessmentOptionId) {
|
|
s.ElementIds = val
|
|
}
|
|
|
|
type OrderAnswerFormat string
|
|
|
|
const (
|
|
OrderAnswerFormatOrder OrderAnswerFormat = "order"
|
|
)
|
|
|
|
// AllValues returns all OrderAnswerFormat values.
|
|
func (OrderAnswerFormat) AllValues() []OrderAnswerFormat {
|
|
return []OrderAnswerFormat{
|
|
OrderAnswerFormatOrder,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OrderAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OrderAnswerFormatOrder:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OrderAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch OrderAnswerFormat(data) {
|
|
case OrderAnswerFormatOrder:
|
|
*s = OrderAnswerFormatOrder
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Put every element into the right order. The elements arrive in the order of this instance, which is
|
|
// never the answer.
|
|
// Ref: #/components/schemas/OrderItemContent
|
|
type OrderItemContent struct {
|
|
Format OrderItemContentFormat `json:"format"`
|
|
Elements []AssessmentOption `json:"elements"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *OrderItemContent) GetFormat() OrderItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetElements returns the value of Elements.
|
|
func (s *OrderItemContent) GetElements() []AssessmentOption {
|
|
return s.Elements
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *OrderItemContent) SetFormat(val OrderItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetElements sets the value of Elements.
|
|
func (s *OrderItemContent) SetElements(val []AssessmentOption) {
|
|
s.Elements = val
|
|
}
|
|
|
|
type OrderItemContentFormat string
|
|
|
|
const (
|
|
OrderItemContentFormatOrder OrderItemContentFormat = "order"
|
|
)
|
|
|
|
// AllValues returns all OrderItemContentFormat values.
|
|
func (OrderItemContentFormat) AllValues() []OrderItemContentFormat {
|
|
return []OrderItemContentFormat{
|
|
OrderItemContentFormatOrder,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OrderItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OrderItemContentFormatOrder:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OrderItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch OrderItemContentFormat(data) {
|
|
case OrderItemContentFormatOrder:
|
|
*s = OrderItemContentFormatOrder
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Organization as its members read it: the profile that the owner edits, the verification level that
|
|
// only the server sets, and the card that a candidate sees. It never contains a role, a membership,
|
|
// the members of the organization, or an account identifier, so no field of it can raise a right: the
|
|
// role of the caller is in `OrganizationMembership` and comes only from the membership held by the
|
|
// server. The profile fields repeat in `candidate_card`, which is the candidate's view of them; the
|
|
// client reads the profile fields for the form and `candidate_card` for the preview.
|
|
// Ref: #/components/schemas/Organization
|
|
type Organization struct {
|
|
// Identifier of the organization, the `org_id` of every organization-scoped path. It never changes.
|
|
ID uuid.UUID `json:"id"`
|
|
Version OrganizationVersion `json:"version"`
|
|
Name OrganizationName `json:"name"`
|
|
// Description of the organization, or null.
|
|
Description NilOrganizationDescription `json:"description"`
|
|
// Field of business of the organization, or null.
|
|
Sphere NilOrganizationSphere `json:"sphere"`
|
|
Contacts OrganizationContactChannels `json:"contacts"`
|
|
// Representatives in the order the owner gave them.
|
|
Representatives []OrganizationRepresentative `json:"representatives"`
|
|
Verification OrganizationVerification `json:"verification"`
|
|
CandidateCard CandidateOrganizationCard `json:"candidate_card"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *Organization) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *Organization) GetVersion() OrganizationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *Organization) GetName() OrganizationName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *Organization) GetDescription() NilOrganizationDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetSphere returns the value of Sphere.
|
|
func (s *Organization) GetSphere() NilOrganizationSphere {
|
|
return s.Sphere
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *Organization) GetContacts() OrganizationContactChannels {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetRepresentatives returns the value of Representatives.
|
|
func (s *Organization) GetRepresentatives() []OrganizationRepresentative {
|
|
return s.Representatives
|
|
}
|
|
|
|
// GetVerification returns the value of Verification.
|
|
func (s *Organization) GetVerification() OrganizationVerification {
|
|
return s.Verification
|
|
}
|
|
|
|
// GetCandidateCard returns the value of CandidateCard.
|
|
func (s *Organization) GetCandidateCard() CandidateOrganizationCard {
|
|
return s.CandidateCard
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *Organization) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *Organization) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *Organization) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *Organization) SetVersion(val OrganizationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *Organization) SetName(val OrganizationName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *Organization) SetDescription(val NilOrganizationDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetSphere sets the value of Sphere.
|
|
func (s *Organization) SetSphere(val NilOrganizationSphere) {
|
|
s.Sphere = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *Organization) SetContacts(val OrganizationContactChannels) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetRepresentatives sets the value of Representatives.
|
|
func (s *Organization) SetRepresentatives(val []OrganizationRepresentative) {
|
|
s.Representatives = val
|
|
}
|
|
|
|
// SetVerification sets the value of Verification.
|
|
func (s *Organization) SetVerification(val OrganizationVerification) {
|
|
s.Verification = val
|
|
}
|
|
|
|
// SetCandidateCard sets the value of CandidateCard.
|
|
func (s *Organization) SetCandidateCard(val CandidateOrganizationCard) {
|
|
s.CandidateCard = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *Organization) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *Organization) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// Public contacts of the organization, the ones a candidate sees on its card. They are company
|
|
// channels, such as a careers mailbox, the website, a company phone, or a company Telegram account,
|
|
// and never the personal email address, phone, or messenger of an employee; personal contacts of the
|
|
// people of the organization stay out of this object. The server cannot tell a company address from a
|
|
// personal one, so the owner answers for the content, and a candidate can complain about an
|
|
// organization through a support case. The object is the request field and the stored value alike, so
|
|
// a response can be sent back unchanged; every field is required and null means not set. A change
|
|
// replaces the whole object, never a single field of it.
|
|
// Ref: #/components/schemas/OrganizationContactChannels
|
|
type OrganizationContactChannels struct {
|
|
Website NilOrganizationWebsite `json:"website"`
|
|
// Public mailbox of the organization, such as a careers address, or null. It is stored in the form it
|
|
// was given.
|
|
Email NilEmailAddress `json:"email"`
|
|
// Public phone number of the organization, or null.
|
|
Phone NilContactPhoneNumber `json:"phone"`
|
|
// Public Telegram account of the organization, or null.
|
|
Telegram NilContactTelegramUsername `json:"telegram"`
|
|
}
|
|
|
|
// GetWebsite returns the value of Website.
|
|
func (s *OrganizationContactChannels) GetWebsite() NilOrganizationWebsite {
|
|
return s.Website
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *OrganizationContactChannels) GetEmail() NilEmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPhone returns the value of Phone.
|
|
func (s *OrganizationContactChannels) GetPhone() NilContactPhoneNumber {
|
|
return s.Phone
|
|
}
|
|
|
|
// GetTelegram returns the value of Telegram.
|
|
func (s *OrganizationContactChannels) GetTelegram() NilContactTelegramUsername {
|
|
return s.Telegram
|
|
}
|
|
|
|
// SetWebsite sets the value of Website.
|
|
func (s *OrganizationContactChannels) SetWebsite(val NilOrganizationWebsite) {
|
|
s.Website = val
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *OrganizationContactChannels) SetEmail(val NilEmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPhone sets the value of Phone.
|
|
func (s *OrganizationContactChannels) SetPhone(val NilContactPhoneNumber) {
|
|
s.Phone = val
|
|
}
|
|
|
|
// SetTelegram sets the value of Telegram.
|
|
func (s *OrganizationContactChannels) SetTelegram(val NilContactTelegramUsername) {
|
|
s.Telegram = val
|
|
}
|
|
|
|
// New organization. Only `name` is required, so a company can start with its name and complete the
|
|
// card later. The creating account becomes the owner of the organization; the body has no field for a
|
|
// role, a membership, an owner, a verification level, or a version, and unknown fields are rejected,
|
|
// so a request cannot set any of them. An absent `description` or `sphere`, and one sent as null, stay
|
|
// unset; an absent `contacts` has every contact unset; an absent `representatives` is an empty list.
|
|
// Ref: #/components/schemas/OrganizationCreate
|
|
type OrganizationCreate struct {
|
|
Name OrganizationName `json:"name"`
|
|
Description OptNilOrganizationDescription `json:"description"`
|
|
Sphere OptNilOrganizationSphere `json:"sphere"`
|
|
Contacts OptOrganizationContactChannels `json:"contacts"`
|
|
Representatives []OrganizationRepresentative `json:"representatives"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *OrganizationCreate) GetName() OrganizationName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *OrganizationCreate) GetDescription() OptNilOrganizationDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetSphere returns the value of Sphere.
|
|
func (s *OrganizationCreate) GetSphere() OptNilOrganizationSphere {
|
|
return s.Sphere
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *OrganizationCreate) GetContacts() OptOrganizationContactChannels {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetRepresentatives returns the value of Representatives.
|
|
func (s *OrganizationCreate) GetRepresentatives() []OrganizationRepresentative {
|
|
return s.Representatives
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *OrganizationCreate) SetName(val OrganizationName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *OrganizationCreate) SetDescription(val OptNilOrganizationDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetSphere sets the value of Sphere.
|
|
func (s *OrganizationCreate) SetSphere(val OptNilOrganizationSphere) {
|
|
s.Sphere = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *OrganizationCreate) SetContacts(val OptOrganizationContactChannels) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetRepresentatives sets the value of Representatives.
|
|
func (s *OrganizationCreate) SetRepresentatives(val []OrganizationRepresentative) {
|
|
s.Representatives = val
|
|
}
|
|
|
|
type OrganizationDescription string
|
|
|
|
// OrganizationHeaders wraps Organization with response headers.
|
|
type OrganizationHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response Organization
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *OrganizationHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *OrganizationHeaders) GetResponse() Organization {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *OrganizationHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *OrganizationHeaders) SetResponse(val Organization) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*OrganizationHeaders) createOrganizationRes() {}
|
|
func (*OrganizationHeaders) getOrganizationRes() {}
|
|
func (*OrganizationHeaders) updateOrganizationRes() {}
|
|
|
|
// Invitation as the organization reads it: the candidate handle, the current terms version, the state,
|
|
// the coarse salary indicator, and the contact access without contact values. It never contains the
|
|
// candidate's name, email address, phone number, or other contact, the exact salary minimum, or the
|
|
// reason and comment of a decline.
|
|
// Ref: #/components/schemas/OrganizationInvitation
|
|
type OrganizationInvitation struct {
|
|
// Identifier of the invitation.
|
|
ID uuid.UUID `json:"id"`
|
|
// Organization that owns the invitation, equal to `org_id` of the path. It never changes.
|
|
OrganizationID uuid.UUID `json:"organization_id"`
|
|
CandidateHandle CandidateHandle `json:"candidate_handle"`
|
|
// Need the invitation was built from, or null for a direct invitation.
|
|
Need NilInvitationNeedReference `json:"need"`
|
|
State InvitationState `json:"state"`
|
|
// Reason of an expiry, or null unless `state` is `expired`.
|
|
ExpiryReason NilInvitationExpiryReason `json:"expiry_reason"`
|
|
Version InvitationVersion `json:"version"`
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
Terms InvitationTerms `json:"terms"`
|
|
ResponsePeriodDays InvitationResponsePeriod `json:"response_period_days"`
|
|
// Moment when the candidate's time to answer ends, set at the first delivery to `delivered_at` plus
|
|
// `response_period_days`, or null for a draft. A command received at this moment or later is late.
|
|
// After an acceptance the deadline no longer applies.
|
|
ResponseDeadlineAt NilTimestamp `json:"response_deadline_at"`
|
|
// Whether the one raise of the upper salary bound after sending (PRD FR13) has been used. It counts
|
|
// the whole history of the invitation.
|
|
SalaryRaiseUsed bool `json:"salary_raise_used"`
|
|
SalaryFit InvitationSalaryFit `json:"salary_fit"`
|
|
ContactAccess InvitationContactAccess `json:"contact_access"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
// Moment of delivery to the candidate's inbox, or null for a draft.
|
|
DeliveredAt NilTimestamp `json:"delivered_at"`
|
|
// Moment when the candidate first opened the terms, or null.
|
|
ViewedAt NilTimestamp `json:"viewed_at"`
|
|
// Moment of the candidate's acceptance or decline, or null.
|
|
RespondedAt NilTimestamp `json:"responded_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *OrganizationInvitation) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetOrganizationID returns the value of OrganizationID.
|
|
func (s *OrganizationInvitation) GetOrganizationID() uuid.UUID {
|
|
return s.OrganizationID
|
|
}
|
|
|
|
// GetCandidateHandle returns the value of CandidateHandle.
|
|
func (s *OrganizationInvitation) GetCandidateHandle() CandidateHandle {
|
|
return s.CandidateHandle
|
|
}
|
|
|
|
// GetNeed returns the value of Need.
|
|
func (s *OrganizationInvitation) GetNeed() NilInvitationNeedReference {
|
|
return s.Need
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *OrganizationInvitation) GetState() InvitationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetExpiryReason returns the value of ExpiryReason.
|
|
func (s *OrganizationInvitation) GetExpiryReason() NilInvitationExpiryReason {
|
|
return s.ExpiryReason
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *OrganizationInvitation) GetVersion() InvitationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *OrganizationInvitation) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *OrganizationInvitation) GetTerms() InvitationTerms {
|
|
return s.Terms
|
|
}
|
|
|
|
// GetResponsePeriodDays returns the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitation) GetResponsePeriodDays() InvitationResponsePeriod {
|
|
return s.ResponsePeriodDays
|
|
}
|
|
|
|
// GetResponseDeadlineAt returns the value of ResponseDeadlineAt.
|
|
func (s *OrganizationInvitation) GetResponseDeadlineAt() NilTimestamp {
|
|
return s.ResponseDeadlineAt
|
|
}
|
|
|
|
// GetSalaryRaiseUsed returns the value of SalaryRaiseUsed.
|
|
func (s *OrganizationInvitation) GetSalaryRaiseUsed() bool {
|
|
return s.SalaryRaiseUsed
|
|
}
|
|
|
|
// GetSalaryFit returns the value of SalaryFit.
|
|
func (s *OrganizationInvitation) GetSalaryFit() InvitationSalaryFit {
|
|
return s.SalaryFit
|
|
}
|
|
|
|
// GetContactAccess returns the value of ContactAccess.
|
|
func (s *OrganizationInvitation) GetContactAccess() InvitationContactAccess {
|
|
return s.ContactAccess
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *OrganizationInvitation) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *OrganizationInvitation) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// GetDeliveredAt returns the value of DeliveredAt.
|
|
func (s *OrganizationInvitation) GetDeliveredAt() NilTimestamp {
|
|
return s.DeliveredAt
|
|
}
|
|
|
|
// GetViewedAt returns the value of ViewedAt.
|
|
func (s *OrganizationInvitation) GetViewedAt() NilTimestamp {
|
|
return s.ViewedAt
|
|
}
|
|
|
|
// GetRespondedAt returns the value of RespondedAt.
|
|
func (s *OrganizationInvitation) GetRespondedAt() NilTimestamp {
|
|
return s.RespondedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *OrganizationInvitation) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetOrganizationID sets the value of OrganizationID.
|
|
func (s *OrganizationInvitation) SetOrganizationID(val uuid.UUID) {
|
|
s.OrganizationID = val
|
|
}
|
|
|
|
// SetCandidateHandle sets the value of CandidateHandle.
|
|
func (s *OrganizationInvitation) SetCandidateHandle(val CandidateHandle) {
|
|
s.CandidateHandle = val
|
|
}
|
|
|
|
// SetNeed sets the value of Need.
|
|
func (s *OrganizationInvitation) SetNeed(val NilInvitationNeedReference) {
|
|
s.Need = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *OrganizationInvitation) SetState(val InvitationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetExpiryReason sets the value of ExpiryReason.
|
|
func (s *OrganizationInvitation) SetExpiryReason(val NilInvitationExpiryReason) {
|
|
s.ExpiryReason = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *OrganizationInvitation) SetVersion(val InvitationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *OrganizationInvitation) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *OrganizationInvitation) SetTerms(val InvitationTerms) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// SetResponsePeriodDays sets the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitation) SetResponsePeriodDays(val InvitationResponsePeriod) {
|
|
s.ResponsePeriodDays = val
|
|
}
|
|
|
|
// SetResponseDeadlineAt sets the value of ResponseDeadlineAt.
|
|
func (s *OrganizationInvitation) SetResponseDeadlineAt(val NilTimestamp) {
|
|
s.ResponseDeadlineAt = val
|
|
}
|
|
|
|
// SetSalaryRaiseUsed sets the value of SalaryRaiseUsed.
|
|
func (s *OrganizationInvitation) SetSalaryRaiseUsed(val bool) {
|
|
s.SalaryRaiseUsed = val
|
|
}
|
|
|
|
// SetSalaryFit sets the value of SalaryFit.
|
|
func (s *OrganizationInvitation) SetSalaryFit(val InvitationSalaryFit) {
|
|
s.SalaryFit = val
|
|
}
|
|
|
|
// SetContactAccess sets the value of ContactAccess.
|
|
func (s *OrganizationInvitation) SetContactAccess(val InvitationContactAccess) {
|
|
s.ContactAccess = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *OrganizationInvitation) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *OrganizationInvitation) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// SetDeliveredAt sets the value of DeliveredAt.
|
|
func (s *OrganizationInvitation) SetDeliveredAt(val NilTimestamp) {
|
|
s.DeliveredAt = val
|
|
}
|
|
|
|
// SetViewedAt sets the value of ViewedAt.
|
|
func (s *OrganizationInvitation) SetViewedAt(val NilTimestamp) {
|
|
s.ViewedAt = val
|
|
}
|
|
|
|
// SetRespondedAt sets the value of RespondedAt.
|
|
func (s *OrganizationInvitation) SetRespondedAt(val NilTimestamp) {
|
|
s.RespondedAt = val
|
|
}
|
|
|
|
// New draft for one candidate. The candidate is named only by the handle from a search result of this
|
|
// organization, never by an email address, a phone number, or an account identifier. The terms are
|
|
// complete from the start, so a draft without the tax basis or the communication method cannot exist.
|
|
// Unknown fields are rejected, so a request cannot set the state, a version, a deadline, the salary
|
|
// indicator, contact access, or a candidate's minimum or contact.
|
|
// Ref: #/components/schemas/OrganizationInvitationCreate
|
|
type OrganizationInvitationCreate struct {
|
|
CandidateHandle CandidateHandle `json:"candidate_handle"`
|
|
// Need of the organization the invitation is built from, or null or absent for a direct invitation.
|
|
Need OptNilInvitationNeedReference `json:"need"`
|
|
// Days to answer; absent means 7, the default of the product policy.
|
|
ResponsePeriodDays OptInvitationResponsePeriod `json:"response_period_days"`
|
|
Terms InvitationTerms `json:"terms"`
|
|
}
|
|
|
|
// GetCandidateHandle returns the value of CandidateHandle.
|
|
func (s *OrganizationInvitationCreate) GetCandidateHandle() CandidateHandle {
|
|
return s.CandidateHandle
|
|
}
|
|
|
|
// GetNeed returns the value of Need.
|
|
func (s *OrganizationInvitationCreate) GetNeed() OptNilInvitationNeedReference {
|
|
return s.Need
|
|
}
|
|
|
|
// GetResponsePeriodDays returns the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitationCreate) GetResponsePeriodDays() OptInvitationResponsePeriod {
|
|
return s.ResponsePeriodDays
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *OrganizationInvitationCreate) GetTerms() InvitationTerms {
|
|
return s.Terms
|
|
}
|
|
|
|
// SetCandidateHandle sets the value of CandidateHandle.
|
|
func (s *OrganizationInvitationCreate) SetCandidateHandle(val CandidateHandle) {
|
|
s.CandidateHandle = val
|
|
}
|
|
|
|
// SetNeed sets the value of Need.
|
|
func (s *OrganizationInvitationCreate) SetNeed(val OptNilInvitationNeedReference) {
|
|
s.Need = val
|
|
}
|
|
|
|
// SetResponsePeriodDays sets the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitationCreate) SetResponsePeriodDays(val OptInvitationResponsePeriod) {
|
|
s.ResponsePeriodDays = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *OrganizationInvitationCreate) SetTerms(val InvitationTerms) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// OrganizationInvitationHeaders wraps OrganizationInvitation with response headers.
|
|
type OrganizationInvitationHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response OrganizationInvitation
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *OrganizationInvitationHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *OrganizationInvitationHeaders) GetResponse() OrganizationInvitation {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *OrganizationInvitationHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *OrganizationInvitationHeaders) SetResponse(val OrganizationInvitation) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*OrganizationInvitationHeaders) createOrganizationInvitationRes() {}
|
|
func (*OrganizationInvitationHeaders) getOrganizationInvitationRes() {}
|
|
func (*OrganizationInvitationHeaders) raiseOrganizationInvitationSalaryRes() {}
|
|
func (*OrganizationInvitationHeaders) sendOrganizationInvitationRes() {}
|
|
func (*OrganizationInvitationHeaders) updateOrganizationInvitationRes() {}
|
|
func (*OrganizationInvitationHeaders) withdrawOrganizationInvitationRes() {}
|
|
|
|
// One page of the invitations of an organization, newest first by creation time.
|
|
// Ref: #/components/schemas/OrganizationInvitationList
|
|
type OrganizationInvitationList struct {
|
|
// Invitations of the page.
|
|
Items []OrganizationInvitationSummary `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *OrganizationInvitationList) GetItems() []OrganizationInvitationSummary {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *OrganizationInvitationList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *OrganizationInvitationList) SetItems(val []OrganizationInvitationSummary) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *OrganizationInvitationList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// OrganizationInvitationListHeaders wraps OrganizationInvitationList with response headers.
|
|
type OrganizationInvitationListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response OrganizationInvitationList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *OrganizationInvitationListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *OrganizationInvitationListHeaders) GetResponse() OrganizationInvitationList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *OrganizationInvitationListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *OrganizationInvitationListHeaders) SetResponse(val OrganizationInvitationList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*OrganizationInvitationListHeaders) listOrganizationInvitationsRes() {}
|
|
|
|
// Invitation in the organization's list: its identity, state, versions, role, salary range, deadline,
|
|
// and contact access. Read the invitation for the full terms and the salary indicator.
|
|
// Ref: #/components/schemas/OrganizationInvitationSummary
|
|
type OrganizationInvitationSummary struct {
|
|
// Identifier of the invitation.
|
|
ID uuid.UUID `json:"id"`
|
|
CandidateHandle CandidateHandle `json:"candidate_handle"`
|
|
Need NilInvitationNeedReference `json:"need"`
|
|
State InvitationState `json:"state"`
|
|
ExpiryReason NilInvitationExpiryReason `json:"expiry_reason"`
|
|
Version InvitationVersion `json:"version"`
|
|
TermsVersion InvitationTermsVersion `json:"terms_version"`
|
|
RoleTitle InvitationRoleTitle `json:"role_title"`
|
|
Salary SalaryRange `json:"salary"`
|
|
ResponseDeadlineAt NilTimestamp `json:"response_deadline_at"`
|
|
ContactAccess InvitationContactAccess `json:"contact_access"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *OrganizationInvitationSummary) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetCandidateHandle returns the value of CandidateHandle.
|
|
func (s *OrganizationInvitationSummary) GetCandidateHandle() CandidateHandle {
|
|
return s.CandidateHandle
|
|
}
|
|
|
|
// GetNeed returns the value of Need.
|
|
func (s *OrganizationInvitationSummary) GetNeed() NilInvitationNeedReference {
|
|
return s.Need
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *OrganizationInvitationSummary) GetState() InvitationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetExpiryReason returns the value of ExpiryReason.
|
|
func (s *OrganizationInvitationSummary) GetExpiryReason() NilInvitationExpiryReason {
|
|
return s.ExpiryReason
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *OrganizationInvitationSummary) GetVersion() InvitationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// GetTermsVersion returns the value of TermsVersion.
|
|
func (s *OrganizationInvitationSummary) GetTermsVersion() InvitationTermsVersion {
|
|
return s.TermsVersion
|
|
}
|
|
|
|
// GetRoleTitle returns the value of RoleTitle.
|
|
func (s *OrganizationInvitationSummary) GetRoleTitle() InvitationRoleTitle {
|
|
return s.RoleTitle
|
|
}
|
|
|
|
// GetSalary returns the value of Salary.
|
|
func (s *OrganizationInvitationSummary) GetSalary() SalaryRange {
|
|
return s.Salary
|
|
}
|
|
|
|
// GetResponseDeadlineAt returns the value of ResponseDeadlineAt.
|
|
func (s *OrganizationInvitationSummary) GetResponseDeadlineAt() NilTimestamp {
|
|
return s.ResponseDeadlineAt
|
|
}
|
|
|
|
// GetContactAccess returns the value of ContactAccess.
|
|
func (s *OrganizationInvitationSummary) GetContactAccess() InvitationContactAccess {
|
|
return s.ContactAccess
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *OrganizationInvitationSummary) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *OrganizationInvitationSummary) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *OrganizationInvitationSummary) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetCandidateHandle sets the value of CandidateHandle.
|
|
func (s *OrganizationInvitationSummary) SetCandidateHandle(val CandidateHandle) {
|
|
s.CandidateHandle = val
|
|
}
|
|
|
|
// SetNeed sets the value of Need.
|
|
func (s *OrganizationInvitationSummary) SetNeed(val NilInvitationNeedReference) {
|
|
s.Need = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *OrganizationInvitationSummary) SetState(val InvitationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetExpiryReason sets the value of ExpiryReason.
|
|
func (s *OrganizationInvitationSummary) SetExpiryReason(val NilInvitationExpiryReason) {
|
|
s.ExpiryReason = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *OrganizationInvitationSummary) SetVersion(val InvitationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SetTermsVersion sets the value of TermsVersion.
|
|
func (s *OrganizationInvitationSummary) SetTermsVersion(val InvitationTermsVersion) {
|
|
s.TermsVersion = val
|
|
}
|
|
|
|
// SetRoleTitle sets the value of RoleTitle.
|
|
func (s *OrganizationInvitationSummary) SetRoleTitle(val InvitationRoleTitle) {
|
|
s.RoleTitle = val
|
|
}
|
|
|
|
// SetSalary sets the value of Salary.
|
|
func (s *OrganizationInvitationSummary) SetSalary(val SalaryRange) {
|
|
s.Salary = val
|
|
}
|
|
|
|
// SetResponseDeadlineAt sets the value of ResponseDeadlineAt.
|
|
func (s *OrganizationInvitationSummary) SetResponseDeadlineAt(val NilTimestamp) {
|
|
s.ResponseDeadlineAt = val
|
|
}
|
|
|
|
// SetContactAccess sets the value of ContactAccess.
|
|
func (s *OrganizationInvitationSummary) SetContactAccess(val InvitationContactAccess) {
|
|
s.ContactAccess = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *OrganizationInvitationSummary) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *OrganizationInvitationSummary) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// Change of a draft over the version the client read. Each field present replaces that field as a
|
|
// whole and an absent field stays unchanged; `terms` is always replaced completely, never merged, and
|
|
// a change of the terms creates the next terms version. `need` sent as null unlinks the need. The
|
|
// candidate cannot change: a draft for another candidate is a new draft. Unknown fields are rejected.
|
|
// Ref: #/components/schemas/OrganizationInvitationUpdate
|
|
type OrganizationInvitationUpdate struct {
|
|
ExpectedVersion InvitationVersion `json:"expected_version"`
|
|
Need OptNilInvitationNeedReference `json:"need"`
|
|
ResponsePeriodDays OptInvitationResponsePeriod `json:"response_period_days"`
|
|
Terms OptInvitationTerms `json:"terms"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *OrganizationInvitationUpdate) GetExpectedVersion() InvitationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetNeed returns the value of Need.
|
|
func (s *OrganizationInvitationUpdate) GetNeed() OptNilInvitationNeedReference {
|
|
return s.Need
|
|
}
|
|
|
|
// GetResponsePeriodDays returns the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitationUpdate) GetResponsePeriodDays() OptInvitationResponsePeriod {
|
|
return s.ResponsePeriodDays
|
|
}
|
|
|
|
// GetTerms returns the value of Terms.
|
|
func (s *OrganizationInvitationUpdate) GetTerms() OptInvitationTerms {
|
|
return s.Terms
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *OrganizationInvitationUpdate) SetExpectedVersion(val InvitationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetNeed sets the value of Need.
|
|
func (s *OrganizationInvitationUpdate) SetNeed(val OptNilInvitationNeedReference) {
|
|
s.Need = val
|
|
}
|
|
|
|
// SetResponsePeriodDays sets the value of ResponsePeriodDays.
|
|
func (s *OrganizationInvitationUpdate) SetResponsePeriodDays(val OptInvitationResponsePeriod) {
|
|
s.ResponsePeriodDays = val
|
|
}
|
|
|
|
// SetTerms sets the value of Terms.
|
|
func (s *OrganizationInvitationUpdate) SetTerms(val OptInvitationTerms) {
|
|
s.Terms = val
|
|
}
|
|
|
|
// The membership of the caller in one organization. The caller is the account of the session, so the
|
|
// object holds no account identifier. Only the server sets the role and the state, through the
|
|
// operations that manage members, which are planned; no operation of this contract changes them.
|
|
// Ref: #/components/schemas/OrganizationMembership
|
|
type OrganizationMembership struct {
|
|
// Identifier of the organization.
|
|
OrganizationID uuid.UUID `json:"organization_id"`
|
|
Role OrganizationRole `json:"role"`
|
|
State MembershipState `json:"state"`
|
|
// Moment the membership was first created. A member who left and returns keeps the same value, because
|
|
// the pair has one membership; the moment of the latest activation is a planned additive field
|
|
// (`activated_at`).
|
|
JoinedAt Timestamp `json:"joined_at"`
|
|
}
|
|
|
|
// GetOrganizationID returns the value of OrganizationID.
|
|
func (s *OrganizationMembership) GetOrganizationID() uuid.UUID {
|
|
return s.OrganizationID
|
|
}
|
|
|
|
// GetRole returns the value of Role.
|
|
func (s *OrganizationMembership) GetRole() OrganizationRole {
|
|
return s.Role
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *OrganizationMembership) GetState() MembershipState {
|
|
return s.State
|
|
}
|
|
|
|
// GetJoinedAt returns the value of JoinedAt.
|
|
func (s *OrganizationMembership) GetJoinedAt() Timestamp {
|
|
return s.JoinedAt
|
|
}
|
|
|
|
// SetOrganizationID sets the value of OrganizationID.
|
|
func (s *OrganizationMembership) SetOrganizationID(val uuid.UUID) {
|
|
s.OrganizationID = val
|
|
}
|
|
|
|
// SetRole sets the value of Role.
|
|
func (s *OrganizationMembership) SetRole(val OrganizationRole) {
|
|
s.Role = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *OrganizationMembership) SetState(val MembershipState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetJoinedAt sets the value of JoinedAt.
|
|
func (s *OrganizationMembership) SetJoinedAt(val Timestamp) {
|
|
s.JoinedAt = val
|
|
}
|
|
|
|
type OrganizationName string
|
|
|
|
// A person that speaks for the organization to candidates, as the owner presents them on the card. It
|
|
// is presentation only: a representative is not a member of the organization, has no account link, and
|
|
// gains no right from being listed, and a member does not become a representative by joining. It holds
|
|
// no contact of the person; reaching the organization goes through its public contacts. The name is
|
|
// personal data of an employee that the owner publishes, so the owner must have the right to do it;
|
|
// see the open questions in the organization section of the API guide.
|
|
// Ref: #/components/schemas/OrganizationRepresentative
|
|
type OrganizationRepresentative struct {
|
|
// Name of the person as the card shows it. It has no leading or trailing whitespace and no line
|
|
// breaks. Plain text; clients show it as text, never as HTML.
|
|
Name string `json:"name"`
|
|
// Position of the person in the organization, for example "Руководитель по
|
|
// подбору". It has no leading or trailing whitespace and no line breaks. Plain text; clients
|
|
// show it as text, never as HTML.
|
|
JobTitle string `json:"job_title"`
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *OrganizationRepresentative) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// GetJobTitle returns the value of JobTitle.
|
|
func (s *OrganizationRepresentative) GetJobTitle() string {
|
|
return s.JobTitle
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *OrganizationRepresentative) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetJobTitle sets the value of JobTitle.
|
|
func (s *OrganizationRepresentative) SetJobTitle(val string) {
|
|
s.JobTitle = val
|
|
}
|
|
|
|
// Role of a member in an organization (PRD 2.2 and the FR07 matrix). The role belongs to the
|
|
// membership, never to the organization or to any editable profile.
|
|
//
|
|
// - owner: manages the organization and its members, and acts on behalf of the company.
|
|
// - recruiter: leads the selection of candidates for all needs.
|
|
// - hiring_manager: acts on the needs assigned to the member.
|
|
// - technical_expert: refines the requirements of the assigned needs; reads no contacts and sends no
|
|
// invitations.
|
|
//
|
|
// In the MVP only the owner acts, so the other roles grant nothing yet: an operation that is not open
|
|
// to a role answers 403 `forbidden`. The full matrix is planned, and applying it changes no field of
|
|
// this contract. Adding a role is a contract change.
|
|
// Ref: #/components/schemas/OrganizationRole
|
|
type OrganizationRole string
|
|
|
|
const (
|
|
OrganizationRoleOwner OrganizationRole = "owner"
|
|
OrganizationRoleRecruiter OrganizationRole = "recruiter"
|
|
OrganizationRoleHiringManager OrganizationRole = "hiring_manager"
|
|
OrganizationRoleTechnicalExpert OrganizationRole = "technical_expert"
|
|
)
|
|
|
|
// AllValues returns all OrganizationRole values.
|
|
func (OrganizationRole) AllValues() []OrganizationRole {
|
|
return []OrganizationRole{
|
|
OrganizationRoleOwner,
|
|
OrganizationRoleRecruiter,
|
|
OrganizationRoleHiringManager,
|
|
OrganizationRoleTechnicalExpert,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OrganizationRole) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OrganizationRoleOwner:
|
|
return []byte(s), nil
|
|
case OrganizationRoleRecruiter:
|
|
return []byte(s), nil
|
|
case OrganizationRoleHiringManager:
|
|
return []byte(s), nil
|
|
case OrganizationRoleTechnicalExpert:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OrganizationRole) UnmarshalText(data []byte) error {
|
|
switch OrganizationRole(data) {
|
|
case OrganizationRoleOwner:
|
|
*s = OrganizationRoleOwner
|
|
return nil
|
|
case OrganizationRoleRecruiter:
|
|
*s = OrganizationRoleRecruiter
|
|
return nil
|
|
case OrganizationRoleHiringManager:
|
|
*s = OrganizationRoleHiringManager
|
|
return nil
|
|
case OrganizationRoleTechnicalExpert:
|
|
*s = OrganizationRoleTechnicalExpert
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type OrganizationSphere string
|
|
|
|
// An organization in the list of the caller's organizations: what a switcher needs to name it. The
|
|
// profile, the contacts, and the representatives are in `Organization`.
|
|
// Ref: #/components/schemas/OrganizationSummary
|
|
type OrganizationSummary struct {
|
|
// Identifier of the organization, the `org_id` of its paths.
|
|
ID uuid.UUID `json:"id"`
|
|
Name OrganizationName `json:"name"`
|
|
VerificationLevel OrganizationVerificationLevel `json:"verification_level"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *OrganizationSummary) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *OrganizationSummary) GetName() OrganizationName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetVerificationLevel returns the value of VerificationLevel.
|
|
func (s *OrganizationSummary) GetVerificationLevel() OrganizationVerificationLevel {
|
|
return s.VerificationLevel
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *OrganizationSummary) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *OrganizationSummary) SetName(val OrganizationName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetVerificationLevel sets the value of VerificationLevel.
|
|
func (s *OrganizationSummary) SetVerificationLevel(val OrganizationVerificationLevel) {
|
|
s.VerificationLevel = val
|
|
}
|
|
|
|
// Change of the profile of an organization over the version the client read. Each field present
|
|
// replaces that field as a whole and an absent field stays unchanged; `contacts` and `representatives`
|
|
// are replaced entirely and never merged, and a representative left out of a sent list is removed.
|
|
// `description` and `sphere` sent as null become unset; `name`, `contacts`, and `representatives`
|
|
// cannot be null. The body can change the profile only. It has no field for a role, a membership, an
|
|
// owner, a verification level, a basis, or a card, and unknown fields are rejected, so editing the
|
|
// profile can neither raise a right nor raise the trust level of the organization; both change only
|
|
// through processes of the server.
|
|
// Ref: #/components/schemas/OrganizationUpdate
|
|
type OrganizationUpdate struct {
|
|
ExpectedVersion OrganizationVersion `json:"expected_version"`
|
|
Name OptOrganizationName `json:"name"`
|
|
Description OptNilOrganizationDescription `json:"description"`
|
|
Sphere OptNilOrganizationSphere `json:"sphere"`
|
|
Contacts OptOrganizationContactChannels `json:"contacts"`
|
|
Representatives []OrganizationRepresentative `json:"representatives"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *OrganizationUpdate) GetExpectedVersion() OrganizationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *OrganizationUpdate) GetName() OptOrganizationName {
|
|
return s.Name
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *OrganizationUpdate) GetDescription() OptNilOrganizationDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetSphere returns the value of Sphere.
|
|
func (s *OrganizationUpdate) GetSphere() OptNilOrganizationSphere {
|
|
return s.Sphere
|
|
}
|
|
|
|
// GetContacts returns the value of Contacts.
|
|
func (s *OrganizationUpdate) GetContacts() OptOrganizationContactChannels {
|
|
return s.Contacts
|
|
}
|
|
|
|
// GetRepresentatives returns the value of Representatives.
|
|
func (s *OrganizationUpdate) GetRepresentatives() []OrganizationRepresentative {
|
|
return s.Representatives
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *OrganizationUpdate) SetExpectedVersion(val OrganizationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *OrganizationUpdate) SetName(val OptOrganizationName) {
|
|
s.Name = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *OrganizationUpdate) SetDescription(val OptNilOrganizationDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetSphere sets the value of Sphere.
|
|
func (s *OrganizationUpdate) SetSphere(val OptNilOrganizationSphere) {
|
|
s.Sphere = val
|
|
}
|
|
|
|
// SetContacts sets the value of Contacts.
|
|
func (s *OrganizationUpdate) SetContacts(val OptOrganizationContactChannels) {
|
|
s.Contacts = val
|
|
}
|
|
|
|
// SetRepresentatives sets the value of Representatives.
|
|
func (s *OrganizationUpdate) SetRepresentatives(val []OrganizationRepresentative) {
|
|
s.Representatives = val
|
|
}
|
|
|
|
// Verification level of an organization with its ground and the time it was set. It is read-only
|
|
// everywhere in this contract: the server sets it, and no request carries it. The scope of the check
|
|
// and the history of changes (PRD FR07) are planned as additive fields and a separate history with the
|
|
// first verification process.
|
|
// Ref: #/components/schemas/OrganizationVerification
|
|
type OrganizationVerification struct {
|
|
Level OrganizationVerificationLevel `json:"level"`
|
|
Basis OrganizationVerificationBasis `json:"basis"`
|
|
// Moment the level was set to its current value; for a new organization, the creation time.
|
|
ChangedAt Timestamp `json:"changed_at"`
|
|
}
|
|
|
|
// GetLevel returns the value of Level.
|
|
func (s *OrganizationVerification) GetLevel() OrganizationVerificationLevel {
|
|
return s.Level
|
|
}
|
|
|
|
// GetBasis returns the value of Basis.
|
|
func (s *OrganizationVerification) GetBasis() OrganizationVerificationBasis {
|
|
return s.Basis
|
|
}
|
|
|
|
// GetChangedAt returns the value of ChangedAt.
|
|
func (s *OrganizationVerification) GetChangedAt() Timestamp {
|
|
return s.ChangedAt
|
|
}
|
|
|
|
// SetLevel sets the value of Level.
|
|
func (s *OrganizationVerification) SetLevel(val OrganizationVerificationLevel) {
|
|
s.Level = val
|
|
}
|
|
|
|
// SetBasis sets the value of Basis.
|
|
func (s *OrganizationVerification) SetBasis(val OrganizationVerificationBasis) {
|
|
s.Basis = val
|
|
}
|
|
|
|
// SetChangedAt sets the value of ChangedAt.
|
|
func (s *OrganizationVerification) SetChangedAt(val Timestamp) {
|
|
s.ChangedAt = val
|
|
}
|
|
|
|
// Ground of the current verification level, the reason a cabinet can show next to it.
|
|
//
|
|
// - confirmed_email: the confirmed email of the creating account (e0).
|
|
// - corporate_domain: a corporate email and a verified domain (e1).
|
|
// - requisites_and_authority: a check of the requisites and of the authority (e2).
|
|
// - manual_review: a manual check by the platform (e3).
|
|
// - partner_status: a partner status (e3).
|
|
//
|
|
// Each level has its own bases, so a level and a basis that do not belong together never occur. Adding
|
|
// a value is a contract change.
|
|
// Ref: #/components/schemas/OrganizationVerificationBasis
|
|
type OrganizationVerificationBasis string
|
|
|
|
const (
|
|
OrganizationVerificationBasisConfirmedEmail OrganizationVerificationBasis = "confirmed_email"
|
|
OrganizationVerificationBasisCorporateDomain OrganizationVerificationBasis = "corporate_domain"
|
|
OrganizationVerificationBasisRequisitesAndAuthority OrganizationVerificationBasis = "requisites_and_authority"
|
|
OrganizationVerificationBasisManualReview OrganizationVerificationBasis = "manual_review"
|
|
OrganizationVerificationBasisPartnerStatus OrganizationVerificationBasis = "partner_status"
|
|
)
|
|
|
|
// AllValues returns all OrganizationVerificationBasis values.
|
|
func (OrganizationVerificationBasis) AllValues() []OrganizationVerificationBasis {
|
|
return []OrganizationVerificationBasis{
|
|
OrganizationVerificationBasisConfirmedEmail,
|
|
OrganizationVerificationBasisCorporateDomain,
|
|
OrganizationVerificationBasisRequisitesAndAuthority,
|
|
OrganizationVerificationBasisManualReview,
|
|
OrganizationVerificationBasisPartnerStatus,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OrganizationVerificationBasis) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OrganizationVerificationBasisConfirmedEmail:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationBasisCorporateDomain:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationBasisRequisitesAndAuthority:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationBasisManualReview:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationBasisPartnerStatus:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OrganizationVerificationBasis) UnmarshalText(data []byte) error {
|
|
switch OrganizationVerificationBasis(data) {
|
|
case OrganizationVerificationBasisConfirmedEmail:
|
|
*s = OrganizationVerificationBasisConfirmedEmail
|
|
return nil
|
|
case OrganizationVerificationBasisCorporateDomain:
|
|
*s = OrganizationVerificationBasisCorporateDomain
|
|
return nil
|
|
case OrganizationVerificationBasisRequisitesAndAuthority:
|
|
*s = OrganizationVerificationBasisRequisitesAndAuthority
|
|
return nil
|
|
case OrganizationVerificationBasisManualReview:
|
|
*s = OrganizationVerificationBasisManualReview
|
|
return nil
|
|
case OrganizationVerificationBasisPartnerStatus:
|
|
*s = OrganizationVerificationBasisPartnerStatus
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Trust level of an organization (PRD FR07). It limits the quotas of the organization and, in a
|
|
// planned mode, the access of candidates under 18; it never replaces the consent of a candidate.
|
|
//
|
|
// - e0: the confirmed email of the account that created the organization. Every new organization
|
|
// starts here.
|
|
// - e1: a corporate email, a verified domain, and a link with the organization.
|
|
// - e2: a check of the requisites and of the authority of the person.
|
|
// - e3: a manual check or a partner status.
|
|
//
|
|
// The server reports e1, e2, or e3 only after a verification process has recorded it for the
|
|
// organization. No request of this contract sets or raises a level, and neither does an edit of the
|
|
// profile, the size of the profile, the number of members, or the domain of an email address. The
|
|
// first slice of the product uses e0 and e1; the processes for e1, e2, and e3 do not exist yet, so a
|
|
// client treats every level other than e0 as unavailable until they do. Adding a level is a contract
|
|
// change.
|
|
// Ref: #/components/schemas/OrganizationVerificationLevel
|
|
type OrganizationVerificationLevel string
|
|
|
|
const (
|
|
OrganizationVerificationLevelE0 OrganizationVerificationLevel = "e0"
|
|
OrganizationVerificationLevelE1 OrganizationVerificationLevel = "e1"
|
|
OrganizationVerificationLevelE2 OrganizationVerificationLevel = "e2"
|
|
OrganizationVerificationLevelE3 OrganizationVerificationLevel = "e3"
|
|
)
|
|
|
|
// AllValues returns all OrganizationVerificationLevel values.
|
|
func (OrganizationVerificationLevel) AllValues() []OrganizationVerificationLevel {
|
|
return []OrganizationVerificationLevel{
|
|
OrganizationVerificationLevelE0,
|
|
OrganizationVerificationLevelE1,
|
|
OrganizationVerificationLevelE2,
|
|
OrganizationVerificationLevelE3,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s OrganizationVerificationLevel) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case OrganizationVerificationLevelE0:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationLevelE1:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationLevelE2:
|
|
return []byte(s), nil
|
|
case OrganizationVerificationLevelE3:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *OrganizationVerificationLevel) UnmarshalText(data []byte) error {
|
|
switch OrganizationVerificationLevel(data) {
|
|
case OrganizationVerificationLevelE0:
|
|
*s = OrganizationVerificationLevelE0
|
|
return nil
|
|
case OrganizationVerificationLevelE1:
|
|
*s = OrganizationVerificationLevelE1
|
|
return nil
|
|
case OrganizationVerificationLevelE2:
|
|
*s = OrganizationVerificationLevelE2
|
|
return nil
|
|
case OrganizationVerificationLevelE3:
|
|
*s = OrganizationVerificationLevelE3
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type OrganizationVersion int64
|
|
|
|
type OrganizationWebsite string
|
|
|
|
// Cursor pagination state of a list response. Lists are ordered by a stable server-defined key. To
|
|
// read the next page, repeat the request with the same filters and `cursor` set to `next_cursor`.
|
|
// Ref: #/components/schemas/PageInfo
|
|
type PageInfo struct {
|
|
// Whether another page follows this one.
|
|
HasMore bool `json:"has_more"`
|
|
// Opaque cursor of the next page, or null on the last page. Clients must not parse, build, or store it
|
|
// beyond the current listing.
|
|
NextCursor NilString `json:"next_cursor"`
|
|
}
|
|
|
|
// GetHasMore returns the value of HasMore.
|
|
func (s *PageInfo) GetHasMore() bool {
|
|
return s.HasMore
|
|
}
|
|
|
|
// GetNextCursor returns the value of NextCursor.
|
|
func (s *PageInfo) GetNextCursor() NilString {
|
|
return s.NextCursor
|
|
}
|
|
|
|
// SetHasMore sets the value of HasMore.
|
|
func (s *PageInfo) SetHasMore(val bool) {
|
|
s.HasMore = val
|
|
}
|
|
|
|
// SetNextCursor sets the value of NextCursor.
|
|
func (s *PageInfo) SetNextCursor(val NilString) {
|
|
s.NextCursor = val
|
|
}
|
|
|
|
// Consent C1 to the processing of personal data, given at registration. The client reads the current
|
|
// text and its version with GetConsentText(c1) and sends that version here. A version that is not the
|
|
// currently published one answers 400 validation_failed with the pointer `/consent_c1/text_version`;
|
|
// the client then reads the text again and asks the user to accept the new version. Unknown fields are
|
|
// rejected, so registration cannot carry any other consent; in particular, C4 is never part of
|
|
// registration.
|
|
// Ref: #/components/schemas/PersonalDataConsentAcceptance
|
|
type PersonalDataConsentAcceptance struct {
|
|
TextVersion ConsentTextVersion `json:"text_version"`
|
|
// Explicit acceptance. Only true is valid.
|
|
Accepted PersonalDataConsentAcceptanceAccepted `json:"accepted"`
|
|
}
|
|
|
|
// GetTextVersion returns the value of TextVersion.
|
|
func (s *PersonalDataConsentAcceptance) GetTextVersion() ConsentTextVersion {
|
|
return s.TextVersion
|
|
}
|
|
|
|
// GetAccepted returns the value of Accepted.
|
|
func (s *PersonalDataConsentAcceptance) GetAccepted() PersonalDataConsentAcceptanceAccepted {
|
|
return s.Accepted
|
|
}
|
|
|
|
// SetTextVersion sets the value of TextVersion.
|
|
func (s *PersonalDataConsentAcceptance) SetTextVersion(val ConsentTextVersion) {
|
|
s.TextVersion = val
|
|
}
|
|
|
|
// SetAccepted sets the value of Accepted.
|
|
func (s *PersonalDataConsentAcceptance) SetAccepted(val PersonalDataConsentAcceptanceAccepted) {
|
|
s.Accepted = val
|
|
}
|
|
|
|
// Explicit acceptance. Only true is valid.
|
|
type PersonalDataConsentAcceptanceAccepted bool
|
|
|
|
const (
|
|
PersonalDataConsentAcceptanceAcceptedTrue PersonalDataConsentAcceptanceAccepted = true
|
|
)
|
|
|
|
// AllValues returns all PersonalDataConsentAcceptanceAccepted values.
|
|
func (PersonalDataConsentAcceptanceAccepted) AllValues() []PersonalDataConsentAcceptanceAccepted {
|
|
return []PersonalDataConsentAcceptanceAccepted{
|
|
PersonalDataConsentAcceptanceAcceptedTrue,
|
|
}
|
|
}
|
|
|
|
// Practice solution. It runs in the isolated sandbox without network access, secrets, or business
|
|
// data. Two submissions are equal only when the language is the same and the source texts are
|
|
// identical. The source is never echoed in a response or a problem.
|
|
// Ref: #/components/schemas/PracticeAnswer
|
|
type PracticeAnswer struct {
|
|
Format PracticeAnswerFormat `json:"format"`
|
|
// One of the `languages` of the practice item, or null when the item offers none.
|
|
Language NilTaskLanguage `json:"language"`
|
|
SourceCode string `json:"source_code"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *PracticeAnswer) GetFormat() PracticeAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetLanguage returns the value of Language.
|
|
func (s *PracticeAnswer) GetLanguage() NilTaskLanguage {
|
|
return s.Language
|
|
}
|
|
|
|
// GetSourceCode returns the value of SourceCode.
|
|
func (s *PracticeAnswer) GetSourceCode() string {
|
|
return s.SourceCode
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *PracticeAnswer) SetFormat(val PracticeAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetLanguage sets the value of Language.
|
|
func (s *PracticeAnswer) SetLanguage(val NilTaskLanguage) {
|
|
s.Language = val
|
|
}
|
|
|
|
// SetSourceCode sets the value of SourceCode.
|
|
func (s *PracticeAnswer) SetSourceCode(val string) {
|
|
s.SourceCode = val
|
|
}
|
|
|
|
type PracticeAnswerFormat string
|
|
|
|
const (
|
|
PracticeAnswerFormatPractice PracticeAnswerFormat = "practice"
|
|
)
|
|
|
|
// AllValues returns all PracticeAnswerFormat values.
|
|
func (PracticeAnswerFormat) AllValues() []PracticeAnswerFormat {
|
|
return []PracticeAnswerFormat{
|
|
PracticeAnswerFormatPractice,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PracticeAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PracticeAnswerFormatPractice:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PracticeAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch PracticeAnswerFormat(data) {
|
|
case PracticeAnswerFormatPractice:
|
|
*s = PracticeAnswerFormatPractice
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Public example of the practice task: an input and its expected output. Hidden checks are never
|
|
// listed.
|
|
// Ref: #/components/schemas/PracticeExample
|
|
type PracticeExample struct {
|
|
Input string `json:"input"`
|
|
ExpectedOutput string `json:"expected_output"`
|
|
}
|
|
|
|
// GetInput returns the value of Input.
|
|
func (s *PracticeExample) GetInput() string {
|
|
return s.Input
|
|
}
|
|
|
|
// GetExpectedOutput returns the value of ExpectedOutput.
|
|
func (s *PracticeExample) GetExpectedOutput() string {
|
|
return s.ExpectedOutput
|
|
}
|
|
|
|
// SetInput sets the value of Input.
|
|
func (s *PracticeExample) SetInput(val string) {
|
|
s.Input = val
|
|
}
|
|
|
|
// SetExpectedOutput sets the value of ExpectedOutput.
|
|
func (s *PracticeExample) SetExpectedOutput(val string) {
|
|
s.ExpectedOutput = val
|
|
}
|
|
|
|
// Why the sandbox infrastructure returned no verdict: `sandbox_busy` when its queue was full,
|
|
// `sandbox_error` for an infrastructure failure such as a broken executor. Neither depends on the
|
|
// solution; a solution that fails to compile, crashes, or exceeds a limit gets a `finished` verdict
|
|
// instead, so a failure never acts as an oracle for hidden checks.
|
|
// Ref: #/components/schemas/PracticeFailureReason
|
|
type PracticeFailureReason string
|
|
|
|
const (
|
|
PracticeFailureReasonSandboxBusy PracticeFailureReason = "sandbox_busy"
|
|
PracticeFailureReasonSandboxError PracticeFailureReason = "sandbox_error"
|
|
)
|
|
|
|
// AllValues returns all PracticeFailureReason values.
|
|
func (PracticeFailureReason) AllValues() []PracticeFailureReason {
|
|
return []PracticeFailureReason{
|
|
PracticeFailureReasonSandboxBusy,
|
|
PracticeFailureReasonSandboxError,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PracticeFailureReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PracticeFailureReasonSandboxBusy:
|
|
return []byte(s), nil
|
|
case PracticeFailureReasonSandboxError:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PracticeFailureReason) UnmarshalText(data []byte) error {
|
|
switch PracticeFailureReason(data) {
|
|
case PracticeFailureReasonSandboxBusy:
|
|
*s = PracticeFailureReasonSandboxBusy
|
|
return nil
|
|
case PracticeFailureReasonSandboxError:
|
|
*s = PracticeFailureReasonSandboxError
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Outcome of one hidden check group. It never contains the checks themselves.
|
|
// Ref: #/components/schemas/PracticeGroupResult
|
|
type PracticeGroupResult struct {
|
|
Group int32 `json:"group"`
|
|
Passed bool `json:"passed"`
|
|
}
|
|
|
|
// GetGroup returns the value of Group.
|
|
func (s *PracticeGroupResult) GetGroup() int32 {
|
|
return s.Group
|
|
}
|
|
|
|
// GetPassed returns the value of Passed.
|
|
func (s *PracticeGroupResult) GetPassed() bool {
|
|
return s.Passed
|
|
}
|
|
|
|
// SetGroup sets the value of Group.
|
|
func (s *PracticeGroupResult) SetGroup(val int32) {
|
|
s.Group = val
|
|
}
|
|
|
|
// SetPassed sets the value of Passed.
|
|
func (s *PracticeGroupResult) SetPassed(val bool) {
|
|
s.Passed = val
|
|
}
|
|
|
|
// Code practice. The candidate submits one final solution, which runs in the isolated sandbox against
|
|
// three groups of hidden checks. The content lists only the statement, the allowed languages, and
|
|
// public examples; hidden checks, their inputs, and seeds never reach the client.
|
|
// Ref: #/components/schemas/PracticeItemContent
|
|
type PracticeItemContent struct {
|
|
Format PracticeItemContentFormat `json:"format"`
|
|
// Languages the solution may use. Empty when the task does not offer a choice; the submission then
|
|
// sends a null language.
|
|
Languages []TaskLanguage `json:"languages"`
|
|
PublicExamples []PracticeExample `json:"public_examples"`
|
|
// Maximum length of the solution source in characters.
|
|
MaxSourceLength int32 `json:"max_source_length"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *PracticeItemContent) GetFormat() PracticeItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetLanguages returns the value of Languages.
|
|
func (s *PracticeItemContent) GetLanguages() []TaskLanguage {
|
|
return s.Languages
|
|
}
|
|
|
|
// GetPublicExamples returns the value of PublicExamples.
|
|
func (s *PracticeItemContent) GetPublicExamples() []PracticeExample {
|
|
return s.PublicExamples
|
|
}
|
|
|
|
// GetMaxSourceLength returns the value of MaxSourceLength.
|
|
func (s *PracticeItemContent) GetMaxSourceLength() int32 {
|
|
return s.MaxSourceLength
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *PracticeItemContent) SetFormat(val PracticeItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetLanguages sets the value of Languages.
|
|
func (s *PracticeItemContent) SetLanguages(val []TaskLanguage) {
|
|
s.Languages = val
|
|
}
|
|
|
|
// SetPublicExamples sets the value of PublicExamples.
|
|
func (s *PracticeItemContent) SetPublicExamples(val []PracticeExample) {
|
|
s.PublicExamples = val
|
|
}
|
|
|
|
// SetMaxSourceLength sets the value of MaxSourceLength.
|
|
func (s *PracticeItemContent) SetMaxSourceLength(val int32) {
|
|
s.MaxSourceLength = val
|
|
}
|
|
|
|
type PracticeItemContentFormat string
|
|
|
|
const (
|
|
PracticeItemContentFormatPractice PracticeItemContentFormat = "practice"
|
|
)
|
|
|
|
// AllValues returns all PracticeItemContentFormat values.
|
|
func (PracticeItemContentFormat) AllValues() []PracticeItemContentFormat {
|
|
return []PracticeItemContentFormat{
|
|
PracticeItemContentFormatPractice,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PracticeItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PracticeItemContentFormatPractice:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PracticeItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch PracticeItemContentFormat(data) {
|
|
case PracticeItemContentFormatPractice:
|
|
*s = PracticeItemContentFormatPractice
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Role of a practice in the attempt.
|
|
//
|
|
// - main: the practice that every attempt with practice requires before a decision.
|
|
// - additional: adaptive only; offered by finalize when the probability of reaching the grade is in
|
|
// the band below confirmation. It continues the same attempt and spends no new attempt.
|
|
//
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/PracticeKind
|
|
type PracticeKind string
|
|
|
|
const (
|
|
PracticeKindMain PracticeKind = "main"
|
|
PracticeKindAdditional PracticeKind = "additional"
|
|
)
|
|
|
|
// AllValues returns all PracticeKind values.
|
|
func (PracticeKind) AllValues() []PracticeKind {
|
|
return []PracticeKind{
|
|
PracticeKindMain,
|
|
PracticeKindAdditional,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PracticeKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PracticeKindMain:
|
|
return []byte(s), nil
|
|
case PracticeKindAdditional:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PracticeKind) UnmarshalText(data []byte) error {
|
|
switch PracticeKind(data) {
|
|
case PracticeKindMain:
|
|
*s = PracticeKindMain
|
|
return nil
|
|
case PracticeKindAdditional:
|
|
*s = PracticeKindAdditional
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// State of a practice.
|
|
//
|
|
// - not_started: no solution was submitted yet.
|
|
// - pending: the submitted solution is queued or running in the sandbox.
|
|
// - finished: the sandbox ran the solution and returned a verdict; `verdict` holds it. Every outcome
|
|
// caused by the solution itself, such as a compilation error, a runtime error, a time limit, or a
|
|
// memory limit, is `finished` with the affected groups not passed.
|
|
// - failed: the sandbox infrastructure could not run the solution, for example because its queue was
|
|
// full or an executor broke, independently of the solution. The failure is not the candidate's and
|
|
// consumes nothing; the practice can be submitted again.
|
|
//
|
|
// Ref: #/components/schemas/PracticeStatus
|
|
type PracticeStatus string
|
|
|
|
const (
|
|
PracticeStatusNotStarted PracticeStatus = "not_started"
|
|
PracticeStatusPending PracticeStatus = "pending"
|
|
PracticeStatusFinished PracticeStatus = "finished"
|
|
PracticeStatusFailed PracticeStatus = "failed"
|
|
)
|
|
|
|
// AllValues returns all PracticeStatus values.
|
|
func (PracticeStatus) AllValues() []PracticeStatus {
|
|
return []PracticeStatus{
|
|
PracticeStatusNotStarted,
|
|
PracticeStatusPending,
|
|
PracticeStatusFinished,
|
|
PracticeStatusFailed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PracticeStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PracticeStatusNotStarted:
|
|
return []byte(s), nil
|
|
case PracticeStatusPending:
|
|
return []byte(s), nil
|
|
case PracticeStatusFinished:
|
|
return []byte(s), nil
|
|
case PracticeStatusFailed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PracticeStatus) UnmarshalText(data []byte) error {
|
|
switch PracticeStatus(data) {
|
|
case PracticeStatusNotStarted:
|
|
*s = PracticeStatusNotStarted
|
|
return nil
|
|
case PracticeStatusPending:
|
|
*s = PracticeStatusPending
|
|
return nil
|
|
case PracticeStatusFinished:
|
|
*s = PracticeStatusFinished
|
|
return nil
|
|
case PracticeStatusFailed:
|
|
*s = PracticeStatusFailed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Verdict of a practice solution on the hidden checks: the score 0-3, one point for each passed group.
|
|
// The hidden checks, their inputs and outputs, error output, and seeds are never returned.
|
|
// Ref: #/components/schemas/PracticeVerdict
|
|
type PracticeVerdict struct {
|
|
Score int32 `json:"score"`
|
|
MaxScore int32 `json:"max_score"`
|
|
Groups []PracticeGroupResult `json:"groups"`
|
|
}
|
|
|
|
// GetScore returns the value of Score.
|
|
func (s *PracticeVerdict) GetScore() int32 {
|
|
return s.Score
|
|
}
|
|
|
|
// GetMaxScore returns the value of MaxScore.
|
|
func (s *PracticeVerdict) GetMaxScore() int32 {
|
|
return s.MaxScore
|
|
}
|
|
|
|
// GetGroups returns the value of Groups.
|
|
func (s *PracticeVerdict) GetGroups() []PracticeGroupResult {
|
|
return s.Groups
|
|
}
|
|
|
|
// SetScore sets the value of Score.
|
|
func (s *PracticeVerdict) SetScore(val int32) {
|
|
s.Score = val
|
|
}
|
|
|
|
// SetMaxScore sets the value of MaxScore.
|
|
func (s *PracticeVerdict) SetMaxScore(val int32) {
|
|
s.MaxScore = val
|
|
}
|
|
|
|
// SetGroups sets the value of Groups.
|
|
func (s *PracticeVerdict) SetGroups(val []PracticeGroupResult) {
|
|
s.Groups = val
|
|
}
|
|
|
|
// One recorded change of the visibility settings of the current candidate, as evidence of what was
|
|
// published, hidden, or announced and when. The history is append-only and returns only the caller's
|
|
// own records. A publication event carries the published fields and the C2 record behind them; an
|
|
// organization event names the organization; the other properties are null.
|
|
// Ref: #/components/schemas/PrivacyEvent
|
|
type PrivacyEvent struct {
|
|
// Identifier of the event.
|
|
ID uuid.UUID `json:"id"`
|
|
Kind PrivacyEventKind `json:"kind"`
|
|
OccurredAt Timestamp `json:"occurred_at"`
|
|
// Published fields after the change for `publication_opened` and `publication_changed`, an empty set
|
|
// for `publication_closed`, and null for every other kind.
|
|
Fields CardFieldSet `json:"fields"`
|
|
// C2 record that backs the publication, for `publication_opened` and `publication_changed`, or null.
|
|
ConsentID NilUUID `json:"consent_id"`
|
|
// Organization of `organization_hidden` and `organization_unhidden` with its current name, resolved
|
|
// when the history is read (the event stores only the identifier), or null.
|
|
Organization NilPrivacyOrganization `json:"organization"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *PrivacyEvent) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *PrivacyEvent) GetKind() PrivacyEventKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetOccurredAt returns the value of OccurredAt.
|
|
func (s *PrivacyEvent) GetOccurredAt() Timestamp {
|
|
return s.OccurredAt
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *PrivacyEvent) GetFields() CardFieldSet {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetConsentID returns the value of ConsentID.
|
|
func (s *PrivacyEvent) GetConsentID() NilUUID {
|
|
return s.ConsentID
|
|
}
|
|
|
|
// GetOrganization returns the value of Organization.
|
|
func (s *PrivacyEvent) GetOrganization() NilPrivacyOrganization {
|
|
return s.Organization
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *PrivacyEvent) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *PrivacyEvent) SetKind(val PrivacyEventKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetOccurredAt sets the value of OccurredAt.
|
|
func (s *PrivacyEvent) SetOccurredAt(val Timestamp) {
|
|
s.OccurredAt = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *PrivacyEvent) SetFields(val CardFieldSet) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetConsentID sets the value of ConsentID.
|
|
func (s *PrivacyEvent) SetConsentID(val NilUUID) {
|
|
s.ConsentID = val
|
|
}
|
|
|
|
// SetOrganization sets the value of Organization.
|
|
func (s *PrivacyEvent) SetOrganization(val NilPrivacyOrganization) {
|
|
s.Organization = val
|
|
}
|
|
|
|
// Kind of a change of the visibility settings that the history records.
|
|
//
|
|
// - publication_opened: the candidate published a closed profile.
|
|
// - publication_changed: the candidate changed the published fields of a published profile, or
|
|
// published it again under a new C2 record.
|
|
// - publication_closed: the candidate closed the publication. A revocation of C2 closes the card by
|
|
// the ledger and is read from the consent history, not recorded here.
|
|
// - search_status_confirmed: the candidate set or confirmed `looking`.
|
|
// - search_status_cleared: the candidate set `not_looking`. A lapse is not an event: it is computed.
|
|
// - organization_hidden: the candidate hid the profile from an organization.
|
|
// - organization_unhidden: the candidate lifted the hiding for an organization.
|
|
//
|
|
// Ref: #/components/schemas/PrivacyEventKind
|
|
type PrivacyEventKind string
|
|
|
|
const (
|
|
PrivacyEventKindPublicationOpened PrivacyEventKind = "publication_opened"
|
|
PrivacyEventKindPublicationChanged PrivacyEventKind = "publication_changed"
|
|
PrivacyEventKindPublicationClosed PrivacyEventKind = "publication_closed"
|
|
PrivacyEventKindSearchStatusConfirmed PrivacyEventKind = "search_status_confirmed"
|
|
PrivacyEventKindSearchStatusCleared PrivacyEventKind = "search_status_cleared"
|
|
PrivacyEventKindOrganizationHidden PrivacyEventKind = "organization_hidden"
|
|
PrivacyEventKindOrganizationUnhidden PrivacyEventKind = "organization_unhidden"
|
|
)
|
|
|
|
// AllValues returns all PrivacyEventKind values.
|
|
func (PrivacyEventKind) AllValues() []PrivacyEventKind {
|
|
return []PrivacyEventKind{
|
|
PrivacyEventKindPublicationOpened,
|
|
PrivacyEventKindPublicationChanged,
|
|
PrivacyEventKindPublicationClosed,
|
|
PrivacyEventKindSearchStatusConfirmed,
|
|
PrivacyEventKindSearchStatusCleared,
|
|
PrivacyEventKindOrganizationHidden,
|
|
PrivacyEventKindOrganizationUnhidden,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PrivacyEventKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PrivacyEventKindPublicationOpened:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindPublicationChanged:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindPublicationClosed:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindSearchStatusConfirmed:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindSearchStatusCleared:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindOrganizationHidden:
|
|
return []byte(s), nil
|
|
case PrivacyEventKindOrganizationUnhidden:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PrivacyEventKind) UnmarshalText(data []byte) error {
|
|
switch PrivacyEventKind(data) {
|
|
case PrivacyEventKindPublicationOpened:
|
|
*s = PrivacyEventKindPublicationOpened
|
|
return nil
|
|
case PrivacyEventKindPublicationChanged:
|
|
*s = PrivacyEventKindPublicationChanged
|
|
return nil
|
|
case PrivacyEventKindPublicationClosed:
|
|
*s = PrivacyEventKindPublicationClosed
|
|
return nil
|
|
case PrivacyEventKindSearchStatusConfirmed:
|
|
*s = PrivacyEventKindSearchStatusConfirmed
|
|
return nil
|
|
case PrivacyEventKindSearchStatusCleared:
|
|
*s = PrivacyEventKindSearchStatusCleared
|
|
return nil
|
|
case PrivacyEventKindOrganizationHidden:
|
|
*s = PrivacyEventKindOrganizationHidden
|
|
return nil
|
|
case PrivacyEventKindOrganizationUnhidden:
|
|
*s = PrivacyEventKindOrganizationUnhidden
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One page of the settings history of the current candidate, newest first.
|
|
// Ref: #/components/schemas/PrivacyEventList
|
|
type PrivacyEventList struct {
|
|
// Events of the page.
|
|
Items []PrivacyEvent `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *PrivacyEventList) GetItems() []PrivacyEvent {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *PrivacyEventList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *PrivacyEventList) SetItems(val []PrivacyEvent) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *PrivacyEventList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// PrivacyEventListHeaders wraps PrivacyEventList with response headers.
|
|
type PrivacyEventListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response PrivacyEventList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *PrivacyEventListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *PrivacyEventListHeaders) GetResponse() PrivacyEventList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *PrivacyEventListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *PrivacyEventListHeaders) SetResponse(val PrivacyEventList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*PrivacyEventListHeaders) listMyPrivacyHistoryRes() {}
|
|
|
|
// Organization as the candidate who hid it reads it. The name is the current name of the organization.
|
|
// The candidate must already have been able to see the organization to hide it, so the reference tells
|
|
// them nothing that they could not read before.
|
|
// Ref: #/components/schemas/PrivacyOrganization
|
|
type PrivacyOrganization struct {
|
|
// Identifier of the organization.
|
|
ID uuid.UUID `json:"id"`
|
|
// Current name of the organization. Plain text; clients show it as text, never as HTML.
|
|
Name string `json:"name"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *PrivacyOrganization) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetName returns the value of Name.
|
|
func (s *PrivacyOrganization) GetName() string {
|
|
return s.Name
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *PrivacyOrganization) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetName sets the value of Name.
|
|
func (s *PrivacyOrganization) SetName(val string) {
|
|
s.Name = val
|
|
}
|
|
|
|
// The visibility settings of the current candidate in one read: the publication, the search status,
|
|
// and the number of hidden organizations. The three are independent: each has its own version and its
|
|
// own operation, and a change of one leaves the others as they were. A new account reads a closed
|
|
// profile, `not_looking`, and no hidden organization.
|
|
// Ref: #/components/schemas/PrivacySettings
|
|
type PrivacySettings struct {
|
|
Publication Publication `json:"publication"`
|
|
SearchStatus SearchStatus `json:"search_status"`
|
|
// Number of organizations that the candidate hides the profile from. The list is read with
|
|
// `ListMyHiddenOrganizations`.
|
|
HiddenOrganizationsTotal int `json:"hidden_organizations_total"`
|
|
}
|
|
|
|
// GetPublication returns the value of Publication.
|
|
func (s *PrivacySettings) GetPublication() Publication {
|
|
return s.Publication
|
|
}
|
|
|
|
// GetSearchStatus returns the value of SearchStatus.
|
|
func (s *PrivacySettings) GetSearchStatus() SearchStatus {
|
|
return s.SearchStatus
|
|
}
|
|
|
|
// GetHiddenOrganizationsTotal returns the value of HiddenOrganizationsTotal.
|
|
func (s *PrivacySettings) GetHiddenOrganizationsTotal() int {
|
|
return s.HiddenOrganizationsTotal
|
|
}
|
|
|
|
// SetPublication sets the value of Publication.
|
|
func (s *PrivacySettings) SetPublication(val Publication) {
|
|
s.Publication = val
|
|
}
|
|
|
|
// SetSearchStatus sets the value of SearchStatus.
|
|
func (s *PrivacySettings) SetSearchStatus(val SearchStatus) {
|
|
s.SearchStatus = val
|
|
}
|
|
|
|
// SetHiddenOrganizationsTotal sets the value of HiddenOrganizationsTotal.
|
|
func (s *PrivacySettings) SetHiddenOrganizationsTotal(val int) {
|
|
s.HiddenOrganizationsTotal = val
|
|
}
|
|
|
|
// PrivacySettingsHeaders wraps PrivacySettings with response headers.
|
|
type PrivacySettingsHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response PrivacySettings
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *PrivacySettingsHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *PrivacySettingsHeaders) GetResponse() PrivacySettings {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *PrivacySettingsHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *PrivacySettingsHeaders) SetResponse(val PrivacySettings) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*PrivacySettingsHeaders) getMyPrivacySettingsRes() {}
|
|
|
|
// Problem details (RFC 9457) returned with the application/problem+json media type for every error
|
|
// response. `code` is the stable, machine-readable reason; clients branch on it rather than on
|
|
// `title`, `detail`, or the HTTP status alone. The body never contains internal error text, stack
|
|
// traces, SQL, file paths, credentials, contact data, or echoed request values.
|
|
// Ref: #/components/schemas/Problem
|
|
type Problem struct {
|
|
// URI that identifies the problem type. It has the form `urn:lincodex:problem:<code>` and is an
|
|
// identifier, not a link to dereference.
|
|
Type string `json:"type"`
|
|
// Short, fixed English summary of the problem type. It does not change between occurrences.
|
|
Title string `json:"title"`
|
|
// HTTP status code generated by the origin server.
|
|
Status int32 `json:"status"`
|
|
Code ProblemCode `json:"code"`
|
|
// Safe English explanation of this occurrence. It never contains internal error text or request
|
|
// values.
|
|
Detail OptString `json:"detail"`
|
|
// URI reference that identifies this occurrence, when one exists.
|
|
Instance OptString `json:"instance"`
|
|
// Request identifier, equal to the X-Request-ID response header. Quote it when reporting the problem;
|
|
// it is not a secret.
|
|
TraceID OptString `json:"trace_id"`
|
|
// Field-level reasons. validation_failed always carries them; state_conflict may carry one as a
|
|
// disambiguator when one code covers several conflicts (for example consent_required and
|
|
// limit_reached). Other codes omit it. A problem writer must not strip errors from a non-validation
|
|
// response.
|
|
Errors []ProblemFieldError `json:"errors"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *Problem) GetType() string {
|
|
return s.Type
|
|
}
|
|
|
|
// GetTitle returns the value of Title.
|
|
func (s *Problem) GetTitle() string {
|
|
return s.Title
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *Problem) GetStatus() int32 {
|
|
return s.Status
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *Problem) GetCode() ProblemCode {
|
|
return s.Code
|
|
}
|
|
|
|
// GetDetail returns the value of Detail.
|
|
func (s *Problem) GetDetail() OptString {
|
|
return s.Detail
|
|
}
|
|
|
|
// GetInstance returns the value of Instance.
|
|
func (s *Problem) GetInstance() OptString {
|
|
return s.Instance
|
|
}
|
|
|
|
// GetTraceID returns the value of TraceID.
|
|
func (s *Problem) GetTraceID() OptString {
|
|
return s.TraceID
|
|
}
|
|
|
|
// GetErrors returns the value of Errors.
|
|
func (s *Problem) GetErrors() []ProblemFieldError {
|
|
return s.Errors
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *Problem) SetType(val string) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetTitle sets the value of Title.
|
|
func (s *Problem) SetTitle(val string) {
|
|
s.Title = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *Problem) SetStatus(val int32) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *Problem) SetCode(val ProblemCode) {
|
|
s.Code = val
|
|
}
|
|
|
|
// SetDetail sets the value of Detail.
|
|
func (s *Problem) SetDetail(val OptString) {
|
|
s.Detail = val
|
|
}
|
|
|
|
// SetInstance sets the value of Instance.
|
|
func (s *Problem) SetInstance(val OptString) {
|
|
s.Instance = val
|
|
}
|
|
|
|
// SetTraceID sets the value of TraceID.
|
|
func (s *Problem) SetTraceID(val OptString) {
|
|
s.TraceID = val
|
|
}
|
|
|
|
// SetErrors sets the value of Errors.
|
|
func (s *Problem) SetErrors(val []ProblemFieldError) {
|
|
s.Errors = val
|
|
}
|
|
|
|
func (*Problem) getConsentTextRes() {}
|
|
func (*Problem) getCurrentAccountRes() {}
|
|
func (*Problem) getCurrentSessionRes() {}
|
|
func (*Problem) logoutRes() {}
|
|
|
|
// Stable public error code. Adding a code is a contract change; renaming or removing one is a breaking
|
|
// change. Clients must handle an unknown code by its HTTP status.
|
|
//
|
|
// - validation_failed (400): parameters or body do not match the contract, or a body violates a
|
|
// domain rule such as salary_from <= salary_to; `errors` points at the fields.
|
|
// - verification_token_invalid (400): the email verification token is unknown, already used, or
|
|
// replaced by a newer one; request a new link or sign in.
|
|
// - verification_token_expired (400): the email verification token is past its lifetime; request a
|
|
// new link.
|
|
// - unauthenticated (401): no valid session or credentials.
|
|
// - invalid_credentials (401): the email and password do not match an account; an unknown email and a
|
|
// wrong password are not distinguished.
|
|
// - forbidden (403): the caller is authenticated but not allowed.
|
|
// - email_not_verified (403): the credentials are correct but the email is not verified yet.
|
|
// - csrf_check_failed (403): the request failed cross-site request protection: a missing or wrong
|
|
// X-CSRF-Token or a disallowed Origin.
|
|
// - not_found (404): the route or object does not exist or is not visible.
|
|
// - method_not_allowed (405): the route does not support the method.
|
|
// - idempotency_in_progress (409): a request with the same Idempotency-Key is still being processed.
|
|
// - state_conflict (409): the operation conflicts with the current state of the resource, for example
|
|
// an invitation that was already accepted.
|
|
// - version_conflict (412): If-Match, or an `expected_version` field in the request body, does not
|
|
// match the current version; nothing was changed.
|
|
// - payload_too_large (413): the request body exceeds the limit.
|
|
// - unsupported_media_type (415): the request Content-Type is not accepted.
|
|
// - idempotency_key_reused (422): the Idempotency-Key was already used with a different request.
|
|
// - precondition_required (428): the operation requires If-Match.
|
|
// - rate_limited (429): too many requests; see Retry-After.
|
|
// - internal (500): unexpected server error.
|
|
// - not_implemented (501): the operation is in the contract but not implemented yet.
|
|
//
|
|
// Ref: #/components/schemas/ProblemCode
|
|
type ProblemCode string
|
|
|
|
const (
|
|
ProblemCodeValidationFailed ProblemCode = "validation_failed"
|
|
ProblemCodeVerificationTokenInvalid ProblemCode = "verification_token_invalid"
|
|
ProblemCodeVerificationTokenExpired ProblemCode = "verification_token_expired"
|
|
ProblemCodeUnauthenticated ProblemCode = "unauthenticated"
|
|
ProblemCodeInvalidCredentials ProblemCode = "invalid_credentials"
|
|
ProblemCodeForbidden ProblemCode = "forbidden"
|
|
ProblemCodeEmailNotVerified ProblemCode = "email_not_verified"
|
|
ProblemCodeCsrfCheckFailed ProblemCode = "csrf_check_failed"
|
|
ProblemCodeNotFound ProblemCode = "not_found"
|
|
ProblemCodeMethodNotAllowed ProblemCode = "method_not_allowed"
|
|
ProblemCodeIdempotencyInProgress ProblemCode = "idempotency_in_progress"
|
|
ProblemCodeStateConflict ProblemCode = "state_conflict"
|
|
ProblemCodeVersionConflict ProblemCode = "version_conflict"
|
|
ProblemCodePayloadTooLarge ProblemCode = "payload_too_large"
|
|
ProblemCodeUnsupportedMediaType ProblemCode = "unsupported_media_type"
|
|
ProblemCodeIdempotencyKeyReused ProblemCode = "idempotency_key_reused"
|
|
ProblemCodePreconditionRequired ProblemCode = "precondition_required"
|
|
ProblemCodeRateLimited ProblemCode = "rate_limited"
|
|
ProblemCodeInternal ProblemCode = "internal"
|
|
ProblemCodeNotImplemented ProblemCode = "not_implemented"
|
|
)
|
|
|
|
// AllValues returns all ProblemCode values.
|
|
func (ProblemCode) AllValues() []ProblemCode {
|
|
return []ProblemCode{
|
|
ProblemCodeValidationFailed,
|
|
ProblemCodeVerificationTokenInvalid,
|
|
ProblemCodeVerificationTokenExpired,
|
|
ProblemCodeUnauthenticated,
|
|
ProblemCodeInvalidCredentials,
|
|
ProblemCodeForbidden,
|
|
ProblemCodeEmailNotVerified,
|
|
ProblemCodeCsrfCheckFailed,
|
|
ProblemCodeNotFound,
|
|
ProblemCodeMethodNotAllowed,
|
|
ProblemCodeIdempotencyInProgress,
|
|
ProblemCodeStateConflict,
|
|
ProblemCodeVersionConflict,
|
|
ProblemCodePayloadTooLarge,
|
|
ProblemCodeUnsupportedMediaType,
|
|
ProblemCodeIdempotencyKeyReused,
|
|
ProblemCodePreconditionRequired,
|
|
ProblemCodeRateLimited,
|
|
ProblemCodeInternal,
|
|
ProblemCodeNotImplemented,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProblemCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProblemCodeValidationFailed:
|
|
return []byte(s), nil
|
|
case ProblemCodeVerificationTokenInvalid:
|
|
return []byte(s), nil
|
|
case ProblemCodeVerificationTokenExpired:
|
|
return []byte(s), nil
|
|
case ProblemCodeUnauthenticated:
|
|
return []byte(s), nil
|
|
case ProblemCodeInvalidCredentials:
|
|
return []byte(s), nil
|
|
case ProblemCodeForbidden:
|
|
return []byte(s), nil
|
|
case ProblemCodeEmailNotVerified:
|
|
return []byte(s), nil
|
|
case ProblemCodeCsrfCheckFailed:
|
|
return []byte(s), nil
|
|
case ProblemCodeNotFound:
|
|
return []byte(s), nil
|
|
case ProblemCodeMethodNotAllowed:
|
|
return []byte(s), nil
|
|
case ProblemCodeIdempotencyInProgress:
|
|
return []byte(s), nil
|
|
case ProblemCodeStateConflict:
|
|
return []byte(s), nil
|
|
case ProblemCodeVersionConflict:
|
|
return []byte(s), nil
|
|
case ProblemCodePayloadTooLarge:
|
|
return []byte(s), nil
|
|
case ProblemCodeUnsupportedMediaType:
|
|
return []byte(s), nil
|
|
case ProblemCodeIdempotencyKeyReused:
|
|
return []byte(s), nil
|
|
case ProblemCodePreconditionRequired:
|
|
return []byte(s), nil
|
|
case ProblemCodeRateLimited:
|
|
return []byte(s), nil
|
|
case ProblemCodeInternal:
|
|
return []byte(s), nil
|
|
case ProblemCodeNotImplemented:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProblemCode) UnmarshalText(data []byte) error {
|
|
switch ProblemCode(data) {
|
|
case ProblemCodeValidationFailed:
|
|
*s = ProblemCodeValidationFailed
|
|
return nil
|
|
case ProblemCodeVerificationTokenInvalid:
|
|
*s = ProblemCodeVerificationTokenInvalid
|
|
return nil
|
|
case ProblemCodeVerificationTokenExpired:
|
|
*s = ProblemCodeVerificationTokenExpired
|
|
return nil
|
|
case ProblemCodeUnauthenticated:
|
|
*s = ProblemCodeUnauthenticated
|
|
return nil
|
|
case ProblemCodeInvalidCredentials:
|
|
*s = ProblemCodeInvalidCredentials
|
|
return nil
|
|
case ProblemCodeForbidden:
|
|
*s = ProblemCodeForbidden
|
|
return nil
|
|
case ProblemCodeEmailNotVerified:
|
|
*s = ProblemCodeEmailNotVerified
|
|
return nil
|
|
case ProblemCodeCsrfCheckFailed:
|
|
*s = ProblemCodeCsrfCheckFailed
|
|
return nil
|
|
case ProblemCodeNotFound:
|
|
*s = ProblemCodeNotFound
|
|
return nil
|
|
case ProblemCodeMethodNotAllowed:
|
|
*s = ProblemCodeMethodNotAllowed
|
|
return nil
|
|
case ProblemCodeIdempotencyInProgress:
|
|
*s = ProblemCodeIdempotencyInProgress
|
|
return nil
|
|
case ProblemCodeStateConflict:
|
|
*s = ProblemCodeStateConflict
|
|
return nil
|
|
case ProblemCodeVersionConflict:
|
|
*s = ProblemCodeVersionConflict
|
|
return nil
|
|
case ProblemCodePayloadTooLarge:
|
|
*s = ProblemCodePayloadTooLarge
|
|
return nil
|
|
case ProblemCodeUnsupportedMediaType:
|
|
*s = ProblemCodeUnsupportedMediaType
|
|
return nil
|
|
case ProblemCodeIdempotencyKeyReused:
|
|
*s = ProblemCodeIdempotencyKeyReused
|
|
return nil
|
|
case ProblemCodePreconditionRequired:
|
|
*s = ProblemCodePreconditionRequired
|
|
return nil
|
|
case ProblemCodeRateLimited:
|
|
*s = ProblemCodeRateLimited
|
|
return nil
|
|
case ProblemCodeInternal:
|
|
*s = ProblemCodeInternal
|
|
return nil
|
|
case ProblemCodeNotImplemented:
|
|
*s = ProblemCodeNotImplemented
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// One reason why a request field or parameter is invalid.
|
|
// Ref: #/components/schemas/ProblemFieldError
|
|
type ProblemFieldError struct {
|
|
In ProblemFieldLocation `json:"in"`
|
|
// JSON Pointer (RFC 6901). For `body` it points into the request body document, for example
|
|
// `/salary_from`; an empty string means the whole body. For a parameter it is `/` followed by the
|
|
// parameter name, for example `/limit` or `/Idempotency-Key`.
|
|
Pointer string `json:"pointer"`
|
|
// Stable field reason. Current values are `required` (missing value) and `invalid` (malformed value or
|
|
// a value outside the schema), and, on a state_conflict, `consent_required` (the operation needs a
|
|
// consent that is not active) and `limit_reached` (a per-account bound is reached). Clients must
|
|
// tolerate new values.
|
|
Code string `json:"code"`
|
|
// Fixed English message that never echoes the submitted value.
|
|
Message string `json:"message"`
|
|
}
|
|
|
|
// GetIn returns the value of In.
|
|
func (s *ProblemFieldError) GetIn() ProblemFieldLocation {
|
|
return s.In
|
|
}
|
|
|
|
// GetPointer returns the value of Pointer.
|
|
func (s *ProblemFieldError) GetPointer() string {
|
|
return s.Pointer
|
|
}
|
|
|
|
// GetCode returns the value of Code.
|
|
func (s *ProblemFieldError) GetCode() string {
|
|
return s.Code
|
|
}
|
|
|
|
// GetMessage returns the value of Message.
|
|
func (s *ProblemFieldError) GetMessage() string {
|
|
return s.Message
|
|
}
|
|
|
|
// SetIn sets the value of In.
|
|
func (s *ProblemFieldError) SetIn(val ProblemFieldLocation) {
|
|
s.In = val
|
|
}
|
|
|
|
// SetPointer sets the value of Pointer.
|
|
func (s *ProblemFieldError) SetPointer(val string) {
|
|
s.Pointer = val
|
|
}
|
|
|
|
// SetCode sets the value of Code.
|
|
func (s *ProblemFieldError) SetCode(val string) {
|
|
s.Code = val
|
|
}
|
|
|
|
// SetMessage sets the value of Message.
|
|
func (s *ProblemFieldError) SetMessage(val string) {
|
|
s.Message = val
|
|
}
|
|
|
|
// Part of the request that contains the invalid field.
|
|
// Ref: #/components/schemas/ProblemFieldLocation
|
|
type ProblemFieldLocation string
|
|
|
|
const (
|
|
ProblemFieldLocationBody ProblemFieldLocation = "body"
|
|
ProblemFieldLocationQuery ProblemFieldLocation = "query"
|
|
ProblemFieldLocationPath ProblemFieldLocation = "path"
|
|
ProblemFieldLocationHeader ProblemFieldLocation = "header"
|
|
ProblemFieldLocationCookie ProblemFieldLocation = "cookie"
|
|
)
|
|
|
|
// AllValues returns all ProblemFieldLocation values.
|
|
func (ProblemFieldLocation) AllValues() []ProblemFieldLocation {
|
|
return []ProblemFieldLocation{
|
|
ProblemFieldLocationBody,
|
|
ProblemFieldLocationQuery,
|
|
ProblemFieldLocationPath,
|
|
ProblemFieldLocationHeader,
|
|
ProblemFieldLocationCookie,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProblemFieldLocation) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProblemFieldLocationBody:
|
|
return []byte(s), nil
|
|
case ProblemFieldLocationQuery:
|
|
return []byte(s), nil
|
|
case ProblemFieldLocationPath:
|
|
return []byte(s), nil
|
|
case ProblemFieldLocationHeader:
|
|
return []byte(s), nil
|
|
case ProblemFieldLocationCookie:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProblemFieldLocation) UnmarshalText(data []byte) error {
|
|
switch ProblemFieldLocation(data) {
|
|
case ProblemFieldLocationBody:
|
|
*s = ProblemFieldLocationBody
|
|
return nil
|
|
case ProblemFieldLocationQuery:
|
|
*s = ProblemFieldLocationQuery
|
|
return nil
|
|
case ProblemFieldLocationPath:
|
|
*s = ProblemFieldLocationPath
|
|
return nil
|
|
case ProblemFieldLocationHeader:
|
|
*s = ProblemFieldLocationHeader
|
|
return nil
|
|
case ProblemFieldLocationCookie:
|
|
*s = ProblemFieldLocationCookie
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// ProblemHeaders wraps Problem with response headers.
|
|
type ProblemHeaders struct {
|
|
SetCookie string
|
|
Response Problem
|
|
}
|
|
|
|
// GetSetCookie returns the value of SetCookie.
|
|
func (s *ProblemHeaders) GetSetCookie() string {
|
|
return s.SetCookie
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ProblemHeaders) GetResponse() Problem {
|
|
return s.Response
|
|
}
|
|
|
|
// SetSetCookie sets the value of SetCookie.
|
|
func (s *ProblemHeaders) SetSetCookie(val string) {
|
|
s.SetCookie = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ProblemHeaders) SetResponse(val Problem) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*ProblemHeaders) logoutRes() {}
|
|
|
|
// ProblemStatusCode wraps Problem with StatusCode.
|
|
type ProblemStatusCode struct {
|
|
StatusCode int
|
|
Response Problem
|
|
}
|
|
|
|
// GetStatusCode returns the value of StatusCode.
|
|
func (s *ProblemStatusCode) GetStatusCode() int {
|
|
return s.StatusCode
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *ProblemStatusCode) GetResponse() Problem {
|
|
return s.Response
|
|
}
|
|
|
|
// SetStatusCode sets the value of StatusCode.
|
|
func (s *ProblemStatusCode) SetStatusCode(val int) {
|
|
s.StatusCode = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *ProblemStatusCode) SetResponse(val Problem) {
|
|
s.Response = val
|
|
}
|
|
|
|
// Where the value of a profile field or item came from. The server sets it; a request never sends it.
|
|
//
|
|
// - manual: the candidate typed the value in the form. `quote` and `extraction_version` are null.
|
|
// - extracted_from_resume: planned; the server extracted the value from an uploaded resume with the
|
|
// deterministic rules or the ML service. No MVP operation produces it, and no profile requires a
|
|
// resume.
|
|
// - imported: planned; the value was copied from an external source such as the FSP account of the
|
|
// candidate. No MVP operation produces it, and no profile requires such a link.
|
|
//
|
|
// Confirming an extracted value keeps its origin and quote; changing the value makes it `manual`.
|
|
// Adding a value is a contract change.
|
|
// Ref: #/components/schemas/ProfileClaimOrigin
|
|
type ProfileClaimOrigin string
|
|
|
|
const (
|
|
ProfileClaimOriginManual ProfileClaimOrigin = "manual"
|
|
ProfileClaimOriginExtractedFromResume ProfileClaimOrigin = "extracted_from_resume"
|
|
ProfileClaimOriginImported ProfileClaimOrigin = "imported"
|
|
)
|
|
|
|
// AllValues returns all ProfileClaimOrigin values.
|
|
func (ProfileClaimOrigin) AllValues() []ProfileClaimOrigin {
|
|
return []ProfileClaimOrigin{
|
|
ProfileClaimOriginManual,
|
|
ProfileClaimOriginExtractedFromResume,
|
|
ProfileClaimOriginImported,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProfileClaimOrigin) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProfileClaimOriginManual:
|
|
return []byte(s), nil
|
|
case ProfileClaimOriginExtractedFromResume:
|
|
return []byte(s), nil
|
|
case ProfileClaimOriginImported:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProfileClaimOrigin) UnmarshalText(data []byte) error {
|
|
switch ProfileClaimOrigin(data) {
|
|
case ProfileClaimOriginManual:
|
|
*s = ProfileClaimOriginManual
|
|
return nil
|
|
case ProfileClaimOriginExtractedFromResume:
|
|
*s = ProfileClaimOriginExtractedFromResume
|
|
return nil
|
|
case ProfileClaimOriginImported:
|
|
*s = ProfileClaimOriginImported
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ProfileClaimQuote string
|
|
|
|
// Provenance and confirmation of one profile value: its origin, the trust level, the excerpt it was
|
|
// extracted from, the extractor version, and the time the candidate confirmed it. Read-only; the
|
|
// server derives it and a request cannot set it. The imported document or source itself is not
|
|
// referenced: the profile never requires a file, the ML service, or an FSP account, and a later link
|
|
// to them is an additive field.
|
|
// Ref: #/components/schemas/ProfileClaimSource
|
|
type ProfileClaimSource struct {
|
|
Origin ProfileClaimOrigin `json:"origin"`
|
|
TrustLevel ProfileClaimTrustLevel `json:"trust_level"`
|
|
// Excerpt of the imported document that supports the value, or null for a manual value and for an
|
|
// extracted value that the extractor did not tie to one excerpt.
|
|
Quote NilProfileClaimQuote `json:"quote"`
|
|
// Extractor version for an extracted or imported value, or null for a manual value.
|
|
ExtractionVersion NilNeedVersionLabel `json:"extraction_version"`
|
|
// Time the candidate typed or confirmed the value, or null while the value is an unconfirmed
|
|
// suggestion.
|
|
ConfirmedAt NilTimestamp `json:"confirmed_at"`
|
|
}
|
|
|
|
// GetOrigin returns the value of Origin.
|
|
func (s *ProfileClaimSource) GetOrigin() ProfileClaimOrigin {
|
|
return s.Origin
|
|
}
|
|
|
|
// GetTrustLevel returns the value of TrustLevel.
|
|
func (s *ProfileClaimSource) GetTrustLevel() ProfileClaimTrustLevel {
|
|
return s.TrustLevel
|
|
}
|
|
|
|
// GetQuote returns the value of Quote.
|
|
func (s *ProfileClaimSource) GetQuote() NilProfileClaimQuote {
|
|
return s.Quote
|
|
}
|
|
|
|
// GetExtractionVersion returns the value of ExtractionVersion.
|
|
func (s *ProfileClaimSource) GetExtractionVersion() NilNeedVersionLabel {
|
|
return s.ExtractionVersion
|
|
}
|
|
|
|
// GetConfirmedAt returns the value of ConfirmedAt.
|
|
func (s *ProfileClaimSource) GetConfirmedAt() NilTimestamp {
|
|
return s.ConfirmedAt
|
|
}
|
|
|
|
// SetOrigin sets the value of Origin.
|
|
func (s *ProfileClaimSource) SetOrigin(val ProfileClaimOrigin) {
|
|
s.Origin = val
|
|
}
|
|
|
|
// SetTrustLevel sets the value of TrustLevel.
|
|
func (s *ProfileClaimSource) SetTrustLevel(val ProfileClaimTrustLevel) {
|
|
s.TrustLevel = val
|
|
}
|
|
|
|
// SetQuote sets the value of Quote.
|
|
func (s *ProfileClaimSource) SetQuote(val NilProfileClaimQuote) {
|
|
s.Quote = val
|
|
}
|
|
|
|
// SetExtractionVersion sets the value of ExtractionVersion.
|
|
func (s *ProfileClaimSource) SetExtractionVersion(val NilNeedVersionLabel) {
|
|
s.ExtractionVersion = val
|
|
}
|
|
|
|
// SetConfirmedAt sets the value of ConfirmedAt.
|
|
func (s *ProfileClaimSource) SetConfirmedAt(val NilTimestamp) {
|
|
s.ConfirmedAt = val
|
|
}
|
|
|
|
// Confirmation state of a single profile field.
|
|
//
|
|
// - confirmed: the candidate typed the value or confirmed a suggestion.
|
|
// - extracted: the server proposed the value from an imported document or source and the candidate
|
|
// has not confirmed it. It is a claim of trust level 0.
|
|
// - unknown: the field has no value. `value` and `source` are null. The server never fills an unknown
|
|
// field with a default or a guess, such as a zero salary or a relocation answer.
|
|
//
|
|
// Ref: #/components/schemas/ProfileClaimStatus
|
|
type ProfileClaimStatus string
|
|
|
|
const (
|
|
ProfileClaimStatusConfirmed ProfileClaimStatus = "confirmed"
|
|
ProfileClaimStatusExtracted ProfileClaimStatus = "extracted"
|
|
ProfileClaimStatusUnknown ProfileClaimStatus = "unknown"
|
|
)
|
|
|
|
// AllValues returns all ProfileClaimStatus values.
|
|
func (ProfileClaimStatus) AllValues() []ProfileClaimStatus {
|
|
return []ProfileClaimStatus{
|
|
ProfileClaimStatusConfirmed,
|
|
ProfileClaimStatusExtracted,
|
|
ProfileClaimStatusUnknown,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProfileClaimStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProfileClaimStatusConfirmed:
|
|
return []byte(s), nil
|
|
case ProfileClaimStatusExtracted:
|
|
return []byte(s), nil
|
|
case ProfileClaimStatusUnknown:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProfileClaimStatus) UnmarshalText(data []byte) error {
|
|
switch ProfileClaimStatus(data) {
|
|
case ProfileClaimStatusConfirmed:
|
|
*s = ProfileClaimStatusConfirmed
|
|
return nil
|
|
case ProfileClaimStatusExtracted:
|
|
*s = ProfileClaimStatusExtracted
|
|
return nil
|
|
case ProfileClaimStatusUnknown:
|
|
*s = ProfileClaimStatusUnknown
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type ProfileClaimTrustLevel int32
|
|
|
|
// A category that an assessment result confirmed: the specialization with the confirmed grade. It is
|
|
// read-only and derived by the server from the assessment results of the candidate; no request carries
|
|
// it and the profile storage holds no such column, so neither a form nor an import can write a
|
|
// confirmed grade. It is separate from the claims of the profile and from the self-assessed grades in
|
|
// `roles`.
|
|
// Ref: #/components/schemas/ProfileConfirmedCategory
|
|
type ProfileConfirmedCategory struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
Grade GradeCode `json:"grade"`
|
|
ConfirmedAt Timestamp `json:"confirmed_at"`
|
|
// Assessment attempt whose result confirmed the grade. The attempt belongs to the candidate.
|
|
AttemptID uuid.UUID `json:"attempt_id"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *ProfileConfirmedCategory) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *ProfileConfirmedCategory) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// GetConfirmedAt returns the value of ConfirmedAt.
|
|
func (s *ProfileConfirmedCategory) GetConfirmedAt() Timestamp {
|
|
return s.ConfirmedAt
|
|
}
|
|
|
|
// GetAttemptID returns the value of AttemptID.
|
|
func (s *ProfileConfirmedCategory) GetAttemptID() uuid.UUID {
|
|
return s.AttemptID
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *ProfileConfirmedCategory) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *ProfileConfirmedCategory) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// SetConfirmedAt sets the value of ConfirmedAt.
|
|
func (s *ProfileConfirmedCategory) SetConfirmedAt(val Timestamp) {
|
|
s.ConfirmedAt = val
|
|
}
|
|
|
|
// SetAttemptID sets the value of AttemptID.
|
|
func (s *ProfileConfirmedCategory) SetAttemptID(val uuid.UUID) {
|
|
s.AttemptID = val
|
|
}
|
|
|
|
// Contact channels of the candidate. Each channel is a claim of its own, and the candidate fills in
|
|
// any subset. The kinds are the ones that the contact disclosure (consent C4) can pass on, with the
|
|
// same value formats, so a disclosure never has to convert or drop a stored value; adding a kind, such
|
|
// as a link to a code repository, is a contract change in both places. Contacts leave the profile only
|
|
// through a contact grant, never in a card or a search result. All values are personal data.
|
|
// Ref: #/components/schemas/ProfileContacts
|
|
type ProfileContacts struct {
|
|
Email ProfileEmailClaim `json:"email"`
|
|
Phone ProfilePhoneClaim `json:"phone"`
|
|
Telegram ProfileTelegramClaim `json:"telegram"`
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *ProfileContacts) GetEmail() ProfileEmailClaim {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPhone returns the value of Phone.
|
|
func (s *ProfileContacts) GetPhone() ProfilePhoneClaim {
|
|
return s.Phone
|
|
}
|
|
|
|
// GetTelegram returns the value of Telegram.
|
|
func (s *ProfileContacts) GetTelegram() ProfileTelegramClaim {
|
|
return s.Telegram
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *ProfileContacts) SetEmail(val ProfileEmailClaim) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPhone sets the value of Phone.
|
|
func (s *ProfileContacts) SetPhone(val ProfilePhoneClaim) {
|
|
s.Phone = val
|
|
}
|
|
|
|
// SetTelegram sets the value of Telegram.
|
|
func (s *ProfileContacts) SetTelegram(val ProfileTelegramClaim) {
|
|
s.Telegram = val
|
|
}
|
|
|
|
// Decisions about the contact channels in a request. A channel sent as null is unknown: it is removed
|
|
// if it was set.
|
|
// Ref: #/components/schemas/ProfileContactsInput
|
|
type ProfileContactsInput struct {
|
|
Email NilProfileEmailInput `json:"email"`
|
|
Phone NilProfilePhoneInput `json:"phone"`
|
|
Telegram NilProfileTelegramInput `json:"telegram"`
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *ProfileContactsInput) GetEmail() NilProfileEmailInput {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPhone returns the value of Phone.
|
|
func (s *ProfileContactsInput) GetPhone() NilProfilePhoneInput {
|
|
return s.Phone
|
|
}
|
|
|
|
// GetTelegram returns the value of Telegram.
|
|
func (s *ProfileContactsInput) GetTelegram() NilProfileTelegramInput {
|
|
return s.Telegram
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *ProfileContactsInput) SetEmail(val NilProfileEmailInput) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPhone sets the value of Phone.
|
|
func (s *ProfileContactsInput) SetPhone(val NilProfilePhoneInput) {
|
|
s.Phone = val
|
|
}
|
|
|
|
// SetTelegram sets the value of Telegram.
|
|
func (s *ProfileContactsInput) SetTelegram(val NilProfileTelegramInput) {
|
|
s.Telegram = val
|
|
}
|
|
|
|
// Contact email of the candidate with its confirmation state and provenance. It is personal data. It
|
|
// is a contact channel that the candidate gives, not the login of the account: the two may differ, the
|
|
// server never sends mail to it and never verifies it. `value` and `source` are null exactly when
|
|
// `status` is `unknown`.
|
|
// Ref: #/components/schemas/ProfileEmailClaim
|
|
type ProfileEmailClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilEmailAddress `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileEmailClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileEmailClaim) GetValue() NilEmailAddress {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileEmailClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileEmailClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileEmailClaim) SetValue(val NilEmailAddress) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileEmailClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the contact email in a request; see CandidateProfileUpdate for the rules of `status`.
|
|
// The value is personal data.
|
|
// Ref: #/components/schemas/ProfileEmailInput
|
|
type ProfileEmailInput struct {
|
|
Value EmailAddress `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileEmailInput) GetValue() EmailAddress {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileEmailInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileEmailInput) SetValue(val EmailAddress) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileEmailInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type ProfileEmployerName string
|
|
|
|
// One entry of the candidate's work history with its confirmation state and provenance. An entry
|
|
// describes the work by its specialization and tasks rather than by a job title, and it is a claim of
|
|
// trust level 0. It is different from the `CandidateExperience` of the questionnaire, which holds only
|
|
// the total months of commercial and academic experience of a chosen specialization as a hint for the
|
|
// assessment: the two are saved separately, and the server neither adds the entries up for the
|
|
// questionnaire nor fills the entries from it. An entry is personal data.
|
|
// Ref: #/components/schemas/ProfileExperienceItem
|
|
type ProfileExperienceItem struct {
|
|
// Employer of the entry, or null when the candidate gives none.
|
|
EmployerName NilProfileEmployerName `json:"employer_name"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
StartedOn ProfileYearMonth `json:"started_on"`
|
|
// Last month of the work, or null when the candidate still works there. It is not earlier than
|
|
// `started_on`.
|
|
EndedOn NilProfileYearMonth `json:"ended_on"`
|
|
// Tasks and results of the entry, or null when the candidate gives none.
|
|
Summary NilProfileExperienceSummary `json:"summary"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
Source ProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetEmployerName returns the value of EmployerName.
|
|
func (s *ProfileExperienceItem) GetEmployerName() NilProfileEmployerName {
|
|
return s.EmployerName
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *ProfileExperienceItem) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetStartedOn returns the value of StartedOn.
|
|
func (s *ProfileExperienceItem) GetStartedOn() ProfileYearMonth {
|
|
return s.StartedOn
|
|
}
|
|
|
|
// GetEndedOn returns the value of EndedOn.
|
|
func (s *ProfileExperienceItem) GetEndedOn() NilProfileYearMonth {
|
|
return s.EndedOn
|
|
}
|
|
|
|
// GetSummary returns the value of Summary.
|
|
func (s *ProfileExperienceItem) GetSummary() NilProfileExperienceSummary {
|
|
return s.Summary
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileExperienceItem) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileExperienceItem) GetSource() ProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetEmployerName sets the value of EmployerName.
|
|
func (s *ProfileExperienceItem) SetEmployerName(val NilProfileEmployerName) {
|
|
s.EmployerName = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *ProfileExperienceItem) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetStartedOn sets the value of StartedOn.
|
|
func (s *ProfileExperienceItem) SetStartedOn(val ProfileYearMonth) {
|
|
s.StartedOn = val
|
|
}
|
|
|
|
// SetEndedOn sets the value of EndedOn.
|
|
func (s *ProfileExperienceItem) SetEndedOn(val NilProfileYearMonth) {
|
|
s.EndedOn = val
|
|
}
|
|
|
|
// SetSummary sets the value of Summary.
|
|
func (s *ProfileExperienceItem) SetSummary(val NilProfileExperienceSummary) {
|
|
s.Summary = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileExperienceItem) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileExperienceItem) SetSource(val ProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about one work history entry in a request; see CandidateProfileUpdate for the rules of
|
|
// `status`. The server also requires `ended_on` not to precede `started_on` and no month to lie in the
|
|
// future, and answers 400 with the pointer of the month.
|
|
// Ref: #/components/schemas/ProfileExperienceItemInput
|
|
type ProfileExperienceItemInput struct {
|
|
EmployerName NilProfileEmployerName `json:"employer_name"`
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
StartedOn ProfileYearMonth `json:"started_on"`
|
|
EndedOn NilProfileYearMonth `json:"ended_on"`
|
|
Summary NilProfileExperienceSummary `json:"summary"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetEmployerName returns the value of EmployerName.
|
|
func (s *ProfileExperienceItemInput) GetEmployerName() NilProfileEmployerName {
|
|
return s.EmployerName
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *ProfileExperienceItemInput) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetStartedOn returns the value of StartedOn.
|
|
func (s *ProfileExperienceItemInput) GetStartedOn() ProfileYearMonth {
|
|
return s.StartedOn
|
|
}
|
|
|
|
// GetEndedOn returns the value of EndedOn.
|
|
func (s *ProfileExperienceItemInput) GetEndedOn() NilProfileYearMonth {
|
|
return s.EndedOn
|
|
}
|
|
|
|
// GetSummary returns the value of Summary.
|
|
func (s *ProfileExperienceItemInput) GetSummary() NilProfileExperienceSummary {
|
|
return s.Summary
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileExperienceItemInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetEmployerName sets the value of EmployerName.
|
|
func (s *ProfileExperienceItemInput) SetEmployerName(val NilProfileEmployerName) {
|
|
s.EmployerName = val
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *ProfileExperienceItemInput) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetStartedOn sets the value of StartedOn.
|
|
func (s *ProfileExperienceItemInput) SetStartedOn(val ProfileYearMonth) {
|
|
s.StartedOn = val
|
|
}
|
|
|
|
// SetEndedOn sets the value of EndedOn.
|
|
func (s *ProfileExperienceItemInput) SetEndedOn(val NilProfileYearMonth) {
|
|
s.EndedOn = val
|
|
}
|
|
|
|
// SetSummary sets the value of Summary.
|
|
func (s *ProfileExperienceItemInput) SetSummary(val NilProfileExperienceSummary) {
|
|
s.Summary = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileExperienceItemInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// One pair of work history entries whose inclusive month ranges overlap. The indices refer to the
|
|
// experience array in this profile version. `confirmed` records an explicit acknowledgement for this
|
|
// pair of dates; otherwise the pair needs confirmation before a changed profile can be saved.
|
|
// Ref: #/components/schemas/ProfileExperienceOverlap
|
|
type ProfileExperienceOverlap struct {
|
|
FirstIndex int `json:"first_index"`
|
|
SecondIndex int `json:"second_index"`
|
|
Status ProfileExperienceOverlapStatus `json:"status"`
|
|
}
|
|
|
|
// GetFirstIndex returns the value of FirstIndex.
|
|
func (s *ProfileExperienceOverlap) GetFirstIndex() int {
|
|
return s.FirstIndex
|
|
}
|
|
|
|
// GetSecondIndex returns the value of SecondIndex.
|
|
func (s *ProfileExperienceOverlap) GetSecondIndex() int {
|
|
return s.SecondIndex
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileExperienceOverlap) GetStatus() ProfileExperienceOverlapStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetFirstIndex sets the value of FirstIndex.
|
|
func (s *ProfileExperienceOverlap) SetFirstIndex(val int) {
|
|
s.FirstIndex = val
|
|
}
|
|
|
|
// SetSecondIndex sets the value of SecondIndex.
|
|
func (s *ProfileExperienceOverlap) SetSecondIndex(val int) {
|
|
s.SecondIndex = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileExperienceOverlap) SetStatus(val ProfileExperienceOverlapStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Whether the candidate confirmed that two overlapping periods are genuine parallel work.
|
|
// Ref: #/components/schemas/ProfileExperienceOverlapStatus
|
|
type ProfileExperienceOverlapStatus string
|
|
|
|
const (
|
|
ProfileExperienceOverlapStatusNeedsConfirmation ProfileExperienceOverlapStatus = "needs_confirmation"
|
|
ProfileExperienceOverlapStatusConfirmed ProfileExperienceOverlapStatus = "confirmed"
|
|
)
|
|
|
|
// AllValues returns all ProfileExperienceOverlapStatus values.
|
|
func (ProfileExperienceOverlapStatus) AllValues() []ProfileExperienceOverlapStatus {
|
|
return []ProfileExperienceOverlapStatus{
|
|
ProfileExperienceOverlapStatusNeedsConfirmation,
|
|
ProfileExperienceOverlapStatusConfirmed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProfileExperienceOverlapStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProfileExperienceOverlapStatusNeedsConfirmation:
|
|
return []byte(s), nil
|
|
case ProfileExperienceOverlapStatusConfirmed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProfileExperienceOverlapStatus) UnmarshalText(data []byte) error {
|
|
switch ProfileExperienceOverlapStatus(data) {
|
|
case ProfileExperienceOverlapStatusNeedsConfirmation:
|
|
*s = ProfileExperienceOverlapStatusNeedsConfirmation
|
|
return nil
|
|
case ProfileExperienceOverlapStatusConfirmed:
|
|
*s = ProfileExperienceOverlapStatusConfirmed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The exact month range of an experience entry, copied into a confirmation.
|
|
// Ref: #/components/schemas/ProfileExperiencePeriod
|
|
type ProfileExperiencePeriod struct {
|
|
StartedOn ProfileYearMonth `json:"started_on"`
|
|
// Last month of work, or null when the period is open-ended.
|
|
EndedOn NilProfileYearMonth `json:"ended_on"`
|
|
}
|
|
|
|
// GetStartedOn returns the value of StartedOn.
|
|
func (s *ProfileExperiencePeriod) GetStartedOn() ProfileYearMonth {
|
|
return s.StartedOn
|
|
}
|
|
|
|
// GetEndedOn returns the value of EndedOn.
|
|
func (s *ProfileExperiencePeriod) GetEndedOn() NilProfileYearMonth {
|
|
return s.EndedOn
|
|
}
|
|
|
|
// SetStartedOn sets the value of StartedOn.
|
|
func (s *ProfileExperiencePeriod) SetStartedOn(val ProfileYearMonth) {
|
|
s.StartedOn = val
|
|
}
|
|
|
|
// SetEndedOn sets the value of EndedOn.
|
|
func (s *ProfileExperiencePeriod) SetEndedOn(val NilProfileYearMonth) {
|
|
s.EndedOn = val
|
|
}
|
|
|
|
type ProfileExperienceSummary string
|
|
|
|
// Full name of the candidate with its confirmation state and provenance. The value is personal data.
|
|
// It is disclosed to one organization only through the contact grant of the consent C4 and never
|
|
// appears in an organization-visible schema. `value` and `source` are null exactly when `status` is
|
|
// `unknown`.
|
|
// Ref: #/components/schemas/ProfileFullNameClaim
|
|
type ProfileFullNameClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilContactFullName `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileFullNameClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileFullNameClaim) GetValue() NilContactFullName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileFullNameClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileFullNameClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileFullNameClaim) SetValue(val NilContactFullName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileFullNameClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the full name in a request; see CandidateProfileUpdate for the rules of `status`. The
|
|
// value is personal data.
|
|
// Ref: #/components/schemas/ProfileFullNameInput
|
|
type ProfileFullNameInput struct {
|
|
Value ContactFullName `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileFullNameInput) GetValue() ContactFullName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileFullNameInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileFullNameInput) SetValue(val ContactFullName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileFullNameInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Confirmation state of a profile list item, and the decision that a request sends for a field or an
|
|
// item.
|
|
//
|
|
// - confirmed: the candidate typed the value or confirmed a suggestion. Only confirmed values leave
|
|
// the profile, for example into a disclosure.
|
|
// - extracted: a suggestion that the server took from an imported document or source. Nobody has
|
|
// confirmed it yet, so it is a claim of trust level 0 that no other feature uses.
|
|
//
|
|
// A request sends `confirmed` to confirm a suggestion or to set a manual value, and `extracted` only
|
|
// to keep a stored suggestion unconfirmed with exactly its stored value; a client that submits an
|
|
// unchanged form therefore confirms nothing by accident. An item is never `unknown`: a missing item is
|
|
// simply absent from the list.
|
|
// Ref: #/components/schemas/ProfileItemStatus
|
|
type ProfileItemStatus string
|
|
|
|
const (
|
|
ProfileItemStatusConfirmed ProfileItemStatus = "confirmed"
|
|
ProfileItemStatusExtracted ProfileItemStatus = "extracted"
|
|
)
|
|
|
|
// AllValues returns all ProfileItemStatus values.
|
|
func (ProfileItemStatus) AllValues() []ProfileItemStatus {
|
|
return []ProfileItemStatus{
|
|
ProfileItemStatusConfirmed,
|
|
ProfileItemStatusExtracted,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s ProfileItemStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case ProfileItemStatusConfirmed:
|
|
return []byte(s), nil
|
|
case ProfileItemStatusExtracted:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *ProfileItemStatus) UnmarshalText(data []byte) error {
|
|
switch ProfileItemStatus(data) {
|
|
case ProfileItemStatusConfirmed:
|
|
*s = ProfileItemStatusConfirmed
|
|
return nil
|
|
case ProfileItemStatusExtracted:
|
|
*s = ProfileItemStatusExtracted
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Place of the candidate with its confirmation state and provenance. It is personal data. `value` and
|
|
// `source` are null exactly when `status` is `unknown`.
|
|
// Ref: #/components/schemas/ProfileLocationClaim
|
|
type ProfileLocationClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilProfileLocationName `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileLocationClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileLocationClaim) GetValue() NilProfileLocationName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileLocationClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileLocationClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileLocationClaim) SetValue(val NilProfileLocationName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileLocationClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the place in a request; see CandidateProfileUpdate for the rules of `status`. The
|
|
// value is personal data.
|
|
// Ref: #/components/schemas/ProfileLocationInput
|
|
type ProfileLocationInput struct {
|
|
Value ProfileLocationName `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileLocationInput) GetValue() ProfileLocationName {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileLocationInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileLocationInput) SetValue(val ProfileLocationName) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileLocationInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type ProfileLocationName string
|
|
|
|
// Explicit acknowledgement that the two indexed experience periods are genuine parallel work. The
|
|
// indices and exact ranges must match the submitted experience array; expected_version binds the
|
|
// acknowledgement to the profile version the candidate read.
|
|
// Ref: #/components/schemas/ProfileParallelPeriodConfirmation
|
|
type ProfileParallelPeriodConfirmation struct {
|
|
FirstIndex int `json:"first_index"`
|
|
SecondIndex int `json:"second_index"`
|
|
FirstPeriod ProfileExperiencePeriod `json:"first_period"`
|
|
SecondPeriod ProfileExperiencePeriod `json:"second_period"`
|
|
}
|
|
|
|
// GetFirstIndex returns the value of FirstIndex.
|
|
func (s *ProfileParallelPeriodConfirmation) GetFirstIndex() int {
|
|
return s.FirstIndex
|
|
}
|
|
|
|
// GetSecondIndex returns the value of SecondIndex.
|
|
func (s *ProfileParallelPeriodConfirmation) GetSecondIndex() int {
|
|
return s.SecondIndex
|
|
}
|
|
|
|
// GetFirstPeriod returns the value of FirstPeriod.
|
|
func (s *ProfileParallelPeriodConfirmation) GetFirstPeriod() ProfileExperiencePeriod {
|
|
return s.FirstPeriod
|
|
}
|
|
|
|
// GetSecondPeriod returns the value of SecondPeriod.
|
|
func (s *ProfileParallelPeriodConfirmation) GetSecondPeriod() ProfileExperiencePeriod {
|
|
return s.SecondPeriod
|
|
}
|
|
|
|
// SetFirstIndex sets the value of FirstIndex.
|
|
func (s *ProfileParallelPeriodConfirmation) SetFirstIndex(val int) {
|
|
s.FirstIndex = val
|
|
}
|
|
|
|
// SetSecondIndex sets the value of SecondIndex.
|
|
func (s *ProfileParallelPeriodConfirmation) SetSecondIndex(val int) {
|
|
s.SecondIndex = val
|
|
}
|
|
|
|
// SetFirstPeriod sets the value of FirstPeriod.
|
|
func (s *ProfileParallelPeriodConfirmation) SetFirstPeriod(val ProfileExperiencePeriod) {
|
|
s.FirstPeriod = val
|
|
}
|
|
|
|
// SetSecondPeriod sets the value of SecondPeriod.
|
|
func (s *ProfileParallelPeriodConfirmation) SetSecondPeriod(val ProfileExperiencePeriod) {
|
|
s.SecondPeriod = val
|
|
}
|
|
|
|
// Contact phone number of the candidate with its confirmation state and provenance. It is personal
|
|
// data, stored in the E.164 format of the contact disclosure. `value` and `source` are null exactly
|
|
// when `status` is `unknown`.
|
|
// Ref: #/components/schemas/ProfilePhoneClaim
|
|
type ProfilePhoneClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilContactPhoneNumber `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfilePhoneClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfilePhoneClaim) GetValue() NilContactPhoneNumber {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfilePhoneClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfilePhoneClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfilePhoneClaim) SetValue(val NilContactPhoneNumber) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfilePhoneClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the contact phone number in a request; see CandidateProfileUpdate for the rules of
|
|
// `status`. The value is personal data.
|
|
// Ref: #/components/schemas/ProfilePhoneInput
|
|
type ProfilePhoneInput struct {
|
|
Value ContactPhoneNumber `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfilePhoneInput) GetValue() ContactPhoneNumber {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfilePhoneInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfilePhoneInput) SetValue(val ContactPhoneNumber) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfilePhoneInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Whether the candidate is ready to relocate, with its confirmation state and provenance. `value` and
|
|
// `source` are null exactly when `status` is `unknown`; the server never assumes an answer.
|
|
// Ref: #/components/schemas/ProfileRelocationClaim
|
|
type ProfileRelocationClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilBool `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileRelocationClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileRelocationClaim) GetValue() NilBool {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileRelocationClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileRelocationClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileRelocationClaim) SetValue(val NilBool) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileRelocationClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about readiness to relocate in a request; see CandidateProfileUpdate for the rules of
|
|
// `status`.
|
|
// Ref: #/components/schemas/ProfileRelocationInput
|
|
type ProfileRelocationInput struct {
|
|
Value bool `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileRelocationInput) GetValue() bool {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileRelocationInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileRelocationInput) SetValue(val bool) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileRelocationInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// One role of the candidate: a specialization of the catalog with the grade that the candidate claims
|
|
// for it. `self_assessed_grade` is a claim, the same one that the questionnaire calls
|
|
// `self_assessed_grade` for its at most two chosen specializations: it influences nothing but the
|
|
// display and never becomes a confirmed grade or a category. The questionnaire value starts the
|
|
// assessment and the profile value is what the profile shows; the two are saved separately and the
|
|
// server never copies one into the other. A confirmed grade comes only from an assessment result and
|
|
// appears in `confirmed_categories` of the profile, never in a role; unknown fields such as
|
|
// `confirmed_grade` or `category` are rejected.
|
|
// Ref: #/components/schemas/ProfileRoleItem
|
|
type ProfileRoleItem struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
// Grade that the candidate claims in the specialization, or null when the candidate names none.
|
|
SelfAssessedGrade NilGradeCode `json:"self_assessed_grade"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
Source ProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *ProfileRoleItem) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetSelfAssessedGrade returns the value of SelfAssessedGrade.
|
|
func (s *ProfileRoleItem) GetSelfAssessedGrade() NilGradeCode {
|
|
return s.SelfAssessedGrade
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileRoleItem) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileRoleItem) GetSource() ProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *ProfileRoleItem) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetSelfAssessedGrade sets the value of SelfAssessedGrade.
|
|
func (s *ProfileRoleItem) SetSelfAssessedGrade(val NilGradeCode) {
|
|
s.SelfAssessedGrade = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileRoleItem) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileRoleItem) SetSource(val ProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about one role in a request; see CandidateProfileUpdate for the rules of `status`. The
|
|
// object has no confirmed grade and no category: unknown fields are rejected.
|
|
// Ref: #/components/schemas/ProfileRoleItemInput
|
|
type ProfileRoleItemInput struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
// Grade that the candidate claims, or null when the candidate names none.
|
|
SelfAssessedGrade NilGradeCode `json:"self_assessed_grade"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *ProfileRoleItemInput) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetSelfAssessedGrade returns the value of SelfAssessedGrade.
|
|
func (s *ProfileRoleItemInput) GetSelfAssessedGrade() NilGradeCode {
|
|
return s.SelfAssessedGrade
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileRoleItemInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *ProfileRoleItemInput) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetSelfAssessedGrade sets the value of SelfAssessedGrade.
|
|
func (s *ProfileRoleItemInput) SetSelfAssessedGrade(val NilGradeCode) {
|
|
s.SelfAssessedGrade = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileRoleItemInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// The lowest salary that the candidate accepts, in whole rubles with its base: the currency, the pay
|
|
// period, and the tax basis. It is private to the candidate: no organization reads it, and the
|
|
// invitation only shows a compatibility indicator that the server derives from it. It is personal
|
|
// data. The amount is a positive multiple of 1000.
|
|
// Ref: #/components/schemas/ProfileSalaryMinimum
|
|
type ProfileSalaryMinimum struct {
|
|
Amount RubAmount `json:"amount"`
|
|
Currency CurrencyCode `json:"currency"`
|
|
Period SalaryPeriod `json:"period"`
|
|
TaxBasis SalaryTaxBasis `json:"tax_basis"`
|
|
}
|
|
|
|
// GetAmount returns the value of Amount.
|
|
func (s *ProfileSalaryMinimum) GetAmount() RubAmount {
|
|
return s.Amount
|
|
}
|
|
|
|
// GetCurrency returns the value of Currency.
|
|
func (s *ProfileSalaryMinimum) GetCurrency() CurrencyCode {
|
|
return s.Currency
|
|
}
|
|
|
|
// GetPeriod returns the value of Period.
|
|
func (s *ProfileSalaryMinimum) GetPeriod() SalaryPeriod {
|
|
return s.Period
|
|
}
|
|
|
|
// GetTaxBasis returns the value of TaxBasis.
|
|
func (s *ProfileSalaryMinimum) GetTaxBasis() SalaryTaxBasis {
|
|
return s.TaxBasis
|
|
}
|
|
|
|
// SetAmount sets the value of Amount.
|
|
func (s *ProfileSalaryMinimum) SetAmount(val RubAmount) {
|
|
s.Amount = val
|
|
}
|
|
|
|
// SetCurrency sets the value of Currency.
|
|
func (s *ProfileSalaryMinimum) SetCurrency(val CurrencyCode) {
|
|
s.Currency = val
|
|
}
|
|
|
|
// SetPeriod sets the value of Period.
|
|
func (s *ProfileSalaryMinimum) SetPeriod(val SalaryPeriod) {
|
|
s.Period = val
|
|
}
|
|
|
|
// SetTaxBasis sets the value of TaxBasis.
|
|
func (s *ProfileSalaryMinimum) SetTaxBasis(val SalaryTaxBasis) {
|
|
s.TaxBasis = val
|
|
}
|
|
|
|
// Lowest acceptable salary with its confirmation state and provenance. It is personal data that no
|
|
// organization reads. `value` and `source` are null exactly when `status` is `unknown`; the server
|
|
// never substitutes zero or a market estimate.
|
|
// Ref: #/components/schemas/ProfileSalaryMinimumClaim
|
|
type ProfileSalaryMinimumClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilProfileSalaryMinimum `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileSalaryMinimumClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileSalaryMinimumClaim) GetValue() NilProfileSalaryMinimum {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileSalaryMinimumClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileSalaryMinimumClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileSalaryMinimumClaim) SetValue(val NilProfileSalaryMinimum) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileSalaryMinimumClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the lowest salary in a request; see CandidateProfileUpdate for the rules of `status`.
|
|
// The value is personal data.
|
|
// Ref: #/components/schemas/ProfileSalaryMinimumInput
|
|
type ProfileSalaryMinimumInput struct {
|
|
Value ProfileSalaryMinimum `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileSalaryMinimumInput) GetValue() ProfileSalaryMinimum {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileSalaryMinimumInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileSalaryMinimumInput) SetValue(val ProfileSalaryMinimum) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileSalaryMinimumInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
type ProfileSoftSkill string
|
|
|
|
// One soft skill of the candidate with its confirmation state and provenance. It is a claim; no
|
|
// assessment checks it.
|
|
// Ref: #/components/schemas/ProfileSoftSkillItem
|
|
type ProfileSoftSkillItem struct {
|
|
Skill ProfileSoftSkill `json:"skill"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
Source ProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetSkill returns the value of Skill.
|
|
func (s *ProfileSoftSkillItem) GetSkill() ProfileSoftSkill {
|
|
return s.Skill
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileSoftSkillItem) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileSoftSkillItem) GetSource() ProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetSkill sets the value of Skill.
|
|
func (s *ProfileSoftSkillItem) SetSkill(val ProfileSoftSkill) {
|
|
s.Skill = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileSoftSkillItem) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileSoftSkillItem) SetSource(val ProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about one soft skill in a request; see CandidateProfileUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/ProfileSoftSkillItemInput
|
|
type ProfileSoftSkillItemInput struct {
|
|
Skill ProfileSoftSkill `json:"skill"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetSkill returns the value of Skill.
|
|
func (s *ProfileSoftSkillItemInput) GetSkill() ProfileSoftSkill {
|
|
return s.Skill
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileSoftSkillItemInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetSkill sets the value of Skill.
|
|
func (s *ProfileSoftSkillItemInput) SetSkill(val ProfileSoftSkill) {
|
|
s.Skill = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileSoftSkillItemInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// One technology tag of the candidate's stack with its confirmation state and provenance. The profile
|
|
// stack is one list for the whole profile; the questionnaire holds the tags of each chosen
|
|
// specialization with the same `StackTag` meaning, and the two lists are independent: the server never
|
|
// copies one into the other. A tag is a descriptive attribute and never forms a category.
|
|
// Ref: #/components/schemas/ProfileStackItem
|
|
type ProfileStackItem struct {
|
|
Tag StackTag `json:"tag"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
Source ProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetTag returns the value of Tag.
|
|
func (s *ProfileStackItem) GetTag() StackTag {
|
|
return s.Tag
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileStackItem) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileStackItem) GetSource() ProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetTag sets the value of Tag.
|
|
func (s *ProfileStackItem) SetTag(val StackTag) {
|
|
s.Tag = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileStackItem) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileStackItem) SetSource(val ProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about one stack tag in a request; see CandidateProfileUpdate for the rules of `status`.
|
|
// Ref: #/components/schemas/ProfileStackItemInput
|
|
type ProfileStackItemInput struct {
|
|
Tag StackTag `json:"tag"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetTag returns the value of Tag.
|
|
func (s *ProfileStackItemInput) GetTag() StackTag {
|
|
return s.Tag
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileStackItemInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetTag sets the value of Tag.
|
|
func (s *ProfileStackItemInput) SetTag(val StackTag) {
|
|
s.Tag = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileStackItemInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Telegram username of the candidate with its confirmation state and provenance. It is personal data,
|
|
// stored with the leading @ of the contact disclosure. `value` and `source` are null exactly when
|
|
// `status` is `unknown`.
|
|
// Ref: #/components/schemas/ProfileTelegramClaim
|
|
type ProfileTelegramClaim struct {
|
|
Status ProfileClaimStatus `json:"status"`
|
|
Value NilContactTelegramUsername `json:"value"`
|
|
Source NilProfileClaimSource `json:"source"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileTelegramClaim) GetStatus() ProfileClaimStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileTelegramClaim) GetValue() NilContactTelegramUsername {
|
|
return s.Value
|
|
}
|
|
|
|
// GetSource returns the value of Source.
|
|
func (s *ProfileTelegramClaim) GetSource() NilProfileClaimSource {
|
|
return s.Source
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileTelegramClaim) SetStatus(val ProfileClaimStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileTelegramClaim) SetValue(val NilContactTelegramUsername) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetSource sets the value of Source.
|
|
func (s *ProfileTelegramClaim) SetSource(val NilProfileClaimSource) {
|
|
s.Source = val
|
|
}
|
|
|
|
// Decision about the Telegram username in a request; see CandidateProfileUpdate for the rules of
|
|
// `status`. The value is personal data.
|
|
// Ref: #/components/schemas/ProfileTelegramInput
|
|
type ProfileTelegramInput struct {
|
|
Value ContactTelegramUsername `json:"value"`
|
|
Status ProfileItemStatus `json:"status"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *ProfileTelegramInput) GetValue() ContactTelegramUsername {
|
|
return s.Value
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *ProfileTelegramInput) GetStatus() ProfileItemStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *ProfileTelegramInput) SetValue(val ContactTelegramUsername) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *ProfileTelegramInput) SetStatus(val ProfileItemStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// Conditions that the candidate wants: the place, readiness to relocate, and the lowest salary.
|
|
// Acceptable work formats are not repeated here; they are the `work_formats` of the questionnaire
|
|
// `WorkContext`, the only place that holds them. These are the candidate's wishes, never the terms of
|
|
// an invitation, which an organization offers and which the invitation contract describes.
|
|
// Ref: #/components/schemas/ProfileTerms
|
|
type ProfileTerms struct {
|
|
Location ProfileLocationClaim `json:"location"`
|
|
Relocation ProfileRelocationClaim `json:"relocation"`
|
|
SalaryMinimum ProfileSalaryMinimumClaim `json:"salary_minimum"`
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *ProfileTerms) GetLocation() ProfileLocationClaim {
|
|
return s.Location
|
|
}
|
|
|
|
// GetRelocation returns the value of Relocation.
|
|
func (s *ProfileTerms) GetRelocation() ProfileRelocationClaim {
|
|
return s.Relocation
|
|
}
|
|
|
|
// GetSalaryMinimum returns the value of SalaryMinimum.
|
|
func (s *ProfileTerms) GetSalaryMinimum() ProfileSalaryMinimumClaim {
|
|
return s.SalaryMinimum
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *ProfileTerms) SetLocation(val ProfileLocationClaim) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetRelocation sets the value of Relocation.
|
|
func (s *ProfileTerms) SetRelocation(val ProfileRelocationClaim) {
|
|
s.Relocation = val
|
|
}
|
|
|
|
// SetSalaryMinimum sets the value of SalaryMinimum.
|
|
func (s *ProfileTerms) SetSalaryMinimum(val ProfileSalaryMinimumClaim) {
|
|
s.SalaryMinimum = val
|
|
}
|
|
|
|
// Decisions about the desired terms in a request. A field sent as null is unknown: it is removed if it
|
|
// was set.
|
|
// Ref: #/components/schemas/ProfileTermsInput
|
|
type ProfileTermsInput struct {
|
|
Location NilProfileLocationInput `json:"location"`
|
|
Relocation NilProfileRelocationInput `json:"relocation"`
|
|
SalaryMinimum NilProfileSalaryMinimumInput `json:"salary_minimum"`
|
|
}
|
|
|
|
// GetLocation returns the value of Location.
|
|
func (s *ProfileTermsInput) GetLocation() NilProfileLocationInput {
|
|
return s.Location
|
|
}
|
|
|
|
// GetRelocation returns the value of Relocation.
|
|
func (s *ProfileTermsInput) GetRelocation() NilProfileRelocationInput {
|
|
return s.Relocation
|
|
}
|
|
|
|
// GetSalaryMinimum returns the value of SalaryMinimum.
|
|
func (s *ProfileTermsInput) GetSalaryMinimum() NilProfileSalaryMinimumInput {
|
|
return s.SalaryMinimum
|
|
}
|
|
|
|
// SetLocation sets the value of Location.
|
|
func (s *ProfileTermsInput) SetLocation(val NilProfileLocationInput) {
|
|
s.Location = val
|
|
}
|
|
|
|
// SetRelocation sets the value of Relocation.
|
|
func (s *ProfileTermsInput) SetRelocation(val NilProfileRelocationInput) {
|
|
s.Relocation = val
|
|
}
|
|
|
|
// SetSalaryMinimum sets the value of SalaryMinimum.
|
|
func (s *ProfileTermsInput) SetSalaryMinimum(val NilProfileSalaryMinimumInput) {
|
|
s.SalaryMinimum = val
|
|
}
|
|
|
|
type ProfileVersion int64
|
|
|
|
type ProfileYearMonth string
|
|
|
|
// Publication setting of the candidate card. It is separate from the consent: the C2 consent in the
|
|
// ledger proves that the candidate accepted the publication text, and this setting records whether and
|
|
// which fields are published. `state` is `published` only while the referenced C2 record is unrevoked,
|
|
// whatever the stored setting says, so a revocation closes the card at once. The state, the fields,
|
|
// and the times belong to the history that the C2 consent record does not carry.
|
|
// Ref: #/components/schemas/Publication
|
|
type Publication struct {
|
|
State PublicationState `json:"state"`
|
|
// Why the profile is closed, or null while it is published.
|
|
ClosedReason NilPublicationClosedReason `json:"closed_reason"`
|
|
// Card fields that organizations may read. Empty exactly when `state` is `closed`.
|
|
Fields CardFieldSet `json:"fields"`
|
|
// Identifier of the C2 record of the consent ledger that backs the current or the last publication,
|
|
// the `id` of a `ConsentRecord` of this account, or null when the profile was never published.
|
|
ConsentID NilUUID `json:"consent_id"`
|
|
// Moment of the latest change that published or republished the card, or null while the profile was
|
|
// never published. It stays after a closing, as the time of the last publication.
|
|
PublishedAt NilTimestamp `json:"published_at"`
|
|
Version PublicationVersion `json:"version"`
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *Publication) GetState() PublicationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetClosedReason returns the value of ClosedReason.
|
|
func (s *Publication) GetClosedReason() NilPublicationClosedReason {
|
|
return s.ClosedReason
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *Publication) GetFields() CardFieldSet {
|
|
return s.Fields
|
|
}
|
|
|
|
// GetConsentID returns the value of ConsentID.
|
|
func (s *Publication) GetConsentID() NilUUID {
|
|
return s.ConsentID
|
|
}
|
|
|
|
// GetPublishedAt returns the value of PublishedAt.
|
|
func (s *Publication) GetPublishedAt() NilTimestamp {
|
|
return s.PublishedAt
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *Publication) GetVersion() PublicationVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *Publication) SetState(val PublicationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetClosedReason sets the value of ClosedReason.
|
|
func (s *Publication) SetClosedReason(val NilPublicationClosedReason) {
|
|
s.ClosedReason = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *Publication) SetFields(val CardFieldSet) {
|
|
s.Fields = val
|
|
}
|
|
|
|
// SetConsentID sets the value of ConsentID.
|
|
func (s *Publication) SetConsentID(val NilUUID) {
|
|
s.ConsentID = val
|
|
}
|
|
|
|
// SetPublishedAt sets the value of PublishedAt.
|
|
func (s *Publication) SetPublishedAt(val NilTimestamp) {
|
|
s.PublishedAt = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *Publication) SetVersion(val PublicationVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// Why a closed profile is closed, shown only to the candidate.
|
|
//
|
|
// - never_published: the candidate has never published the profile.
|
|
// - closed_by_candidate: the candidate closed the publication.
|
|
// - consent_revoked: the C2 consent that backed the publication was revoked. A later C2 grant never
|
|
// reopens the publication; the candidate publishes again explicitly and the new publication refers
|
|
// to the new consent record.
|
|
//
|
|
// Ref: #/components/schemas/PublicationClosedReason
|
|
type PublicationClosedReason string
|
|
|
|
const (
|
|
PublicationClosedReasonNeverPublished PublicationClosedReason = "never_published"
|
|
PublicationClosedReasonClosedByCandidate PublicationClosedReason = "closed_by_candidate"
|
|
PublicationClosedReasonConsentRevoked PublicationClosedReason = "consent_revoked"
|
|
)
|
|
|
|
// AllValues returns all PublicationClosedReason values.
|
|
func (PublicationClosedReason) AllValues() []PublicationClosedReason {
|
|
return []PublicationClosedReason{
|
|
PublicationClosedReasonNeverPublished,
|
|
PublicationClosedReasonClosedByCandidate,
|
|
PublicationClosedReasonConsentRevoked,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PublicationClosedReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PublicationClosedReasonNeverPublished:
|
|
return []byte(s), nil
|
|
case PublicationClosedReasonClosedByCandidate:
|
|
return []byte(s), nil
|
|
case PublicationClosedReasonConsentRevoked:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PublicationClosedReason) UnmarshalText(data []byte) error {
|
|
switch PublicationClosedReason(data) {
|
|
case PublicationClosedReasonNeverPublished:
|
|
*s = PublicationClosedReasonNeverPublished
|
|
return nil
|
|
case PublicationClosedReasonClosedByCandidate:
|
|
*s = PublicationClosedReasonClosedByCandidate
|
|
return nil
|
|
case PublicationClosedReasonConsentRevoked:
|
|
*s = PublicationClosedReasonConsentRevoked
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// PublicationHeaders wraps Publication with response headers.
|
|
type PublicationHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response Publication
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *PublicationHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *PublicationHeaders) GetResponse() Publication {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *PublicationHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *PublicationHeaders) SetResponse(val Publication) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*PublicationHeaders) setMyPublicationRes() {}
|
|
|
|
// Whether the candidate card can be read by organizations at all. It is computed from the stored
|
|
// publication and the consent ledger: a profile is closed unless the candidate published it and the C2
|
|
// consent that backs the publication is still unrevoked.
|
|
//
|
|
// - closed: no organization reads the card. This is the state of every new profile and of a profile
|
|
// whose publication was closed or whose C2 was revoked.
|
|
// - published: organizations may read exactly the fields in `fields`, except for the organizations
|
|
// the candidate hid.
|
|
//
|
|
// Ref: #/components/schemas/PublicationState
|
|
type PublicationState string
|
|
|
|
const (
|
|
PublicationStateClosed PublicationState = "closed"
|
|
PublicationStatePublished PublicationState = "published"
|
|
)
|
|
|
|
// AllValues returns all PublicationState values.
|
|
func (PublicationState) AllValues() []PublicationState {
|
|
return []PublicationState{
|
|
PublicationStateClosed,
|
|
PublicationStatePublished,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s PublicationState) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case PublicationStateClosed:
|
|
return []byte(s), nil
|
|
case PublicationStatePublished:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *PublicationState) UnmarshalText(data []byte) error {
|
|
switch PublicationState(data) {
|
|
case PublicationStateClosed:
|
|
*s = PublicationStateClosed
|
|
return nil
|
|
case PublicationStatePublished:
|
|
*s = PublicationStatePublished
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// The complete new publication setting. `published` needs a non-empty set of fields and an active C2
|
|
// consent of the account; `closed` needs an empty set and never fails for a missing consent. The body
|
|
// names no consent: the server binds the publication to the account's current unrevoked C2 record, and
|
|
// a client can neither supply nor forge one.
|
|
// Ref: #/components/schemas/PublicationUpdate
|
|
type PublicationUpdate struct {
|
|
ExpectedVersion PublicationVersion `json:"expected_version"`
|
|
State PublicationState `json:"state"`
|
|
Fields CardFieldSet `json:"fields"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *PublicationUpdate) GetExpectedVersion() PublicationVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetState returns the value of State.
|
|
func (s *PublicationUpdate) GetState() PublicationState {
|
|
return s.State
|
|
}
|
|
|
|
// GetFields returns the value of Fields.
|
|
func (s *PublicationUpdate) GetFields() CardFieldSet {
|
|
return s.Fields
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *PublicationUpdate) SetExpectedVersion(val PublicationVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetState sets the value of State.
|
|
func (s *PublicationUpdate) SetState(val PublicationState) {
|
|
s.State = val
|
|
}
|
|
|
|
// SetFields sets the value of Fields.
|
|
func (s *PublicationUpdate) SetFields(val CardFieldSet) {
|
|
s.Fields = val
|
|
}
|
|
|
|
type PublicationVersion int64
|
|
|
|
// One specialization chosen by the candidate with the candidate's self-assessment.
|
|
// `self_assessed_grade` is a claim: it influences where the assessment starts and which grade the
|
|
// assessment step offers first, but it adds no points and never becomes a confirmed grade. A confirmed
|
|
// grade, and with it a category, comes only from an assessment result and is never part of the
|
|
// questionnaire; unknown fields such as `confirmed_grade` or `category` are rejected. Task languages
|
|
// and the stack are attributes of the chosen specialization, not categories. The candidate profile
|
|
// states the same kind of claim in the `roles` of `CandidateProfile`
|
|
// (`ProfileRoleItem.self_assessed_grade`): the questionnaire value starts the assessment and the
|
|
// profile value is what the profile shows, the two are saved separately, and neither is ever a
|
|
// confirmed grade.
|
|
// Ref: #/components/schemas/QuestionnaireSpecialization
|
|
type QuestionnaireSpecialization struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
SelfAssessedGrade GradeCode `json:"self_assessed_grade"`
|
|
// Task languages in which the candidate wants to solve assessment tasks of this specialization. Each
|
|
// value must be one of `test_availability.task_languages` of the specialization in the current
|
|
// catalog; any other value answers 400 validation_failed with a pointer to it. Empty when the bank
|
|
// offers no choice of language.
|
|
TaskLanguages []TaskLanguage `json:"task_languages"`
|
|
// Technology tags of the candidate in this specialization.
|
|
Stack []StackTag `json:"stack"`
|
|
// Stated experience, or null when the candidate did not state it.
|
|
Experience NilCandidateExperience `json:"experience"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *QuestionnaireSpecialization) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetSelfAssessedGrade returns the value of SelfAssessedGrade.
|
|
func (s *QuestionnaireSpecialization) GetSelfAssessedGrade() GradeCode {
|
|
return s.SelfAssessedGrade
|
|
}
|
|
|
|
// GetTaskLanguages returns the value of TaskLanguages.
|
|
func (s *QuestionnaireSpecialization) GetTaskLanguages() []TaskLanguage {
|
|
return s.TaskLanguages
|
|
}
|
|
|
|
// GetStack returns the value of Stack.
|
|
func (s *QuestionnaireSpecialization) GetStack() []StackTag {
|
|
return s.Stack
|
|
}
|
|
|
|
// GetExperience returns the value of Experience.
|
|
func (s *QuestionnaireSpecialization) GetExperience() NilCandidateExperience {
|
|
return s.Experience
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *QuestionnaireSpecialization) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetSelfAssessedGrade sets the value of SelfAssessedGrade.
|
|
func (s *QuestionnaireSpecialization) SetSelfAssessedGrade(val GradeCode) {
|
|
s.SelfAssessedGrade = val
|
|
}
|
|
|
|
// SetTaskLanguages sets the value of TaskLanguages.
|
|
func (s *QuestionnaireSpecialization) SetTaskLanguages(val []TaskLanguage) {
|
|
s.TaskLanguages = val
|
|
}
|
|
|
|
// SetStack sets the value of Stack.
|
|
func (s *QuestionnaireSpecialization) SetStack(val []StackTag) {
|
|
s.Stack = val
|
|
}
|
|
|
|
// SetExperience sets the value of Experience.
|
|
func (s *QuestionnaireSpecialization) SetExperience(val NilCandidateExperience) {
|
|
s.Experience = val
|
|
}
|
|
|
|
type QuestionnaireVersion int64
|
|
|
|
type RaiseOrganizationInvitationSalaryBadRequest Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryBadRequest) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryConflict Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryConflict) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryForbidden Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryForbidden) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryNotFound Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryNotFound) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryPreconditionFailed Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryPreconditionFailed) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryUnauthorized Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryUnauthorized) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RaiseOrganizationInvitationSalaryUnprocessableEntity Problem
|
|
|
|
func (*RaiseOrganizationInvitationSalaryUnprocessableEntity) raiseOrganizationInvitationSalaryRes() {}
|
|
|
|
type RegisterAccountBadRequest Problem
|
|
|
|
func (*RegisterAccountBadRequest) registerAccountRes() {}
|
|
|
|
type RegisterAccountConflict Problem
|
|
|
|
func (*RegisterAccountConflict) registerAccountRes() {}
|
|
|
|
type RegisterAccountForbidden Problem
|
|
|
|
func (*RegisterAccountForbidden) registerAccountRes() {}
|
|
|
|
type RegisterAccountUnprocessableEntity Problem
|
|
|
|
func (*RegisterAccountUnprocessableEntity) registerAccountRes() {}
|
|
|
|
// New account with its scenario and consent C1.
|
|
// Ref: #/components/schemas/RegistrationRequest
|
|
type RegistrationRequest struct {
|
|
Email EmailAddress `json:"email"`
|
|
Password NewPassword `json:"password"`
|
|
Scenario AccountScenario `json:"scenario"`
|
|
ConsentC1 PersonalDataConsentAcceptance `json:"consent_c1"`
|
|
}
|
|
|
|
// GetEmail returns the value of Email.
|
|
func (s *RegistrationRequest) GetEmail() EmailAddress {
|
|
return s.Email
|
|
}
|
|
|
|
// GetPassword returns the value of Password.
|
|
func (s *RegistrationRequest) GetPassword() NewPassword {
|
|
return s.Password
|
|
}
|
|
|
|
// GetScenario returns the value of Scenario.
|
|
func (s *RegistrationRequest) GetScenario() AccountScenario {
|
|
return s.Scenario
|
|
}
|
|
|
|
// GetConsentC1 returns the value of ConsentC1.
|
|
func (s *RegistrationRequest) GetConsentC1() PersonalDataConsentAcceptance {
|
|
return s.ConsentC1
|
|
}
|
|
|
|
// SetEmail sets the value of Email.
|
|
func (s *RegistrationRequest) SetEmail(val EmailAddress) {
|
|
s.Email = val
|
|
}
|
|
|
|
// SetPassword sets the value of Password.
|
|
func (s *RegistrationRequest) SetPassword(val NewPassword) {
|
|
s.Password = val
|
|
}
|
|
|
|
// SetScenario sets the value of Scenario.
|
|
func (s *RegistrationRequest) SetScenario(val AccountScenario) {
|
|
s.Scenario = val
|
|
}
|
|
|
|
// SetConsentC1 sets the value of ConsentC1.
|
|
func (s *RegistrationRequest) SetConsentC1(val PersonalDataConsentAcceptance) {
|
|
s.ConsentC1 = val
|
|
}
|
|
|
|
type RequestMyAccountDeletionForbidden Problem
|
|
|
|
func (*RequestMyAccountDeletionForbidden) requestMyAccountDeletionRes() {}
|
|
|
|
type RequestMyAccountDeletionUnauthorized Problem
|
|
|
|
func (*RequestMyAccountDeletionUnauthorized) requestMyAccountDeletionRes() {}
|
|
|
|
type ResendEmailVerificationBadRequest Problem
|
|
|
|
func (*ResendEmailVerificationBadRequest) resendEmailVerificationRes() {}
|
|
|
|
type ResendEmailVerificationForbidden Problem
|
|
|
|
func (*ResendEmailVerificationForbidden) resendEmailVerificationRes() {}
|
|
|
|
type RevokeMyConsentForbidden Problem
|
|
|
|
func (*RevokeMyConsentForbidden) revokeMyConsentRes() {}
|
|
|
|
// RevokeMyConsentNoContent is response for RevokeMyConsent operation.
|
|
type RevokeMyConsentNoContent struct{}
|
|
|
|
func (*RevokeMyConsentNoContent) revokeMyConsentRes() {}
|
|
|
|
type RevokeMyConsentUnauthorized Problem
|
|
|
|
func (*RevokeMyConsentUnauthorized) revokeMyConsentRes() {}
|
|
|
|
type RevokeMyOrganizationContactConsentForbidden Problem
|
|
|
|
func (*RevokeMyOrganizationContactConsentForbidden) revokeMyOrganizationContactConsentRes() {}
|
|
|
|
// RevokeMyOrganizationContactConsentNoContent is response for RevokeMyOrganizationContactConsent operation.
|
|
type RevokeMyOrganizationContactConsentNoContent struct{}
|
|
|
|
func (*RevokeMyOrganizationContactConsentNoContent) revokeMyOrganizationContactConsentRes() {}
|
|
|
|
type RevokeMyOrganizationContactConsentUnauthorized Problem
|
|
|
|
func (*RevokeMyOrganizationContactConsentUnauthorized) revokeMyOrganizationContactConsentRes() {}
|
|
|
|
type RubAmount int64
|
|
|
|
// Pay period of a salary amount. The MVP uses only `month`; adding a value is a contract change.
|
|
// Ref: #/components/schemas/SalaryPeriod
|
|
type SalaryPeriod string
|
|
|
|
const (
|
|
SalaryPeriodMonth SalaryPeriod = "month"
|
|
)
|
|
|
|
// AllValues returns all SalaryPeriod values.
|
|
func (SalaryPeriod) AllValues() []SalaryPeriod {
|
|
return []SalaryPeriod{
|
|
SalaryPeriodMonth,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SalaryPeriod) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SalaryPeriodMonth:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SalaryPeriod) UnmarshalText(data []byte) error {
|
|
switch SalaryPeriod(data) {
|
|
case SalaryPeriodMonth:
|
|
*s = SalaryPeriodMonth
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Salary range `[A; B]` in whole rubles with its base: the currency, the pay period, and the tax basis
|
|
// (PRD FR13). The schema requires every field, bounds that are positive multiples of 1000, and the
|
|
// known currency, period, and basis. The server checks the cross-field rules in integer arithmetic:
|
|
// `salary_from < salary_to`, and a width `(B - A) / ((A + B) / 2)` from 10% to 40% inclusive, that is
|
|
// `20 * (B - A) >= A + B` and `5 * (B - A) <= A + B`. A violation answers 400 validation_failed with
|
|
// the pointer of `salary_to` in the request, for example `/salary/value/salary_to`. For example,
|
|
// `[95000; 105000]` has a width of exactly 10% and `[80000; 120000]` exactly 40%; both are accepted.
|
|
// The rules are the same for a need and an invitation.
|
|
// Ref: #/components/schemas/SalaryRange
|
|
type SalaryRange struct {
|
|
SalaryFrom RubAmount `json:"salary_from"`
|
|
SalaryTo RubAmount `json:"salary_to"`
|
|
Currency CurrencyCode `json:"currency"`
|
|
Period SalaryPeriod `json:"period"`
|
|
TaxBasis SalaryTaxBasis `json:"tax_basis"`
|
|
}
|
|
|
|
// GetSalaryFrom returns the value of SalaryFrom.
|
|
func (s *SalaryRange) GetSalaryFrom() RubAmount {
|
|
return s.SalaryFrom
|
|
}
|
|
|
|
// GetSalaryTo returns the value of SalaryTo.
|
|
func (s *SalaryRange) GetSalaryTo() RubAmount {
|
|
return s.SalaryTo
|
|
}
|
|
|
|
// GetCurrency returns the value of Currency.
|
|
func (s *SalaryRange) GetCurrency() CurrencyCode {
|
|
return s.Currency
|
|
}
|
|
|
|
// GetPeriod returns the value of Period.
|
|
func (s *SalaryRange) GetPeriod() SalaryPeriod {
|
|
return s.Period
|
|
}
|
|
|
|
// GetTaxBasis returns the value of TaxBasis.
|
|
func (s *SalaryRange) GetTaxBasis() SalaryTaxBasis {
|
|
return s.TaxBasis
|
|
}
|
|
|
|
// SetSalaryFrom sets the value of SalaryFrom.
|
|
func (s *SalaryRange) SetSalaryFrom(val RubAmount) {
|
|
s.SalaryFrom = val
|
|
}
|
|
|
|
// SetSalaryTo sets the value of SalaryTo.
|
|
func (s *SalaryRange) SetSalaryTo(val RubAmount) {
|
|
s.SalaryTo = val
|
|
}
|
|
|
|
// SetCurrency sets the value of Currency.
|
|
func (s *SalaryRange) SetCurrency(val CurrencyCode) {
|
|
s.Currency = val
|
|
}
|
|
|
|
// SetPeriod sets the value of Period.
|
|
func (s *SalaryRange) SetPeriod(val SalaryPeriod) {
|
|
s.Period = val
|
|
}
|
|
|
|
// SetTaxBasis sets the value of TaxBasis.
|
|
func (s *SalaryRange) SetTaxBasis(val SalaryTaxBasis) {
|
|
s.TaxBasis = val
|
|
}
|
|
|
|
// Tax basis of a salary amount: `net`, the amount paid out after personal income tax, or `gross`, the
|
|
// amount before it. The basis is always explicit; amounts in different bases are never compared
|
|
// directly.
|
|
// Ref: #/components/schemas/SalaryTaxBasis
|
|
type SalaryTaxBasis string
|
|
|
|
const (
|
|
SalaryTaxBasisNet SalaryTaxBasis = "net"
|
|
SalaryTaxBasisGross SalaryTaxBasis = "gross"
|
|
)
|
|
|
|
// AllValues returns all SalaryTaxBasis values.
|
|
func (SalaryTaxBasis) AllValues() []SalaryTaxBasis {
|
|
return []SalaryTaxBasis{
|
|
SalaryTaxBasisNet,
|
|
SalaryTaxBasisGross,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SalaryTaxBasis) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SalaryTaxBasisNet:
|
|
return []byte(s), nil
|
|
case SalaryTaxBasisGross:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SalaryTaxBasis) UnmarshalText(data []byte) error {
|
|
switch SalaryTaxBasis(data) {
|
|
case SalaryTaxBasisNet:
|
|
*s = SalaryTaxBasisNet
|
|
return nil
|
|
case SalaryTaxBasisGross:
|
|
*s = SalaryTaxBasisGross
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type SaveMyProfileBadRequest Problem
|
|
|
|
func (*SaveMyProfileBadRequest) saveMyProfileRes() {}
|
|
|
|
type SaveMyProfileForbidden Problem
|
|
|
|
func (*SaveMyProfileForbidden) saveMyProfileRes() {}
|
|
|
|
type SaveMyProfilePreconditionFailed Problem
|
|
|
|
func (*SaveMyProfilePreconditionFailed) saveMyProfileRes() {}
|
|
|
|
type SaveMyProfileUnauthorized Problem
|
|
|
|
func (*SaveMyProfileUnauthorized) saveMyProfileRes() {}
|
|
|
|
type SaveMyQuestionnaireBadRequest Problem
|
|
|
|
func (*SaveMyQuestionnaireBadRequest) saveMyQuestionnaireRes() {}
|
|
|
|
type SaveMyQuestionnaireForbidden Problem
|
|
|
|
func (*SaveMyQuestionnaireForbidden) saveMyQuestionnaireRes() {}
|
|
|
|
type SaveMyQuestionnairePreconditionFailed Problem
|
|
|
|
func (*SaveMyQuestionnairePreconditionFailed) saveMyQuestionnaireRes() {}
|
|
|
|
type SaveMyQuestionnaireUnauthorized Problem
|
|
|
|
func (*SaveMyQuestionnaireUnauthorized) saveMyQuestionnaireRes() {}
|
|
|
|
// Search status of the candidate as it holds now. The status `looking` stores the moment of its
|
|
// confirmation and lapses when the confirmation interval of the product policy passes without a new
|
|
// confirmation. A lapse only ever narrows: the status falls to `not_looking`, which is the non-public
|
|
// state, and a lapse never changes the publication or the hidden organizations. It needs no stored
|
|
// change, so no process can make a candidate more visible by expiry, and a lapsed candidate confirms
|
|
// again explicitly.
|
|
// Ref: #/components/schemas/SearchStatus
|
|
type SearchStatus struct {
|
|
// The status that holds now: `looking` only while the confirmation has not lapsed.
|
|
Value SearchStatusValue `json:"value"`
|
|
// True when the candidate set `looking`, did not confirm it again, and the interval ended, so `value`
|
|
// is `not_looking`. False otherwise, including a status the candidate cleared.
|
|
Lapsed bool `json:"lapsed"`
|
|
// Moment of the latest confirmation of `looking`, or null when the candidate never set it or cleared
|
|
// it.
|
|
ConfirmedAt NilTimestamp `json:"confirmed_at"`
|
|
// Moment at which the confirmed status lapses, fixed when it was confirmed from the `search_status`
|
|
// section of the product policy version in force then, or null when `confirmed_at` is null. A later
|
|
// policy change does not move it; it stays in the past for a lapsed status.
|
|
LapsesAt NilTimestamp `json:"lapses_at"`
|
|
Version SearchStatusVersion `json:"version"`
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *SearchStatus) GetValue() SearchStatusValue {
|
|
return s.Value
|
|
}
|
|
|
|
// GetLapsed returns the value of Lapsed.
|
|
func (s *SearchStatus) GetLapsed() bool {
|
|
return s.Lapsed
|
|
}
|
|
|
|
// GetConfirmedAt returns the value of ConfirmedAt.
|
|
func (s *SearchStatus) GetConfirmedAt() NilTimestamp {
|
|
return s.ConfirmedAt
|
|
}
|
|
|
|
// GetLapsesAt returns the value of LapsesAt.
|
|
func (s *SearchStatus) GetLapsesAt() NilTimestamp {
|
|
return s.LapsesAt
|
|
}
|
|
|
|
// GetVersion returns the value of Version.
|
|
func (s *SearchStatus) GetVersion() SearchStatusVersion {
|
|
return s.Version
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *SearchStatus) SetValue(val SearchStatusValue) {
|
|
s.Value = val
|
|
}
|
|
|
|
// SetLapsed sets the value of Lapsed.
|
|
func (s *SearchStatus) SetLapsed(val bool) {
|
|
s.Lapsed = val
|
|
}
|
|
|
|
// SetConfirmedAt sets the value of ConfirmedAt.
|
|
func (s *SearchStatus) SetConfirmedAt(val NilTimestamp) {
|
|
s.ConfirmedAt = val
|
|
}
|
|
|
|
// SetLapsesAt sets the value of LapsesAt.
|
|
func (s *SearchStatus) SetLapsesAt(val NilTimestamp) {
|
|
s.LapsesAt = val
|
|
}
|
|
|
|
// SetVersion sets the value of Version.
|
|
func (s *SearchStatus) SetVersion(val SearchStatusVersion) {
|
|
s.Version = val
|
|
}
|
|
|
|
// SearchStatusHeaders wraps SearchStatus with response headers.
|
|
type SearchStatusHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response SearchStatus
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *SearchStatusHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *SearchStatusHeaders) GetResponse() SearchStatus {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *SearchStatusHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *SearchStatusHeaders) SetResponse(val SearchStatus) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*SearchStatusHeaders) setMySearchStatusRes() {}
|
|
|
|
// The complete new search status. `looking` is also the confirmation of a status that still holds or
|
|
// has lapsed: it sets the confirmation time to now. The body carries no time, interval, or policy
|
|
// version; the server takes them from the effective product policy.
|
|
// Ref: #/components/schemas/SearchStatusUpdate
|
|
type SearchStatusUpdate struct {
|
|
ExpectedVersion SearchStatusVersion `json:"expected_version"`
|
|
Value SearchStatusValue `json:"value"`
|
|
}
|
|
|
|
// GetExpectedVersion returns the value of ExpectedVersion.
|
|
func (s *SearchStatusUpdate) GetExpectedVersion() SearchStatusVersion {
|
|
return s.ExpectedVersion
|
|
}
|
|
|
|
// GetValue returns the value of Value.
|
|
func (s *SearchStatusUpdate) GetValue() SearchStatusValue {
|
|
return s.Value
|
|
}
|
|
|
|
// SetExpectedVersion sets the value of ExpectedVersion.
|
|
func (s *SearchStatusUpdate) SetExpectedVersion(val SearchStatusVersion) {
|
|
s.ExpectedVersion = val
|
|
}
|
|
|
|
// SetValue sets the value of Value.
|
|
func (s *SearchStatusUpdate) SetValue(val SearchStatusValue) {
|
|
s.Value = val
|
|
}
|
|
|
|
// Whether the candidate says they are searching for work. The status is a statement, never a consent:
|
|
// it publishes nothing, hides nothing, and grants nothing, and no value of it changes the C2 consent,
|
|
// the publication, or the hidden organizations.
|
|
//
|
|
// - looking: the candidate is searching ("Ищу"). It holds only while it is confirmed in time; see
|
|
// `SearchStatus.lapsed`.
|
|
// - not_looking: the candidate is not announcing a search. It is the state of every new account and
|
|
// the state to which a lapsed status falls.
|
|
//
|
|
// Ref: #/components/schemas/SearchStatusValue
|
|
type SearchStatusValue string
|
|
|
|
const (
|
|
SearchStatusValueLooking SearchStatusValue = "looking"
|
|
SearchStatusValueNotLooking SearchStatusValue = "not_looking"
|
|
)
|
|
|
|
// AllValues returns all SearchStatusValue values.
|
|
func (SearchStatusValue) AllValues() []SearchStatusValue {
|
|
return []SearchStatusValue{
|
|
SearchStatusValueLooking,
|
|
SearchStatusValueNotLooking,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SearchStatusValue) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SearchStatusValueLooking:
|
|
return []byte(s), nil
|
|
case SearchStatusValueNotLooking:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SearchStatusValue) UnmarshalText(data []byte) error {
|
|
switch SearchStatusValue(data) {
|
|
case SearchStatusValueLooking:
|
|
*s = SearchStatusValueLooking
|
|
return nil
|
|
case SearchStatusValueNotLooking:
|
|
*s = SearchStatusValueNotLooking
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type SearchStatusVersion int64
|
|
|
|
type SendOrganizationInvitationBadRequest Problem
|
|
|
|
func (*SendOrganizationInvitationBadRequest) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationConflict Problem
|
|
|
|
func (*SendOrganizationInvitationConflict) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationForbidden Problem
|
|
|
|
func (*SendOrganizationInvitationForbidden) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationNotFound Problem
|
|
|
|
func (*SendOrganizationInvitationNotFound) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationPreconditionFailed Problem
|
|
|
|
func (*SendOrganizationInvitationPreconditionFailed) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationUnauthorized Problem
|
|
|
|
func (*SendOrganizationInvitationUnauthorized) sendOrganizationInvitationRes() {}
|
|
|
|
type SendOrganizationInvitationUnprocessableEntity Problem
|
|
|
|
func (*SendOrganizationInvitationUnprocessableEntity) sendOrganizationInvitationRes() {}
|
|
|
|
// Current session as the client may see it: the account and the CSRF token. The session identifier
|
|
// itself travels only in the HttpOnly session cookie and never appears in a body.
|
|
// Ref: #/components/schemas/Session
|
|
type Session struct {
|
|
Account Account `json:"account"`
|
|
CsrfToken CsrfToken `json:"csrf_token"`
|
|
}
|
|
|
|
// GetAccount returns the value of Account.
|
|
func (s *Session) GetAccount() Account {
|
|
return s.Account
|
|
}
|
|
|
|
// GetCsrfToken returns the value of CsrfToken.
|
|
func (s *Session) GetCsrfToken() CsrfToken {
|
|
return s.CsrfToken
|
|
}
|
|
|
|
// SetAccount sets the value of Account.
|
|
func (s *Session) SetAccount(val Account) {
|
|
s.Account = val
|
|
}
|
|
|
|
// SetCsrfToken sets the value of CsrfToken.
|
|
func (s *Session) SetCsrfToken(val CsrfToken) {
|
|
s.CsrfToken = val
|
|
}
|
|
|
|
type SessionCookie struct {
|
|
APIKey string
|
|
Roles []string
|
|
}
|
|
|
|
// GetAPIKey returns the value of APIKey.
|
|
func (s *SessionCookie) GetAPIKey() string {
|
|
return s.APIKey
|
|
}
|
|
|
|
// GetRoles returns the value of Roles.
|
|
func (s *SessionCookie) GetRoles() []string {
|
|
return s.Roles
|
|
}
|
|
|
|
// SetAPIKey sets the value of APIKey.
|
|
func (s *SessionCookie) SetAPIKey(val string) {
|
|
s.APIKey = val
|
|
}
|
|
|
|
// SetRoles sets the value of Roles.
|
|
func (s *SessionCookie) SetRoles(val []string) {
|
|
s.Roles = val
|
|
}
|
|
|
|
type SessionCsrf struct {
|
|
APIKey string
|
|
Roles []string
|
|
}
|
|
|
|
// GetAPIKey returns the value of APIKey.
|
|
func (s *SessionCsrf) GetAPIKey() string {
|
|
return s.APIKey
|
|
}
|
|
|
|
// GetRoles returns the value of Roles.
|
|
func (s *SessionCsrf) GetRoles() []string {
|
|
return s.Roles
|
|
}
|
|
|
|
// SetAPIKey sets the value of APIKey.
|
|
func (s *SessionCsrf) SetAPIKey(val string) {
|
|
s.APIKey = val
|
|
}
|
|
|
|
// SetRoles sets the value of Roles.
|
|
func (s *SessionCsrf) SetRoles(val []string) {
|
|
s.Roles = val
|
|
}
|
|
|
|
// SessionHeaders wraps Session with response headers.
|
|
type SessionHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
SetCookie string
|
|
Response Session
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *SessionHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetSetCookie returns the value of SetCookie.
|
|
func (s *SessionHeaders) GetSetCookie() string {
|
|
return s.SetCookie
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *SessionHeaders) GetResponse() Session {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *SessionHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetSetCookie sets the value of SetCookie.
|
|
func (s *SessionHeaders) SetSetCookie(val string) {
|
|
s.SetCookie = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *SessionHeaders) SetResponse(val Session) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*SessionHeaders) loginRes() {}
|
|
|
|
type SetMyPublicationBadRequest Problem
|
|
|
|
func (*SetMyPublicationBadRequest) setMyPublicationRes() {}
|
|
|
|
type SetMyPublicationConflict Problem
|
|
|
|
func (*SetMyPublicationConflict) setMyPublicationRes() {}
|
|
|
|
type SetMyPublicationForbidden Problem
|
|
|
|
func (*SetMyPublicationForbidden) setMyPublicationRes() {}
|
|
|
|
type SetMyPublicationPreconditionFailed Problem
|
|
|
|
func (*SetMyPublicationPreconditionFailed) setMyPublicationRes() {}
|
|
|
|
type SetMyPublicationUnauthorized Problem
|
|
|
|
func (*SetMyPublicationUnauthorized) setMyPublicationRes() {}
|
|
|
|
type SetMySearchStatusBadRequest Problem
|
|
|
|
func (*SetMySearchStatusBadRequest) setMySearchStatusRes() {}
|
|
|
|
type SetMySearchStatusForbidden Problem
|
|
|
|
func (*SetMySearchStatusForbidden) setMySearchStatusRes() {}
|
|
|
|
type SetMySearchStatusPreconditionFailed Problem
|
|
|
|
func (*SetMySearchStatusPreconditionFailed) setMySearchStatusRes() {}
|
|
|
|
type SetMySearchStatusUnauthorized Problem
|
|
|
|
func (*SetMySearchStatusUnauthorized) setMySearchStatusRes() {}
|
|
|
|
type SkillName string
|
|
|
|
type SkillTaxonomyCode string
|
|
|
|
// Catalog of directions, specializations, and the grade scale that the questionnaire and the
|
|
// assessment use. The catalog is reference data and identical for every caller; it contains no
|
|
// personal data.
|
|
// Ref: #/components/schemas/SpecializationCatalog
|
|
type SpecializationCatalog struct {
|
|
// Directions in display order.
|
|
Directions []CatalogDirection `json:"directions"`
|
|
// Grade scale in ascending order.
|
|
Grades []CatalogGrade `json:"grades"`
|
|
}
|
|
|
|
// GetDirections returns the value of Directions.
|
|
func (s *SpecializationCatalog) GetDirections() []CatalogDirection {
|
|
return s.Directions
|
|
}
|
|
|
|
// GetGrades returns the value of Grades.
|
|
func (s *SpecializationCatalog) GetGrades() []CatalogGrade {
|
|
return s.Grades
|
|
}
|
|
|
|
// SetDirections sets the value of Directions.
|
|
func (s *SpecializationCatalog) SetDirections(val []CatalogDirection) {
|
|
s.Directions = val
|
|
}
|
|
|
|
// SetGrades sets the value of Grades.
|
|
func (s *SpecializationCatalog) SetGrades(val []CatalogGrade) {
|
|
s.Grades = val
|
|
}
|
|
|
|
// Stable code of a specialization. A category is a specialization together with a confirmed grade;
|
|
// programming languages and the technology stack are separate attributes and never form a category of
|
|
// their own, so Backend with Go is the category `backend`, not `go`. Algorithms is a shared assessment
|
|
// module, not a specialization, and has no code here.
|
|
//
|
|
// - backend: Backend (development).
|
|
// - frontend: Frontend (development).
|
|
// - mobile: Mobile (development).
|
|
// - network_engineer: Network Engineer (infrastructure).
|
|
// - devops_sre: DevOps/SRE (infrastructure).
|
|
// - data_analyst: Data Analyst (data).
|
|
// - ds_ml: DS/ML (data).
|
|
// - information_security: Information security (security).
|
|
// - qa: QA (quality).
|
|
//
|
|
// Adding a value is a contract change; renaming or removing one is a breaking change.
|
|
// Ref: #/components/schemas/SpecializationCode
|
|
type SpecializationCode string
|
|
|
|
const (
|
|
SpecializationCodeBackend SpecializationCode = "backend"
|
|
SpecializationCodeFrontend SpecializationCode = "frontend"
|
|
SpecializationCodeMobile SpecializationCode = "mobile"
|
|
SpecializationCodeNetworkEngineer SpecializationCode = "network_engineer"
|
|
SpecializationCodeDevopsSre SpecializationCode = "devops_sre"
|
|
SpecializationCodeDataAnalyst SpecializationCode = "data_analyst"
|
|
SpecializationCodeDsMl SpecializationCode = "ds_ml"
|
|
SpecializationCodeInformationSecurity SpecializationCode = "information_security"
|
|
SpecializationCodeQa SpecializationCode = "qa"
|
|
)
|
|
|
|
// AllValues returns all SpecializationCode values.
|
|
func (SpecializationCode) AllValues() []SpecializationCode {
|
|
return []SpecializationCode{
|
|
SpecializationCodeBackend,
|
|
SpecializationCodeFrontend,
|
|
SpecializationCodeMobile,
|
|
SpecializationCodeNetworkEngineer,
|
|
SpecializationCodeDevopsSre,
|
|
SpecializationCodeDataAnalyst,
|
|
SpecializationCodeDsMl,
|
|
SpecializationCodeInformationSecurity,
|
|
SpecializationCodeQa,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SpecializationCode) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SpecializationCodeBackend:
|
|
return []byte(s), nil
|
|
case SpecializationCodeFrontend:
|
|
return []byte(s), nil
|
|
case SpecializationCodeMobile:
|
|
return []byte(s), nil
|
|
case SpecializationCodeNetworkEngineer:
|
|
return []byte(s), nil
|
|
case SpecializationCodeDevopsSre:
|
|
return []byte(s), nil
|
|
case SpecializationCodeDataAnalyst:
|
|
return []byte(s), nil
|
|
case SpecializationCodeDsMl:
|
|
return []byte(s), nil
|
|
case SpecializationCodeInformationSecurity:
|
|
return []byte(s), nil
|
|
case SpecializationCodeQa:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SpecializationCode) UnmarshalText(data []byte) error {
|
|
switch SpecializationCode(data) {
|
|
case SpecializationCodeBackend:
|
|
*s = SpecializationCodeBackend
|
|
return nil
|
|
case SpecializationCodeFrontend:
|
|
*s = SpecializationCodeFrontend
|
|
return nil
|
|
case SpecializationCodeMobile:
|
|
*s = SpecializationCodeMobile
|
|
return nil
|
|
case SpecializationCodeNetworkEngineer:
|
|
*s = SpecializationCodeNetworkEngineer
|
|
return nil
|
|
case SpecializationCodeDevopsSre:
|
|
*s = SpecializationCodeDevopsSre
|
|
return nil
|
|
case SpecializationCodeDataAnalyst:
|
|
*s = SpecializationCodeDataAnalyst
|
|
return nil
|
|
case SpecializationCodeDsMl:
|
|
*s = SpecializationCodeDsMl
|
|
return nil
|
|
case SpecializationCodeInformationSecurity:
|
|
*s = SpecializationCodeInformationSecurity
|
|
return nil
|
|
case SpecializationCodeQa:
|
|
*s = SpecializationCodeQa
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type StackTag string
|
|
|
|
type StartMyAssessmentAttemptSessionBadRequest Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionBadRequest) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionConflict Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionConflict) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionForbidden Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionForbidden) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionNotFound Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionNotFound) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionPreconditionFailed Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionPreconditionFailed) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionUnauthorized Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionUnauthorized) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
type StartMyAssessmentAttemptSessionUnprocessableEntity Problem
|
|
|
|
func (*StartMyAssessmentAttemptSessionUnprocessableEntity) startMyAssessmentAttemptSessionRes() {}
|
|
|
|
// String answer, at most the `max_length` of the item. Two answers are equal only when their texts are
|
|
// identical; no trimming, case folding, or Unicode normalization applies to that comparison.
|
|
// Ref: #/components/schemas/StringAnswer
|
|
type StringAnswer struct {
|
|
Format StringAnswerFormat `json:"format"`
|
|
Text string `json:"text"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *StringAnswer) GetFormat() StringAnswerFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetText returns the value of Text.
|
|
func (s *StringAnswer) GetText() string {
|
|
return s.Text
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *StringAnswer) SetFormat(val StringAnswerFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetText sets the value of Text.
|
|
func (s *StringAnswer) SetText(val string) {
|
|
s.Text = val
|
|
}
|
|
|
|
type StringAnswerFormat string
|
|
|
|
const (
|
|
StringAnswerFormatString StringAnswerFormat = "string"
|
|
)
|
|
|
|
// AllValues returns all StringAnswerFormat values.
|
|
func (StringAnswerFormat) AllValues() []StringAnswerFormat {
|
|
return []StringAnswerFormat{
|
|
StringAnswerFormatString,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s StringAnswerFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case StringAnswerFormatString:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *StringAnswerFormat) UnmarshalText(data []byte) error {
|
|
switch StringAnswerFormat(data) {
|
|
case StringAnswerFormatString:
|
|
*s = StringAnswerFormatString
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Enter a short string, such as a command, a header name, or an address.
|
|
// Ref: #/components/schemas/StringItemContent
|
|
type StringItemContent struct {
|
|
Format StringItemContentFormat `json:"format"`
|
|
// Maximum length of the answer in characters. It is an input limit of the task family, never derived
|
|
// from the key, so it does not reveal the length of the correct answer.
|
|
MaxLength int32 `json:"max_length"`
|
|
}
|
|
|
|
// GetFormat returns the value of Format.
|
|
func (s *StringItemContent) GetFormat() StringItemContentFormat {
|
|
return s.Format
|
|
}
|
|
|
|
// GetMaxLength returns the value of MaxLength.
|
|
func (s *StringItemContent) GetMaxLength() int32 {
|
|
return s.MaxLength
|
|
}
|
|
|
|
// SetFormat sets the value of Format.
|
|
func (s *StringItemContent) SetFormat(val StringItemContentFormat) {
|
|
s.Format = val
|
|
}
|
|
|
|
// SetMaxLength sets the value of MaxLength.
|
|
func (s *StringItemContent) SetMaxLength(val int32) {
|
|
s.MaxLength = val
|
|
}
|
|
|
|
type StringItemContentFormat string
|
|
|
|
const (
|
|
StringItemContentFormatString StringItemContentFormat = "string"
|
|
)
|
|
|
|
// AllValues returns all StringItemContentFormat values.
|
|
func (StringItemContentFormat) AllValues() []StringItemContentFormat {
|
|
return []StringItemContentFormat{
|
|
StringItemContentFormatString,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s StringItemContentFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case StringItemContentFormatString:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *StringItemContentFormat) UnmarshalText(data []byte) error {
|
|
switch StringItemContentFormat(data) {
|
|
case StringItemContentFormatString:
|
|
*s = StringItemContentFormatString
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type SubmitMyAssessmentAnswerBadRequest Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerBadRequest) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerConflict Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerConflict) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerForbidden Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerForbidden) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerNotFound Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerNotFound) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerPreconditionFailed Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerPreconditionFailed) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerUnauthorized Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerUnauthorized) submitMyAssessmentAnswerRes() {}
|
|
|
|
type SubmitMyAssessmentAnswerUnprocessableEntity Problem
|
|
|
|
func (*SubmitMyAssessmentAnswerUnprocessableEntity) submitMyAssessmentAnswerRes() {}
|
|
|
|
// Case of the current account. It contains what the author sent, the public processing state, and the
|
|
// public history. It never contains the identity of a moderator, an expert, or a support agent,
|
|
// internal notes, evidence, assessment answers or anti-cheat signals, risk signals, or contact data of
|
|
// another person. Fields that do not apply to the type are null.
|
|
// Ref: #/components/schemas/SupportCase
|
|
type SupportCase struct {
|
|
// Case identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Number SupportCaseNumber `json:"number"`
|
|
Type SupportCaseType `json:"type"`
|
|
Status SupportCaseStatus `json:"status"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
// Object that the case is about, as sent on creation, or null when the case has none.
|
|
Object NilSupportCaseObjectReference `json:"object"`
|
|
// Category of a manual assessment, the optional category of a support case, or null.
|
|
AssessmentTarget NilSupportCaseAssessmentTarget `json:"assessment_target"`
|
|
// Ground of a complaint, or null for other types.
|
|
ComplaintReason NilSupportCaseComplaintReason `json:"complaint_reason"`
|
|
// For a manual assessment, the version of the published rubric of the category that the server fixed
|
|
// on creation; the expert assesses with it, the same rubric as the automated assessment. Null for
|
|
// other types, and null for a manual assessment whose category has no published rubric yet: the case
|
|
// then waits in `waiting_expert` and the client says so instead of promising a date.
|
|
RubricVersion NilInt32 `json:"rubric_version"`
|
|
ResponseTarget SupportResponseTarget `json:"response_target"`
|
|
// Decision once the case is `resolved`, otherwise null.
|
|
Decision NilSupportCaseDecision `json:"decision"`
|
|
// Every public event in the order it happened, starting with `created`; the list is never truncated.
|
|
// The server keeps a case within 200 events: it rejects a staff reply or status change that would
|
|
// leave no room for the terminal event, so a case always fits and can always be resolved or closed.
|
|
// Further correspondence goes into a new case that references this one as `support_case`.
|
|
History []SupportCaseEvent `json:"history"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCase) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetNumber returns the value of Number.
|
|
func (s *SupportCase) GetNumber() SupportCaseNumber {
|
|
return s.Number
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCase) GetType() SupportCaseType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *SupportCase) GetStatus() SupportCaseStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCase) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCase) GetObject() NilSupportCaseObjectReference {
|
|
return s.Object
|
|
}
|
|
|
|
// GetAssessmentTarget returns the value of AssessmentTarget.
|
|
func (s *SupportCase) GetAssessmentTarget() NilSupportCaseAssessmentTarget {
|
|
return s.AssessmentTarget
|
|
}
|
|
|
|
// GetComplaintReason returns the value of ComplaintReason.
|
|
func (s *SupportCase) GetComplaintReason() NilSupportCaseComplaintReason {
|
|
return s.ComplaintReason
|
|
}
|
|
|
|
// GetRubricVersion returns the value of RubricVersion.
|
|
func (s *SupportCase) GetRubricVersion() NilInt32 {
|
|
return s.RubricVersion
|
|
}
|
|
|
|
// GetResponseTarget returns the value of ResponseTarget.
|
|
func (s *SupportCase) GetResponseTarget() SupportResponseTarget {
|
|
return s.ResponseTarget
|
|
}
|
|
|
|
// GetDecision returns the value of Decision.
|
|
func (s *SupportCase) GetDecision() NilSupportCaseDecision {
|
|
return s.Decision
|
|
}
|
|
|
|
// GetHistory returns the value of History.
|
|
func (s *SupportCase) GetHistory() []SupportCaseEvent {
|
|
return s.History
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *SupportCase) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *SupportCase) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCase) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetNumber sets the value of Number.
|
|
func (s *SupportCase) SetNumber(val SupportCaseNumber) {
|
|
s.Number = val
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCase) SetType(val SupportCaseType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *SupportCase) SetStatus(val SupportCaseStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCase) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCase) SetObject(val NilSupportCaseObjectReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
// SetAssessmentTarget sets the value of AssessmentTarget.
|
|
func (s *SupportCase) SetAssessmentTarget(val NilSupportCaseAssessmentTarget) {
|
|
s.AssessmentTarget = val
|
|
}
|
|
|
|
// SetComplaintReason sets the value of ComplaintReason.
|
|
func (s *SupportCase) SetComplaintReason(val NilSupportCaseComplaintReason) {
|
|
s.ComplaintReason = val
|
|
}
|
|
|
|
// SetRubricVersion sets the value of RubricVersion.
|
|
func (s *SupportCase) SetRubricVersion(val NilInt32) {
|
|
s.RubricVersion = val
|
|
}
|
|
|
|
// SetResponseTarget sets the value of ResponseTarget.
|
|
func (s *SupportCase) SetResponseTarget(val SupportResponseTarget) {
|
|
s.ResponseTarget = val
|
|
}
|
|
|
|
// SetDecision sets the value of Decision.
|
|
func (s *SupportCase) SetDecision(val NilSupportCaseDecision) {
|
|
s.Decision = val
|
|
}
|
|
|
|
// SetHistory sets the value of History.
|
|
func (s *SupportCase) SetHistory(val []SupportCaseEvent) {
|
|
s.History = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *SupportCase) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *SupportCase) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// Who caused an event, by kind only. A case never names or identifies a moderator, an expert, or a
|
|
// support agent; assessment experts and appeal moderators are `support` too. Adding a value is a
|
|
// contract change.
|
|
//
|
|
// - user: the author of the case.
|
|
// - support: a person of the support, moderation, or expert staff.
|
|
// - system: the server, for example on creation or when it routes the case.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseActorKind
|
|
type SupportCaseActorKind string
|
|
|
|
const (
|
|
SupportCaseActorKindUser SupportCaseActorKind = "user"
|
|
SupportCaseActorKindSupport SupportCaseActorKind = "support"
|
|
SupportCaseActorKindSystem SupportCaseActorKind = "system"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseActorKind values.
|
|
func (SupportCaseActorKind) AllValues() []SupportCaseActorKind {
|
|
return []SupportCaseActorKind{
|
|
SupportCaseActorKindUser,
|
|
SupportCaseActorKindSupport,
|
|
SupportCaseActorKindSystem,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseActorKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseActorKindUser:
|
|
return []byte(s), nil
|
|
case SupportCaseActorKindSupport:
|
|
return []byte(s), nil
|
|
case SupportCaseActorKindSystem:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseActorKind) UnmarshalText(data []byte) error {
|
|
switch SupportCaseActorKind(data) {
|
|
case SupportCaseActorKindUser:
|
|
*s = SupportCaseActorKindUser
|
|
return nil
|
|
case SupportCaseActorKindSupport:
|
|
*s = SupportCaseActorKindSupport
|
|
return nil
|
|
case SupportCaseActorKindSystem:
|
|
*s = SupportCaseActorKindSystem
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Category that the case is about: a specialization and a grade of the MVP scale. For a manual
|
|
// assessment it is the category to assess; for a support case it is optional context, for example the
|
|
// category whose test is not available.
|
|
// Ref: #/components/schemas/SupportCaseAssessmentTarget
|
|
type SupportCaseAssessmentTarget struct {
|
|
Specialization SpecializationCode `json:"specialization"`
|
|
Grade GradeCode `json:"grade"`
|
|
}
|
|
|
|
// GetSpecialization returns the value of Specialization.
|
|
func (s *SupportCaseAssessmentTarget) GetSpecialization() SpecializationCode {
|
|
return s.Specialization
|
|
}
|
|
|
|
// GetGrade returns the value of Grade.
|
|
func (s *SupportCaseAssessmentTarget) GetGrade() GradeCode {
|
|
return s.Grade
|
|
}
|
|
|
|
// SetSpecialization sets the value of Specialization.
|
|
func (s *SupportCaseAssessmentTarget) SetSpecialization(val SpecializationCode) {
|
|
s.Specialization = val
|
|
}
|
|
|
|
// SetGrade sets the value of Grade.
|
|
func (s *SupportCaseAssessmentTarget) SetGrade(val GradeCode) {
|
|
s.Grade = val
|
|
}
|
|
|
|
// Reference to an assessment attempt of the caller. Any other object type fails validation.
|
|
// Ref: #/components/schemas/SupportCaseAttemptReference
|
|
type SupportCaseAttemptReference struct {
|
|
Type SupportCaseAttemptReferenceType `json:"type"`
|
|
// Identifier of an assessment attempt of the caller.
|
|
ID uuid.UUID `json:"id"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseAttemptReference) GetType() SupportCaseAttemptReferenceType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCaseAttemptReference) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseAttemptReference) SetType(val SupportCaseAttemptReferenceType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCaseAttemptReference) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
type SupportCaseAttemptReferenceType string
|
|
|
|
const (
|
|
SupportCaseAttemptReferenceTypeAssessmentAttempt SupportCaseAttemptReferenceType = "assessment_attempt"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseAttemptReferenceType values.
|
|
func (SupportCaseAttemptReferenceType) AllValues() []SupportCaseAttemptReferenceType {
|
|
return []SupportCaseAttemptReferenceType{
|
|
SupportCaseAttemptReferenceTypeAssessmentAttempt,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseAttemptReferenceType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseAttemptReferenceTypeAssessmentAttempt:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseAttemptReferenceType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseAttemptReferenceType(data) {
|
|
case SupportCaseAttemptReferenceTypeAssessmentAttempt:
|
|
*s = SupportCaseAttemptReferenceTypeAssessmentAttempt
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Ground of a complaint (PRD FR18).
|
|
//
|
|
// - organization_conduct: conduct of the organization, for example fraudulent or abusive messages.
|
|
// - offer_content: misleading or discriminatory content of an offer. Requires an invitation
|
|
// reference.
|
|
// - salary_terms_violation: a breach of the salary terms of an offer. Requires an invitation
|
|
// reference.
|
|
// - data_disclosure: a disclosure of the caller's personal data beyond what the caller granted.
|
|
// - other: another ground, explained in the description.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseComplaintReason
|
|
type SupportCaseComplaintReason string
|
|
|
|
const (
|
|
SupportCaseComplaintReasonOrganizationConduct SupportCaseComplaintReason = "organization_conduct"
|
|
SupportCaseComplaintReasonOfferContent SupportCaseComplaintReason = "offer_content"
|
|
SupportCaseComplaintReasonSalaryTermsViolation SupportCaseComplaintReason = "salary_terms_violation"
|
|
SupportCaseComplaintReasonDataDisclosure SupportCaseComplaintReason = "data_disclosure"
|
|
SupportCaseComplaintReasonOther SupportCaseComplaintReason = "other"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseComplaintReason values.
|
|
func (SupportCaseComplaintReason) AllValues() []SupportCaseComplaintReason {
|
|
return []SupportCaseComplaintReason{
|
|
SupportCaseComplaintReasonOrganizationConduct,
|
|
SupportCaseComplaintReasonOfferContent,
|
|
SupportCaseComplaintReasonSalaryTermsViolation,
|
|
SupportCaseComplaintReasonDataDisclosure,
|
|
SupportCaseComplaintReasonOther,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseComplaintReason) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseComplaintReasonOrganizationConduct:
|
|
return []byte(s), nil
|
|
case SupportCaseComplaintReasonOfferContent:
|
|
return []byte(s), nil
|
|
case SupportCaseComplaintReasonSalaryTermsViolation:
|
|
return []byte(s), nil
|
|
case SupportCaseComplaintReasonDataDisclosure:
|
|
return []byte(s), nil
|
|
case SupportCaseComplaintReasonOther:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseComplaintReason) UnmarshalText(data []byte) error {
|
|
switch SupportCaseComplaintReason(data) {
|
|
case SupportCaseComplaintReasonOrganizationConduct:
|
|
*s = SupportCaseComplaintReasonOrganizationConduct
|
|
return nil
|
|
case SupportCaseComplaintReasonOfferContent:
|
|
*s = SupportCaseComplaintReasonOfferContent
|
|
return nil
|
|
case SupportCaseComplaintReasonSalaryTermsViolation:
|
|
*s = SupportCaseComplaintReasonSalaryTermsViolation
|
|
return nil
|
|
case SupportCaseComplaintReasonDataDisclosure:
|
|
*s = SupportCaseComplaintReasonDataDisclosure
|
|
return nil
|
|
case SupportCaseComplaintReasonOther:
|
|
*s = SupportCaseComplaintReasonOther
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Reference to the object of a complaint: an organization that the caller can see or an invitation
|
|
// addressed to the caller. Any other object type fails validation.
|
|
// Ref: #/components/schemas/SupportCaseComplaintReference
|
|
type SupportCaseComplaintReference struct {
|
|
Type SupportCaseComplaintReferenceType `json:"type"`
|
|
// Identifier of the organization or the invitation.
|
|
ID uuid.UUID `json:"id"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseComplaintReference) GetType() SupportCaseComplaintReferenceType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCaseComplaintReference) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseComplaintReference) SetType(val SupportCaseComplaintReferenceType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCaseComplaintReference) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
type SupportCaseComplaintReferenceType string
|
|
|
|
const (
|
|
SupportCaseComplaintReferenceTypeOrganization SupportCaseComplaintReferenceType = "organization"
|
|
SupportCaseComplaintReferenceTypeInvitation SupportCaseComplaintReferenceType = "invitation"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseComplaintReferenceType values.
|
|
func (SupportCaseComplaintReferenceType) AllValues() []SupportCaseComplaintReferenceType {
|
|
return []SupportCaseComplaintReferenceType{
|
|
SupportCaseComplaintReferenceTypeOrganization,
|
|
SupportCaseComplaintReferenceTypeInvitation,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseComplaintReferenceType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseComplaintReferenceTypeOrganization:
|
|
return []byte(s), nil
|
|
case SupportCaseComplaintReferenceTypeInvitation:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseComplaintReferenceType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseComplaintReferenceType(data) {
|
|
case SupportCaseComplaintReferenceTypeOrganization:
|
|
*s = SupportCaseComplaintReferenceTypeOrganization
|
|
return nil
|
|
case SupportCaseComplaintReferenceTypeInvitation:
|
|
*s = SupportCaseComplaintReferenceTypeInvitation
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// New case, selected by `type`. Each type fixes its required fields and the object types it accepts.
|
|
// The body carries only what the user states: the request has no status, decision, outcome, priority,
|
|
// response target, assignee, moderator, rubric, or contact field, and every variant rejects unknown
|
|
// fields, so a client cannot set any of them. The user and the account come only from the session.
|
|
// Ref: #/components/schemas/SupportCaseCreate
|
|
// SupportCaseCreate represents sum type.
|
|
type SupportCaseCreate struct {
|
|
// Type selects the active sum variant, switch on this field.
|
|
Type SupportCaseCreateType
|
|
SupportCaseCreateSupport SupportCaseCreateSupport
|
|
SupportCaseCreateComplaint SupportCaseCreateComplaint
|
|
SupportCaseCreateGradeAppeal SupportCaseCreateGradeAppeal
|
|
SupportCaseCreateAnticheatAppeal SupportCaseCreateAnticheatAppeal
|
|
SupportCaseCreateManualAssessment SupportCaseCreateManualAssessment
|
|
}
|
|
|
|
// SupportCaseCreateType is oneOf type of SupportCaseCreate.
|
|
type SupportCaseCreateType string
|
|
|
|
// Possible values for SupportCaseCreateType.
|
|
const (
|
|
SupportCaseCreateSupportSupportCaseCreate SupportCaseCreateType = "SupportCaseCreateSupport"
|
|
SupportCaseCreateComplaintSupportCaseCreate SupportCaseCreateType = "SupportCaseCreateComplaint"
|
|
SupportCaseCreateGradeAppealSupportCaseCreate SupportCaseCreateType = "SupportCaseCreateGradeAppeal"
|
|
SupportCaseCreateAnticheatAppealSupportCaseCreate SupportCaseCreateType = "SupportCaseCreateAnticheatAppeal"
|
|
SupportCaseCreateManualAssessmentSupportCaseCreate SupportCaseCreateType = "SupportCaseCreateManualAssessment"
|
|
)
|
|
|
|
// IsSupportCaseCreateSupport reports whether SupportCaseCreate is SupportCaseCreateSupport.
|
|
func (s SupportCaseCreate) IsSupportCaseCreateSupport() bool {
|
|
return s.Type == SupportCaseCreateSupportSupportCaseCreate
|
|
}
|
|
|
|
// IsSupportCaseCreateComplaint reports whether SupportCaseCreate is SupportCaseCreateComplaint.
|
|
func (s SupportCaseCreate) IsSupportCaseCreateComplaint() bool {
|
|
return s.Type == SupportCaseCreateComplaintSupportCaseCreate
|
|
}
|
|
|
|
// IsSupportCaseCreateGradeAppeal reports whether SupportCaseCreate is SupportCaseCreateGradeAppeal.
|
|
func (s SupportCaseCreate) IsSupportCaseCreateGradeAppeal() bool {
|
|
return s.Type == SupportCaseCreateGradeAppealSupportCaseCreate
|
|
}
|
|
|
|
// IsSupportCaseCreateAnticheatAppeal reports whether SupportCaseCreate is SupportCaseCreateAnticheatAppeal.
|
|
func (s SupportCaseCreate) IsSupportCaseCreateAnticheatAppeal() bool {
|
|
return s.Type == SupportCaseCreateAnticheatAppealSupportCaseCreate
|
|
}
|
|
|
|
// IsSupportCaseCreateManualAssessment reports whether SupportCaseCreate is SupportCaseCreateManualAssessment.
|
|
func (s SupportCaseCreate) IsSupportCaseCreateManualAssessment() bool {
|
|
return s.Type == SupportCaseCreateManualAssessmentSupportCaseCreate
|
|
}
|
|
|
|
// SetSupportCaseCreateSupport sets SupportCaseCreate to SupportCaseCreateSupport.
|
|
func (s *SupportCaseCreate) SetSupportCaseCreateSupport(v SupportCaseCreateSupport) {
|
|
s.Type = SupportCaseCreateSupportSupportCaseCreate
|
|
s.SupportCaseCreateSupport = v
|
|
}
|
|
|
|
// GetSupportCaseCreateSupport returns SupportCaseCreateSupport and true boolean if SupportCaseCreate is SupportCaseCreateSupport.
|
|
func (s SupportCaseCreate) GetSupportCaseCreateSupport() (v SupportCaseCreateSupport, ok bool) {
|
|
if !s.IsSupportCaseCreateSupport() {
|
|
return v, false
|
|
}
|
|
return s.SupportCaseCreateSupport, true
|
|
}
|
|
|
|
// NewSupportCaseCreateSupportSupportCaseCreate returns new SupportCaseCreate from SupportCaseCreateSupport.
|
|
func NewSupportCaseCreateSupportSupportCaseCreate(v SupportCaseCreateSupport) SupportCaseCreate {
|
|
var s SupportCaseCreate
|
|
s.SetSupportCaseCreateSupport(v)
|
|
return s
|
|
}
|
|
|
|
// SetSupportCaseCreateComplaint sets SupportCaseCreate to SupportCaseCreateComplaint.
|
|
func (s *SupportCaseCreate) SetSupportCaseCreateComplaint(v SupportCaseCreateComplaint) {
|
|
s.Type = SupportCaseCreateComplaintSupportCaseCreate
|
|
s.SupportCaseCreateComplaint = v
|
|
}
|
|
|
|
// GetSupportCaseCreateComplaint returns SupportCaseCreateComplaint and true boolean if SupportCaseCreate is SupportCaseCreateComplaint.
|
|
func (s SupportCaseCreate) GetSupportCaseCreateComplaint() (v SupportCaseCreateComplaint, ok bool) {
|
|
if !s.IsSupportCaseCreateComplaint() {
|
|
return v, false
|
|
}
|
|
return s.SupportCaseCreateComplaint, true
|
|
}
|
|
|
|
// NewSupportCaseCreateComplaintSupportCaseCreate returns new SupportCaseCreate from SupportCaseCreateComplaint.
|
|
func NewSupportCaseCreateComplaintSupportCaseCreate(v SupportCaseCreateComplaint) SupportCaseCreate {
|
|
var s SupportCaseCreate
|
|
s.SetSupportCaseCreateComplaint(v)
|
|
return s
|
|
}
|
|
|
|
// SetSupportCaseCreateGradeAppeal sets SupportCaseCreate to SupportCaseCreateGradeAppeal.
|
|
func (s *SupportCaseCreate) SetSupportCaseCreateGradeAppeal(v SupportCaseCreateGradeAppeal) {
|
|
s.Type = SupportCaseCreateGradeAppealSupportCaseCreate
|
|
s.SupportCaseCreateGradeAppeal = v
|
|
}
|
|
|
|
// GetSupportCaseCreateGradeAppeal returns SupportCaseCreateGradeAppeal and true boolean if SupportCaseCreate is SupportCaseCreateGradeAppeal.
|
|
func (s SupportCaseCreate) GetSupportCaseCreateGradeAppeal() (v SupportCaseCreateGradeAppeal, ok bool) {
|
|
if !s.IsSupportCaseCreateGradeAppeal() {
|
|
return v, false
|
|
}
|
|
return s.SupportCaseCreateGradeAppeal, true
|
|
}
|
|
|
|
// NewSupportCaseCreateGradeAppealSupportCaseCreate returns new SupportCaseCreate from SupportCaseCreateGradeAppeal.
|
|
func NewSupportCaseCreateGradeAppealSupportCaseCreate(v SupportCaseCreateGradeAppeal) SupportCaseCreate {
|
|
var s SupportCaseCreate
|
|
s.SetSupportCaseCreateGradeAppeal(v)
|
|
return s
|
|
}
|
|
|
|
// SetSupportCaseCreateAnticheatAppeal sets SupportCaseCreate to SupportCaseCreateAnticheatAppeal.
|
|
func (s *SupportCaseCreate) SetSupportCaseCreateAnticheatAppeal(v SupportCaseCreateAnticheatAppeal) {
|
|
s.Type = SupportCaseCreateAnticheatAppealSupportCaseCreate
|
|
s.SupportCaseCreateAnticheatAppeal = v
|
|
}
|
|
|
|
// GetSupportCaseCreateAnticheatAppeal returns SupportCaseCreateAnticheatAppeal and true boolean if SupportCaseCreate is SupportCaseCreateAnticheatAppeal.
|
|
func (s SupportCaseCreate) GetSupportCaseCreateAnticheatAppeal() (v SupportCaseCreateAnticheatAppeal, ok bool) {
|
|
if !s.IsSupportCaseCreateAnticheatAppeal() {
|
|
return v, false
|
|
}
|
|
return s.SupportCaseCreateAnticheatAppeal, true
|
|
}
|
|
|
|
// NewSupportCaseCreateAnticheatAppealSupportCaseCreate returns new SupportCaseCreate from SupportCaseCreateAnticheatAppeal.
|
|
func NewSupportCaseCreateAnticheatAppealSupportCaseCreate(v SupportCaseCreateAnticheatAppeal) SupportCaseCreate {
|
|
var s SupportCaseCreate
|
|
s.SetSupportCaseCreateAnticheatAppeal(v)
|
|
return s
|
|
}
|
|
|
|
// SetSupportCaseCreateManualAssessment sets SupportCaseCreate to SupportCaseCreateManualAssessment.
|
|
func (s *SupportCaseCreate) SetSupportCaseCreateManualAssessment(v SupportCaseCreateManualAssessment) {
|
|
s.Type = SupportCaseCreateManualAssessmentSupportCaseCreate
|
|
s.SupportCaseCreateManualAssessment = v
|
|
}
|
|
|
|
// GetSupportCaseCreateManualAssessment returns SupportCaseCreateManualAssessment and true boolean if SupportCaseCreate is SupportCaseCreateManualAssessment.
|
|
func (s SupportCaseCreate) GetSupportCaseCreateManualAssessment() (v SupportCaseCreateManualAssessment, ok bool) {
|
|
if !s.IsSupportCaseCreateManualAssessment() {
|
|
return v, false
|
|
}
|
|
return s.SupportCaseCreateManualAssessment, true
|
|
}
|
|
|
|
// NewSupportCaseCreateManualAssessmentSupportCaseCreate returns new SupportCaseCreate from SupportCaseCreateManualAssessment.
|
|
func NewSupportCaseCreateManualAssessmentSupportCaseCreate(v SupportCaseCreateManualAssessment) SupportCaseCreate {
|
|
var s SupportCaseCreate
|
|
s.SetSupportCaseCreateManualAssessment(v)
|
|
return s
|
|
}
|
|
|
|
// New appeal of an anti-cheat review decision on an own assessment attempt.
|
|
// Ref: #/components/schemas/SupportCaseCreateAnticheatAppeal
|
|
type SupportCaseCreateAnticheatAppeal struct {
|
|
Type SupportCaseCreateAnticheatAppealType `json:"type"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
Object SupportCaseAttemptReference `json:"object"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseCreateAnticheatAppeal) GetType() SupportCaseCreateAnticheatAppealType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCaseCreateAnticheatAppeal) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseCreateAnticheatAppeal) GetObject() SupportCaseAttemptReference {
|
|
return s.Object
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseCreateAnticheatAppeal) SetType(val SupportCaseCreateAnticheatAppealType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCaseCreateAnticheatAppeal) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseCreateAnticheatAppeal) SetObject(val SupportCaseAttemptReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
type SupportCaseCreateAnticheatAppealType string
|
|
|
|
const (
|
|
SupportCaseCreateAnticheatAppealTypeAnticheatAppeal SupportCaseCreateAnticheatAppealType = "anticheat_appeal"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseCreateAnticheatAppealType values.
|
|
func (SupportCaseCreateAnticheatAppealType) AllValues() []SupportCaseCreateAnticheatAppealType {
|
|
return []SupportCaseCreateAnticheatAppealType{
|
|
SupportCaseCreateAnticheatAppealTypeAnticheatAppeal,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseCreateAnticheatAppealType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseCreateAnticheatAppealTypeAnticheatAppeal:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseCreateAnticheatAppealType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseCreateAnticheatAppealType(data) {
|
|
case SupportCaseCreateAnticheatAppealTypeAnticheatAppeal:
|
|
*s = SupportCaseCreateAnticheatAppealTypeAnticheatAppeal
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// New complaint about an organization or an offer.
|
|
// Ref: #/components/schemas/SupportCaseCreateComplaint
|
|
type SupportCaseCreateComplaint struct {
|
|
Type SupportCaseCreateComplaintType `json:"type"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
ComplaintReason SupportCaseComplaintReason `json:"complaint_reason"`
|
|
Object SupportCaseComplaintReference `json:"object"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseCreateComplaint) GetType() SupportCaseCreateComplaintType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCaseCreateComplaint) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetComplaintReason returns the value of ComplaintReason.
|
|
func (s *SupportCaseCreateComplaint) GetComplaintReason() SupportCaseComplaintReason {
|
|
return s.ComplaintReason
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseCreateComplaint) GetObject() SupportCaseComplaintReference {
|
|
return s.Object
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseCreateComplaint) SetType(val SupportCaseCreateComplaintType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCaseCreateComplaint) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetComplaintReason sets the value of ComplaintReason.
|
|
func (s *SupportCaseCreateComplaint) SetComplaintReason(val SupportCaseComplaintReason) {
|
|
s.ComplaintReason = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseCreateComplaint) SetObject(val SupportCaseComplaintReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
type SupportCaseCreateComplaintType string
|
|
|
|
const (
|
|
SupportCaseCreateComplaintTypeComplaint SupportCaseCreateComplaintType = "complaint"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseCreateComplaintType values.
|
|
func (SupportCaseCreateComplaintType) AllValues() []SupportCaseCreateComplaintType {
|
|
return []SupportCaseCreateComplaintType{
|
|
SupportCaseCreateComplaintTypeComplaint,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseCreateComplaintType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseCreateComplaintTypeComplaint:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseCreateComplaintType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseCreateComplaintType(data) {
|
|
case SupportCaseCreateComplaintTypeComplaint:
|
|
*s = SupportCaseCreateComplaintTypeComplaint
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// New appeal of a category the caller received: the result of an own assessment attempt, or the
|
|
// outcome of an own resolved manual assessment.
|
|
// Ref: #/components/schemas/SupportCaseCreateGradeAppeal
|
|
type SupportCaseCreateGradeAppeal struct {
|
|
Type SupportCaseCreateGradeAppealType `json:"type"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
Object SupportCaseGradeAppealReference `json:"object"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseCreateGradeAppeal) GetType() SupportCaseCreateGradeAppealType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCaseCreateGradeAppeal) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseCreateGradeAppeal) GetObject() SupportCaseGradeAppealReference {
|
|
return s.Object
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseCreateGradeAppeal) SetType(val SupportCaseCreateGradeAppealType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCaseCreateGradeAppeal) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseCreateGradeAppeal) SetObject(val SupportCaseGradeAppealReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
type SupportCaseCreateGradeAppealType string
|
|
|
|
const (
|
|
SupportCaseCreateGradeAppealTypeGradeAppeal SupportCaseCreateGradeAppealType = "grade_appeal"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseCreateGradeAppealType values.
|
|
func (SupportCaseCreateGradeAppealType) AllValues() []SupportCaseCreateGradeAppealType {
|
|
return []SupportCaseCreateGradeAppealType{
|
|
SupportCaseCreateGradeAppealTypeGradeAppeal,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseCreateGradeAppealType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseCreateGradeAppealTypeGradeAppeal:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseCreateGradeAppealType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseCreateGradeAppealType(data) {
|
|
case SupportCaseCreateGradeAppealTypeGradeAppeal:
|
|
*s = SupportCaseCreateGradeAppealTypeGradeAppeal
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// New request for a manual assessment of a category by a subject expert. A prior attempt of the same
|
|
// category is optional context: a failed first test or no attempt at all never blocks the request.
|
|
// Ref: #/components/schemas/SupportCaseCreateManualAssessment
|
|
type SupportCaseCreateManualAssessment struct {
|
|
Type SupportCaseCreateManualAssessmentType `json:"type"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
AssessmentTarget SupportCaseAssessmentTarget `json:"assessment_target"`
|
|
Object OptSupportCaseAttemptReference `json:"object"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseCreateManualAssessment) GetType() SupportCaseCreateManualAssessmentType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCaseCreateManualAssessment) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetAssessmentTarget returns the value of AssessmentTarget.
|
|
func (s *SupportCaseCreateManualAssessment) GetAssessmentTarget() SupportCaseAssessmentTarget {
|
|
return s.AssessmentTarget
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseCreateManualAssessment) GetObject() OptSupportCaseAttemptReference {
|
|
return s.Object
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseCreateManualAssessment) SetType(val SupportCaseCreateManualAssessmentType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCaseCreateManualAssessment) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetAssessmentTarget sets the value of AssessmentTarget.
|
|
func (s *SupportCaseCreateManualAssessment) SetAssessmentTarget(val SupportCaseAssessmentTarget) {
|
|
s.AssessmentTarget = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseCreateManualAssessment) SetObject(val OptSupportCaseAttemptReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
type SupportCaseCreateManualAssessmentType string
|
|
|
|
const (
|
|
SupportCaseCreateManualAssessmentTypeManualAssessment SupportCaseCreateManualAssessmentType = "manual_assessment"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseCreateManualAssessmentType values.
|
|
func (SupportCaseCreateManualAssessmentType) AllValues() []SupportCaseCreateManualAssessmentType {
|
|
return []SupportCaseCreateManualAssessmentType{
|
|
SupportCaseCreateManualAssessmentTypeManualAssessment,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseCreateManualAssessmentType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseCreateManualAssessmentTypeManualAssessment:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseCreateManualAssessmentType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseCreateManualAssessmentType(data) {
|
|
case SupportCaseCreateManualAssessmentTypeManualAssessment:
|
|
*s = SupportCaseCreateManualAssessmentTypeManualAssessment
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// New support case. Both the object reference and the assessment target are optional context; omit
|
|
// what does not apply.
|
|
// Ref: #/components/schemas/SupportCaseCreateSupport
|
|
type SupportCaseCreateSupport struct {
|
|
Type SupportCaseCreateSupportType `json:"type"`
|
|
Description SupportCaseDescription `json:"description"`
|
|
Object OptSupportCaseObjectReference `json:"object"`
|
|
AssessmentTarget OptSupportCaseAssessmentTarget `json:"assessment_target"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseCreateSupport) GetType() SupportCaseCreateSupportType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetDescription returns the value of Description.
|
|
func (s *SupportCaseCreateSupport) GetDescription() SupportCaseDescription {
|
|
return s.Description
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseCreateSupport) GetObject() OptSupportCaseObjectReference {
|
|
return s.Object
|
|
}
|
|
|
|
// GetAssessmentTarget returns the value of AssessmentTarget.
|
|
func (s *SupportCaseCreateSupport) GetAssessmentTarget() OptSupportCaseAssessmentTarget {
|
|
return s.AssessmentTarget
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseCreateSupport) SetType(val SupportCaseCreateSupportType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetDescription sets the value of Description.
|
|
func (s *SupportCaseCreateSupport) SetDescription(val SupportCaseDescription) {
|
|
s.Description = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseCreateSupport) SetObject(val OptSupportCaseObjectReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
// SetAssessmentTarget sets the value of AssessmentTarget.
|
|
func (s *SupportCaseCreateSupport) SetAssessmentTarget(val OptSupportCaseAssessmentTarget) {
|
|
s.AssessmentTarget = val
|
|
}
|
|
|
|
type SupportCaseCreateSupportType string
|
|
|
|
const (
|
|
SupportCaseCreateSupportTypeSupport SupportCaseCreateSupportType = "support"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseCreateSupportType values.
|
|
func (SupportCaseCreateSupportType) AllValues() []SupportCaseCreateSupportType {
|
|
return []SupportCaseCreateSupportType{
|
|
SupportCaseCreateSupportTypeSupport,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseCreateSupportType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseCreateSupportTypeSupport:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseCreateSupportType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseCreateSupportType(data) {
|
|
case SupportCaseCreateSupportTypeSupport:
|
|
*s = SupportCaseCreateSupportTypeSupport
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Decision visible to the user. It exists only once the case is `resolved`. It holds the outcome and
|
|
// the public reason; it never names the moderator or the expert and never contains internal notes,
|
|
// evidence, sanctions against another party, or risk signals. An upheld grade appeal never rewrites
|
|
// the original result: the corrected result is a separate decision of the assessment, and both stay in
|
|
// the history of that attempt.
|
|
// Ref: #/components/schemas/SupportCaseDecision
|
|
type SupportCaseDecision struct {
|
|
Outcome SupportCaseDecisionOutcome `json:"outcome"`
|
|
Reason SupportCasePublicText `json:"reason"`
|
|
DecidedAt Timestamp `json:"decided_at"`
|
|
}
|
|
|
|
// GetOutcome returns the value of Outcome.
|
|
func (s *SupportCaseDecision) GetOutcome() SupportCaseDecisionOutcome {
|
|
return s.Outcome
|
|
}
|
|
|
|
// GetReason returns the value of Reason.
|
|
func (s *SupportCaseDecision) GetReason() SupportCasePublicText {
|
|
return s.Reason
|
|
}
|
|
|
|
// GetDecidedAt returns the value of DecidedAt.
|
|
func (s *SupportCaseDecision) GetDecidedAt() Timestamp {
|
|
return s.DecidedAt
|
|
}
|
|
|
|
// SetOutcome sets the value of Outcome.
|
|
func (s *SupportCaseDecision) SetOutcome(val SupportCaseDecisionOutcome) {
|
|
s.Outcome = val
|
|
}
|
|
|
|
// SetReason sets the value of Reason.
|
|
func (s *SupportCaseDecision) SetReason(val SupportCasePublicText) {
|
|
s.Reason = val
|
|
}
|
|
|
|
// SetDecidedAt sets the value of DecidedAt.
|
|
func (s *SupportCaseDecision) SetDecidedAt(val Timestamp) {
|
|
s.DecidedAt = val
|
|
}
|
|
|
|
// Outcome of a decision as the user sees it. The allowed outcomes depend on the case type.
|
|
//
|
|
// - upheld: the appeal or the complaint is upheld in full.
|
|
// - partially_upheld: the appeal or the complaint is upheld in part.
|
|
// - not_upheld: the appeal or the complaint is not upheld.
|
|
// - answered: a support case was answered.
|
|
// - assessed: the expert finished a manual assessment. The resulting category is part of the
|
|
// assessment results, not of the case.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseDecisionOutcome
|
|
type SupportCaseDecisionOutcome string
|
|
|
|
const (
|
|
SupportCaseDecisionOutcomeUpheld SupportCaseDecisionOutcome = "upheld"
|
|
SupportCaseDecisionOutcomePartiallyUpheld SupportCaseDecisionOutcome = "partially_upheld"
|
|
SupportCaseDecisionOutcomeNotUpheld SupportCaseDecisionOutcome = "not_upheld"
|
|
SupportCaseDecisionOutcomeAnswered SupportCaseDecisionOutcome = "answered"
|
|
SupportCaseDecisionOutcomeAssessed SupportCaseDecisionOutcome = "assessed"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseDecisionOutcome values.
|
|
func (SupportCaseDecisionOutcome) AllValues() []SupportCaseDecisionOutcome {
|
|
return []SupportCaseDecisionOutcome{
|
|
SupportCaseDecisionOutcomeUpheld,
|
|
SupportCaseDecisionOutcomePartiallyUpheld,
|
|
SupportCaseDecisionOutcomeNotUpheld,
|
|
SupportCaseDecisionOutcomeAnswered,
|
|
SupportCaseDecisionOutcomeAssessed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseDecisionOutcome) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseDecisionOutcomeUpheld:
|
|
return []byte(s), nil
|
|
case SupportCaseDecisionOutcomePartiallyUpheld:
|
|
return []byte(s), nil
|
|
case SupportCaseDecisionOutcomeNotUpheld:
|
|
return []byte(s), nil
|
|
case SupportCaseDecisionOutcomeAnswered:
|
|
return []byte(s), nil
|
|
case SupportCaseDecisionOutcomeAssessed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseDecisionOutcome) UnmarshalText(data []byte) error {
|
|
switch SupportCaseDecisionOutcome(data) {
|
|
case SupportCaseDecisionOutcomeUpheld:
|
|
*s = SupportCaseDecisionOutcomeUpheld
|
|
return nil
|
|
case SupportCaseDecisionOutcomePartiallyUpheld:
|
|
*s = SupportCaseDecisionOutcomePartiallyUpheld
|
|
return nil
|
|
case SupportCaseDecisionOutcomeNotUpheld:
|
|
*s = SupportCaseDecisionOutcomeNotUpheld
|
|
return nil
|
|
case SupportCaseDecisionOutcomeAnswered:
|
|
*s = SupportCaseDecisionOutcomeAnswered
|
|
return nil
|
|
case SupportCaseDecisionOutcomeAssessed:
|
|
*s = SupportCaseDecisionOutcomeAssessed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type SupportCaseDescription string
|
|
|
|
// One public event of the case history. Internal notes, assignments, evidence requests, and risk
|
|
// signals are never history events.
|
|
// Ref: #/components/schemas/SupportCaseEvent
|
|
type SupportCaseEvent struct {
|
|
// Position of the event in the history, starting at 1 and increasing by one.
|
|
Sequence int32 `json:"sequence"`
|
|
Kind SupportCaseEventKind `json:"kind"`
|
|
Actor SupportCaseActorKind `json:"actor"`
|
|
OccurredAt Timestamp `json:"occurred_at"`
|
|
// Status of the case after the event, or null for a reply.
|
|
Status NilSupportCaseStatus `json:"status"`
|
|
// Public text of the event, or null.
|
|
Message NilSupportCasePublicText `json:"message"`
|
|
}
|
|
|
|
// GetSequence returns the value of Sequence.
|
|
func (s *SupportCaseEvent) GetSequence() int32 {
|
|
return s.Sequence
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *SupportCaseEvent) GetKind() SupportCaseEventKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetActor returns the value of Actor.
|
|
func (s *SupportCaseEvent) GetActor() SupportCaseActorKind {
|
|
return s.Actor
|
|
}
|
|
|
|
// GetOccurredAt returns the value of OccurredAt.
|
|
func (s *SupportCaseEvent) GetOccurredAt() Timestamp {
|
|
return s.OccurredAt
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *SupportCaseEvent) GetStatus() NilSupportCaseStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetMessage returns the value of Message.
|
|
func (s *SupportCaseEvent) GetMessage() NilSupportCasePublicText {
|
|
return s.Message
|
|
}
|
|
|
|
// SetSequence sets the value of Sequence.
|
|
func (s *SupportCaseEvent) SetSequence(val int32) {
|
|
s.Sequence = val
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *SupportCaseEvent) SetKind(val SupportCaseEventKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetActor sets the value of Actor.
|
|
func (s *SupportCaseEvent) SetActor(val SupportCaseActorKind) {
|
|
s.Actor = val
|
|
}
|
|
|
|
// SetOccurredAt sets the value of OccurredAt.
|
|
func (s *SupportCaseEvent) SetOccurredAt(val Timestamp) {
|
|
s.OccurredAt = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *SupportCaseEvent) SetStatus(val NilSupportCaseStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetMessage sets the value of Message.
|
|
func (s *SupportCaseEvent) SetMessage(val NilSupportCasePublicText) {
|
|
s.Message = val
|
|
}
|
|
|
|
// Kind of a public history event. Adding a value is a contract change. A reply of the author, planned
|
|
// with `waiting_for_user`, is a `reply` with the actor `user`, and a later revision of a decision is
|
|
// another `decision` event, so neither needs a new value.
|
|
//
|
|
// - created: the case was created; `status` is `submitted`. For an appeal or a manual assessment, a
|
|
// `status_changed` event of the actor `system` to `waiting_expert` follows in the same transaction.
|
|
// - status_changed: the status changed; `status` is the new status, and `message` may explain a
|
|
// closure.
|
|
// - reply: support replied; `message` holds the reply and `status` is null.
|
|
// - decision: a decision was made; `status` is `resolved` and `message` holds the public reason.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseEventKind
|
|
type SupportCaseEventKind string
|
|
|
|
const (
|
|
SupportCaseEventKindCreated SupportCaseEventKind = "created"
|
|
SupportCaseEventKindStatusChanged SupportCaseEventKind = "status_changed"
|
|
SupportCaseEventKindReply SupportCaseEventKind = "reply"
|
|
SupportCaseEventKindDecision SupportCaseEventKind = "decision"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseEventKind values.
|
|
func (SupportCaseEventKind) AllValues() []SupportCaseEventKind {
|
|
return []SupportCaseEventKind{
|
|
SupportCaseEventKindCreated,
|
|
SupportCaseEventKindStatusChanged,
|
|
SupportCaseEventKindReply,
|
|
SupportCaseEventKindDecision,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseEventKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseEventKindCreated:
|
|
return []byte(s), nil
|
|
case SupportCaseEventKindStatusChanged:
|
|
return []byte(s), nil
|
|
case SupportCaseEventKindReply:
|
|
return []byte(s), nil
|
|
case SupportCaseEventKindDecision:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseEventKind) UnmarshalText(data []byte) error {
|
|
switch SupportCaseEventKind(data) {
|
|
case SupportCaseEventKindCreated:
|
|
*s = SupportCaseEventKindCreated
|
|
return nil
|
|
case SupportCaseEventKindStatusChanged:
|
|
*s = SupportCaseEventKindStatusChanged
|
|
return nil
|
|
case SupportCaseEventKindReply:
|
|
*s = SupportCaseEventKindReply
|
|
return nil
|
|
case SupportCaseEventKindDecision:
|
|
*s = SupportCaseEventKindDecision
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Reference to the category that a grade appeal disputes: an assessment attempt of the caller in a
|
|
// terminal state, or a `manual_assessment` case of the caller that is `resolved` with the outcome
|
|
// `assessed`, for a category that an expert assigned without an attempt. Any other object type fails
|
|
// validation.
|
|
// Ref: #/components/schemas/SupportCaseGradeAppealReference
|
|
type SupportCaseGradeAppealReference struct {
|
|
Type SupportCaseGradeAppealReferenceType `json:"type"`
|
|
// Identifier of the attempt or the case.
|
|
ID uuid.UUID `json:"id"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseGradeAppealReference) GetType() SupportCaseGradeAppealReferenceType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCaseGradeAppealReference) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseGradeAppealReference) SetType(val SupportCaseGradeAppealReferenceType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCaseGradeAppealReference) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
type SupportCaseGradeAppealReferenceType string
|
|
|
|
const (
|
|
SupportCaseGradeAppealReferenceTypeAssessmentAttempt SupportCaseGradeAppealReferenceType = "assessment_attempt"
|
|
SupportCaseGradeAppealReferenceTypeSupportCase SupportCaseGradeAppealReferenceType = "support_case"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseGradeAppealReferenceType values.
|
|
func (SupportCaseGradeAppealReferenceType) AllValues() []SupportCaseGradeAppealReferenceType {
|
|
return []SupportCaseGradeAppealReferenceType{
|
|
SupportCaseGradeAppealReferenceTypeAssessmentAttempt,
|
|
SupportCaseGradeAppealReferenceTypeSupportCase,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseGradeAppealReferenceType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseGradeAppealReferenceTypeAssessmentAttempt:
|
|
return []byte(s), nil
|
|
case SupportCaseGradeAppealReferenceTypeSupportCase:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseGradeAppealReferenceType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseGradeAppealReferenceType(data) {
|
|
case SupportCaseGradeAppealReferenceTypeAssessmentAttempt:
|
|
*s = SupportCaseGradeAppealReferenceTypeAssessmentAttempt
|
|
return nil
|
|
case SupportCaseGradeAppealReferenceTypeSupportCase:
|
|
*s = SupportCaseGradeAppealReferenceTypeSupportCase
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// SupportCaseHeaders wraps SupportCase with response headers.
|
|
type SupportCaseHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response SupportCase
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *SupportCaseHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *SupportCaseHeaders) GetResponse() SupportCase {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *SupportCaseHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *SupportCaseHeaders) SetResponse(val SupportCase) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*SupportCaseHeaders) createMySupportCaseRes() {}
|
|
func (*SupportCaseHeaders) getMySupportCaseRes() {}
|
|
|
|
// One page of the cases of the current account, newest first by creation time.
|
|
// Ref: #/components/schemas/SupportCaseList
|
|
type SupportCaseList struct {
|
|
// Case summaries of the page.
|
|
Items []SupportCaseSummary `json:"items"`
|
|
Page PageInfo `json:"page"`
|
|
}
|
|
|
|
// GetItems returns the value of Items.
|
|
func (s *SupportCaseList) GetItems() []SupportCaseSummary {
|
|
return s.Items
|
|
}
|
|
|
|
// GetPage returns the value of Page.
|
|
func (s *SupportCaseList) GetPage() PageInfo {
|
|
return s.Page
|
|
}
|
|
|
|
// SetItems sets the value of Items.
|
|
func (s *SupportCaseList) SetItems(val []SupportCaseSummary) {
|
|
s.Items = val
|
|
}
|
|
|
|
// SetPage sets the value of Page.
|
|
func (s *SupportCaseList) SetPage(val PageInfo) {
|
|
s.Page = val
|
|
}
|
|
|
|
// SupportCaseListHeaders wraps SupportCaseList with response headers.
|
|
type SupportCaseListHeaders struct {
|
|
CacheControl CacheControlNoStore
|
|
Response SupportCaseList
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *SupportCaseListHeaders) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *SupportCaseListHeaders) GetResponse() SupportCaseList {
|
|
return s.Response
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *SupportCaseListHeaders) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *SupportCaseListHeaders) SetResponse(val SupportCaseList) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*SupportCaseListHeaders) listMySupportCasesRes() {}
|
|
|
|
type SupportCaseNumber string
|
|
|
|
// Typed reference to an object that the case is about. The server checks on creation that the caller
|
|
// may see the object; an unknown object and an object of someone else both answer 404 not_found, so a
|
|
// reference never reveals whether another person's object exists. The case keeps only the type and the
|
|
// identifier, never a copy of the object.
|
|
// Ref: #/components/schemas/SupportCaseObjectReference
|
|
type SupportCaseObjectReference struct {
|
|
Type SupportCaseObjectType `json:"type"`
|
|
// Identifier of the object.
|
|
ID uuid.UUID `json:"id"`
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseObjectReference) GetType() SupportCaseObjectType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCaseObjectReference) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseObjectReference) SetType(val SupportCaseObjectType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCaseObjectReference) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// Kind of object that a case refers to. Each case type accepts only some of them. Adding a value is a
|
|
// contract change: generated clients reject an unknown value. Planned values: `vacancy` and
|
|
// `application` with the vacancies and protected applications of PRD FR16, and a profile finding with
|
|
// profile analysis.
|
|
//
|
|
// - assessment_attempt: an assessment attempt of the caller.
|
|
// - organization: an organization that the caller can see.
|
|
// - invitation: an invitation addressed to the caller. Invitations are in the contract but not
|
|
// implemented yet; until they are, every invitation reference answers 404 not_found.
|
|
// - support_case: another case of the caller, for example the resolved manual assessment that a grade
|
|
// appeal disputes.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseObjectType
|
|
type SupportCaseObjectType string
|
|
|
|
const (
|
|
SupportCaseObjectTypeAssessmentAttempt SupportCaseObjectType = "assessment_attempt"
|
|
SupportCaseObjectTypeOrganization SupportCaseObjectType = "organization"
|
|
SupportCaseObjectTypeInvitation SupportCaseObjectType = "invitation"
|
|
SupportCaseObjectTypeSupportCase SupportCaseObjectType = "support_case"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseObjectType values.
|
|
func (SupportCaseObjectType) AllValues() []SupportCaseObjectType {
|
|
return []SupportCaseObjectType{
|
|
SupportCaseObjectTypeAssessmentAttempt,
|
|
SupportCaseObjectTypeOrganization,
|
|
SupportCaseObjectTypeInvitation,
|
|
SupportCaseObjectTypeSupportCase,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseObjectType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseObjectTypeAssessmentAttempt:
|
|
return []byte(s), nil
|
|
case SupportCaseObjectTypeOrganization:
|
|
return []byte(s), nil
|
|
case SupportCaseObjectTypeInvitation:
|
|
return []byte(s), nil
|
|
case SupportCaseObjectTypeSupportCase:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseObjectType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseObjectType(data) {
|
|
case SupportCaseObjectTypeAssessmentAttempt:
|
|
*s = SupportCaseObjectTypeAssessmentAttempt
|
|
return nil
|
|
case SupportCaseObjectTypeOrganization:
|
|
*s = SupportCaseObjectTypeOrganization
|
|
return nil
|
|
case SupportCaseObjectTypeInvitation:
|
|
*s = SupportCaseObjectTypeInvitation
|
|
return nil
|
|
case SupportCaseObjectTypeSupportCase:
|
|
*s = SupportCaseObjectTypeSupportCase
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type SupportCasePublicText string
|
|
|
|
// Processing status of a case. Only the server changes it; no request field sets it. Adding a value is
|
|
// a contract change: generated clients reject an unknown value.
|
|
//
|
|
// - submitted: the case was accepted and waits in its queue.
|
|
// - in_review: support or a moderator works on it.
|
|
// - waiting_for_user: support asked the author for more detail. Not set yet: it starts with the
|
|
// planned operation that lets the author reply, and until then no case has this status.
|
|
// - waiting_expert: a grade appeal, an anti-cheat appeal, or a manual assessment waits for a subject
|
|
// expert. The server sets it in the same transaction as the creation of such a case. The case stays
|
|
// here until a person decides; it is never resolved by the passing of time.
|
|
// - resolved: terminal; a decision was made and `decision` holds its outcome and public reason.
|
|
// - closed: terminal; the case ended without a decision on the merits, for example as a duplicate of
|
|
// another case. The last history event says why.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseStatus
|
|
type SupportCaseStatus string
|
|
|
|
const (
|
|
SupportCaseStatusSubmitted SupportCaseStatus = "submitted"
|
|
SupportCaseStatusInReview SupportCaseStatus = "in_review"
|
|
SupportCaseStatusWaitingForUser SupportCaseStatus = "waiting_for_user"
|
|
SupportCaseStatusWaitingExpert SupportCaseStatus = "waiting_expert"
|
|
SupportCaseStatusResolved SupportCaseStatus = "resolved"
|
|
SupportCaseStatusClosed SupportCaseStatus = "closed"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseStatus values.
|
|
func (SupportCaseStatus) AllValues() []SupportCaseStatus {
|
|
return []SupportCaseStatus{
|
|
SupportCaseStatusSubmitted,
|
|
SupportCaseStatusInReview,
|
|
SupportCaseStatusWaitingForUser,
|
|
SupportCaseStatusWaitingExpert,
|
|
SupportCaseStatusResolved,
|
|
SupportCaseStatusClosed,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseStatusSubmitted:
|
|
return []byte(s), nil
|
|
case SupportCaseStatusInReview:
|
|
return []byte(s), nil
|
|
case SupportCaseStatusWaitingForUser:
|
|
return []byte(s), nil
|
|
case SupportCaseStatusWaitingExpert:
|
|
return []byte(s), nil
|
|
case SupportCaseStatusResolved:
|
|
return []byte(s), nil
|
|
case SupportCaseStatusClosed:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseStatus) UnmarshalText(data []byte) error {
|
|
switch SupportCaseStatus(data) {
|
|
case SupportCaseStatusSubmitted:
|
|
*s = SupportCaseStatusSubmitted
|
|
return nil
|
|
case SupportCaseStatusInReview:
|
|
*s = SupportCaseStatusInReview
|
|
return nil
|
|
case SupportCaseStatusWaitingForUser:
|
|
*s = SupportCaseStatusWaitingForUser
|
|
return nil
|
|
case SupportCaseStatusWaitingExpert:
|
|
*s = SupportCaseStatusWaitingExpert
|
|
return nil
|
|
case SupportCaseStatusResolved:
|
|
*s = SupportCaseStatusResolved
|
|
return nil
|
|
case SupportCaseStatusClosed:
|
|
*s = SupportCaseStatusClosed
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Case in a list: the fields that a list of cases shows, without the description and the history.
|
|
// GetMySupportCase returns the full case.
|
|
// Ref: #/components/schemas/SupportCaseSummary
|
|
type SupportCaseSummary struct {
|
|
// Case identifier.
|
|
ID uuid.UUID `json:"id"`
|
|
Number SupportCaseNumber `json:"number"`
|
|
Type SupportCaseType `json:"type"`
|
|
Status SupportCaseStatus `json:"status"`
|
|
// Object that the case is about, or null.
|
|
Object NilSupportCaseObjectReference `json:"object"`
|
|
// Category of the case, or null.
|
|
AssessmentTarget NilSupportCaseAssessmentTarget `json:"assessment_target"`
|
|
ResponseTarget SupportResponseTarget `json:"response_target"`
|
|
// Outcome of the decision once the case is `resolved`, otherwise null.
|
|
DecisionOutcome NilSupportCaseDecisionOutcome `json:"decision_outcome"`
|
|
CreatedAt Timestamp `json:"created_at"`
|
|
UpdatedAt Timestamp `json:"updated_at"`
|
|
}
|
|
|
|
// GetID returns the value of ID.
|
|
func (s *SupportCaseSummary) GetID() uuid.UUID {
|
|
return s.ID
|
|
}
|
|
|
|
// GetNumber returns the value of Number.
|
|
func (s *SupportCaseSummary) GetNumber() SupportCaseNumber {
|
|
return s.Number
|
|
}
|
|
|
|
// GetType returns the value of Type.
|
|
func (s *SupportCaseSummary) GetType() SupportCaseType {
|
|
return s.Type
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *SupportCaseSummary) GetStatus() SupportCaseStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetObject returns the value of Object.
|
|
func (s *SupportCaseSummary) GetObject() NilSupportCaseObjectReference {
|
|
return s.Object
|
|
}
|
|
|
|
// GetAssessmentTarget returns the value of AssessmentTarget.
|
|
func (s *SupportCaseSummary) GetAssessmentTarget() NilSupportCaseAssessmentTarget {
|
|
return s.AssessmentTarget
|
|
}
|
|
|
|
// GetResponseTarget returns the value of ResponseTarget.
|
|
func (s *SupportCaseSummary) GetResponseTarget() SupportResponseTarget {
|
|
return s.ResponseTarget
|
|
}
|
|
|
|
// GetDecisionOutcome returns the value of DecisionOutcome.
|
|
func (s *SupportCaseSummary) GetDecisionOutcome() NilSupportCaseDecisionOutcome {
|
|
return s.DecisionOutcome
|
|
}
|
|
|
|
// GetCreatedAt returns the value of CreatedAt.
|
|
func (s *SupportCaseSummary) GetCreatedAt() Timestamp {
|
|
return s.CreatedAt
|
|
}
|
|
|
|
// GetUpdatedAt returns the value of UpdatedAt.
|
|
func (s *SupportCaseSummary) GetUpdatedAt() Timestamp {
|
|
return s.UpdatedAt
|
|
}
|
|
|
|
// SetID sets the value of ID.
|
|
func (s *SupportCaseSummary) SetID(val uuid.UUID) {
|
|
s.ID = val
|
|
}
|
|
|
|
// SetNumber sets the value of Number.
|
|
func (s *SupportCaseSummary) SetNumber(val SupportCaseNumber) {
|
|
s.Number = val
|
|
}
|
|
|
|
// SetType sets the value of Type.
|
|
func (s *SupportCaseSummary) SetType(val SupportCaseType) {
|
|
s.Type = val
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *SupportCaseSummary) SetStatus(val SupportCaseStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetObject sets the value of Object.
|
|
func (s *SupportCaseSummary) SetObject(val NilSupportCaseObjectReference) {
|
|
s.Object = val
|
|
}
|
|
|
|
// SetAssessmentTarget sets the value of AssessmentTarget.
|
|
func (s *SupportCaseSummary) SetAssessmentTarget(val NilSupportCaseAssessmentTarget) {
|
|
s.AssessmentTarget = val
|
|
}
|
|
|
|
// SetResponseTarget sets the value of ResponseTarget.
|
|
func (s *SupportCaseSummary) SetResponseTarget(val SupportResponseTarget) {
|
|
s.ResponseTarget = val
|
|
}
|
|
|
|
// SetDecisionOutcome sets the value of DecisionOutcome.
|
|
func (s *SupportCaseSummary) SetDecisionOutcome(val NilSupportCaseDecisionOutcome) {
|
|
s.DecisionOutcome = val
|
|
}
|
|
|
|
// SetCreatedAt sets the value of CreatedAt.
|
|
func (s *SupportCaseSummary) SetCreatedAt(val Timestamp) {
|
|
s.CreatedAt = val
|
|
}
|
|
|
|
// SetUpdatedAt sets the value of UpdatedAt.
|
|
func (s *SupportCaseSummary) SetUpdatedAt(val Timestamp) {
|
|
s.UpdatedAt = val
|
|
}
|
|
|
|
// Kind of the case. It fixes the allowed object reference, the type-specific fields, the response
|
|
// target, and the queue that handles the case.
|
|
//
|
|
// - support: a question or a problem, for example an assessment that is not available or a failed
|
|
// sandbox run. Candidate and employer accounts.
|
|
// - complaint: a complaint about an organization or an offer, including a breach of the salary terms
|
|
// or a disclosure of personal data (PRD FR18). Candidate accounts.
|
|
// - grade_appeal: an appeal of a category the caller received: the result of one own assessment
|
|
// attempt, or the outcome of one own resolved manual assessment case. An expert reviews it, and the
|
|
// original result stays in the history. Candidate accounts.
|
|
// - anticheat_appeal: an appeal of an anti-cheat review decision on one own assessment attempt.
|
|
// Candidate accounts.
|
|
// - manual_assessment: a request for a manual assessment of a category by a subject expert with the
|
|
// same rubric, the alternative to automated categorization (consent C3). Candidate accounts.
|
|
//
|
|
// Ref: #/components/schemas/SupportCaseType
|
|
type SupportCaseType string
|
|
|
|
const (
|
|
SupportCaseTypeSupport SupportCaseType = "support"
|
|
SupportCaseTypeComplaint SupportCaseType = "complaint"
|
|
SupportCaseTypeGradeAppeal SupportCaseType = "grade_appeal"
|
|
SupportCaseTypeAnticheatAppeal SupportCaseType = "anticheat_appeal"
|
|
SupportCaseTypeManualAssessment SupportCaseType = "manual_assessment"
|
|
)
|
|
|
|
// AllValues returns all SupportCaseType values.
|
|
func (SupportCaseType) AllValues() []SupportCaseType {
|
|
return []SupportCaseType{
|
|
SupportCaseTypeSupport,
|
|
SupportCaseTypeComplaint,
|
|
SupportCaseTypeGradeAppeal,
|
|
SupportCaseTypeAnticheatAppeal,
|
|
SupportCaseTypeManualAssessment,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportCaseType) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportCaseTypeSupport:
|
|
return []byte(s), nil
|
|
case SupportCaseTypeComplaint:
|
|
return []byte(s), nil
|
|
case SupportCaseTypeGradeAppeal:
|
|
return []byte(s), nil
|
|
case SupportCaseTypeAnticheatAppeal:
|
|
return []byte(s), nil
|
|
case SupportCaseTypeManualAssessment:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportCaseType) UnmarshalText(data []byte) error {
|
|
switch SupportCaseType(data) {
|
|
case SupportCaseTypeSupport:
|
|
*s = SupportCaseTypeSupport
|
|
return nil
|
|
case SupportCaseTypeComplaint:
|
|
*s = SupportCaseTypeComplaint
|
|
return nil
|
|
case SupportCaseTypeGradeAppeal:
|
|
*s = SupportCaseTypeGradeAppeal
|
|
return nil
|
|
case SupportCaseTypeAnticheatAppeal:
|
|
*s = SupportCaseTypeAnticheatAppeal
|
|
return nil
|
|
case SupportCaseTypeManualAssessment:
|
|
*s = SupportCaseTypeManualAssessment
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Operational target for the answer to the case (PRD FR18: a case gets a number, a status, and a
|
|
// response deadline). The server fixes it on creation from the product policy version and the
|
|
// configured business calendar; it is a goal of the team, not a deadline set by law. The target is met
|
|
// by the first public reply, a decision, or a closure for `support` and `complaint`, and only by a
|
|
// decision or a closure for the appeals and `manual_assessment`. Missing the target never closes the
|
|
// case, never decides it, and never changes a grade.
|
|
// Ref: #/components/schemas/SupportResponseTarget
|
|
type SupportResponseTarget struct {
|
|
// Nature of the target. `operational_goal` is a goal of the team that clients label as such, never as
|
|
// a legal deadline.
|
|
Kind SupportResponseTargetKind `json:"kind"`
|
|
// Length of the target in business days of the policy version, for example 5 for a manual assessment
|
|
// and 10 for an appeal.
|
|
BusinessDays int32 `json:"business_days"`
|
|
DueAt Timestamp `json:"due_at"`
|
|
// Time the target was met, or null while it is not.
|
|
AnsweredAt NilTimestamp `json:"answered_at"`
|
|
// Whether the target was missed: it was met after `due_at`, or it is not met and `due_at` has passed
|
|
// at the time of the response.
|
|
Late bool `json:"late"`
|
|
// Number of the `product` policy version that fixed the target.
|
|
PolicyVersion int32 `json:"policy_version"`
|
|
}
|
|
|
|
// GetKind returns the value of Kind.
|
|
func (s *SupportResponseTarget) GetKind() SupportResponseTargetKind {
|
|
return s.Kind
|
|
}
|
|
|
|
// GetBusinessDays returns the value of BusinessDays.
|
|
func (s *SupportResponseTarget) GetBusinessDays() int32 {
|
|
return s.BusinessDays
|
|
}
|
|
|
|
// GetDueAt returns the value of DueAt.
|
|
func (s *SupportResponseTarget) GetDueAt() Timestamp {
|
|
return s.DueAt
|
|
}
|
|
|
|
// GetAnsweredAt returns the value of AnsweredAt.
|
|
func (s *SupportResponseTarget) GetAnsweredAt() NilTimestamp {
|
|
return s.AnsweredAt
|
|
}
|
|
|
|
// GetLate returns the value of Late.
|
|
func (s *SupportResponseTarget) GetLate() bool {
|
|
return s.Late
|
|
}
|
|
|
|
// GetPolicyVersion returns the value of PolicyVersion.
|
|
func (s *SupportResponseTarget) GetPolicyVersion() int32 {
|
|
return s.PolicyVersion
|
|
}
|
|
|
|
// SetKind sets the value of Kind.
|
|
func (s *SupportResponseTarget) SetKind(val SupportResponseTargetKind) {
|
|
s.Kind = val
|
|
}
|
|
|
|
// SetBusinessDays sets the value of BusinessDays.
|
|
func (s *SupportResponseTarget) SetBusinessDays(val int32) {
|
|
s.BusinessDays = val
|
|
}
|
|
|
|
// SetDueAt sets the value of DueAt.
|
|
func (s *SupportResponseTarget) SetDueAt(val Timestamp) {
|
|
s.DueAt = val
|
|
}
|
|
|
|
// SetAnsweredAt sets the value of AnsweredAt.
|
|
func (s *SupportResponseTarget) SetAnsweredAt(val NilTimestamp) {
|
|
s.AnsweredAt = val
|
|
}
|
|
|
|
// SetLate sets the value of Late.
|
|
func (s *SupportResponseTarget) SetLate(val bool) {
|
|
s.Late = val
|
|
}
|
|
|
|
// SetPolicyVersion sets the value of PolicyVersion.
|
|
func (s *SupportResponseTarget) SetPolicyVersion(val int32) {
|
|
s.PolicyVersion = val
|
|
}
|
|
|
|
// Nature of the target. `operational_goal` is a goal of the team that clients label as such, never as
|
|
// a legal deadline.
|
|
type SupportResponseTargetKind string
|
|
|
|
const (
|
|
SupportResponseTargetKindOperationalGoal SupportResponseTargetKind = "operational_goal"
|
|
)
|
|
|
|
// AllValues returns all SupportResponseTargetKind values.
|
|
func (SupportResponseTargetKind) AllValues() []SupportResponseTargetKind {
|
|
return []SupportResponseTargetKind{
|
|
SupportResponseTargetKindOperationalGoal,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s SupportResponseTargetKind) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case SupportResponseTargetKindOperationalGoal:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *SupportResponseTargetKind) UnmarshalText(data []byte) error {
|
|
switch SupportResponseTargetKind(data) {
|
|
case SupportResponseTargetKindOperationalGoal:
|
|
*s = SupportResponseTargetKindOperationalGoal
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Programming language in which assessment tasks of a specialization are offered and solved. It is the
|
|
// language of the task bank, not the candidate's platform stack, and it never forms a separate
|
|
// category. Only banks that offer a choice of language define task languages; the first Backend bank
|
|
// offers Python and Go. Adding a value is a contract change.
|
|
// Ref: #/components/schemas/TaskLanguage
|
|
type TaskLanguage string
|
|
|
|
const (
|
|
TaskLanguagePython TaskLanguage = "python"
|
|
TaskLanguageGo TaskLanguage = "go"
|
|
)
|
|
|
|
// AllValues returns all TaskLanguage values.
|
|
func (TaskLanguage) AllValues() []TaskLanguage {
|
|
return []TaskLanguage{
|
|
TaskLanguagePython,
|
|
TaskLanguageGo,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s TaskLanguage) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case TaskLanguagePython:
|
|
return []byte(s), nil
|
|
case TaskLanguageGo:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *TaskLanguage) UnmarshalText(data []byte) error {
|
|
switch TaskLanguage(data) {
|
|
case TaskLanguagePython:
|
|
*s = TaskLanguagePython
|
|
return nil
|
|
case TaskLanguageGo:
|
|
*s = TaskLanguageGo
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
// Assessment availability of a specialization, derived by the server from the published task banks at
|
|
// the time of the request. The MVP opens an assessment only for a category, a specialization and a
|
|
// grade, that has a published bank. `status` is `available` exactly when `grades` is not empty; for
|
|
// `in_development` both `grades` and `task_languages` are empty.
|
|
// Ref: #/components/schemas/TestAvailability
|
|
type TestAvailability struct {
|
|
Status TestAvailabilityStatus `json:"status"`
|
|
// Grades of the specialization with a published task bank, in ascending order. Only these categories
|
|
// can be assessed and confirmed.
|
|
Grades []GradeCode `json:"grades"`
|
|
// Task languages that the published bank offers for this specialization. Empty when the bank does not
|
|
// offer a choice of language, as for Network Engineer, or when no bank is published. The questionnaire
|
|
// accepts only these languages for the specialization.
|
|
TaskLanguages []TaskLanguage `json:"task_languages"`
|
|
// Short Russian note for the candidate, for example why the test is not available yet, or null. Plain
|
|
// text; the client shows it as text, never as HTML.
|
|
Note NilString `json:"note"`
|
|
}
|
|
|
|
// GetStatus returns the value of Status.
|
|
func (s *TestAvailability) GetStatus() TestAvailabilityStatus {
|
|
return s.Status
|
|
}
|
|
|
|
// GetGrades returns the value of Grades.
|
|
func (s *TestAvailability) GetGrades() []GradeCode {
|
|
return s.Grades
|
|
}
|
|
|
|
// GetTaskLanguages returns the value of TaskLanguages.
|
|
func (s *TestAvailability) GetTaskLanguages() []TaskLanguage {
|
|
return s.TaskLanguages
|
|
}
|
|
|
|
// GetNote returns the value of Note.
|
|
func (s *TestAvailability) GetNote() NilString {
|
|
return s.Note
|
|
}
|
|
|
|
// SetStatus sets the value of Status.
|
|
func (s *TestAvailability) SetStatus(val TestAvailabilityStatus) {
|
|
s.Status = val
|
|
}
|
|
|
|
// SetGrades sets the value of Grades.
|
|
func (s *TestAvailability) SetGrades(val []GradeCode) {
|
|
s.Grades = val
|
|
}
|
|
|
|
// SetTaskLanguages sets the value of TaskLanguages.
|
|
func (s *TestAvailability) SetTaskLanguages(val []TaskLanguage) {
|
|
s.TaskLanguages = val
|
|
}
|
|
|
|
// SetNote sets the value of Note.
|
|
func (s *TestAvailability) SetNote(val NilString) {
|
|
s.Note = val
|
|
}
|
|
|
|
// Whether an assessment can start for the specialization. `available` means that a published task bank
|
|
// exists for at least one grade, listed in `TestAvailability.grades`. `in_development` means that no
|
|
// grade of the specialization has a published bank yet; the specialization can still be chosen in the
|
|
// questionnaire, but no assessment starts and no category can be confirmed for it. Presence in the
|
|
// catalog or in demo data never means that a test is ready.
|
|
// Ref: #/components/schemas/TestAvailabilityStatus
|
|
type TestAvailabilityStatus string
|
|
|
|
const (
|
|
TestAvailabilityStatusAvailable TestAvailabilityStatus = "available"
|
|
TestAvailabilityStatusInDevelopment TestAvailabilityStatus = "in_development"
|
|
)
|
|
|
|
// AllValues returns all TestAvailabilityStatus values.
|
|
func (TestAvailabilityStatus) AllValues() []TestAvailabilityStatus {
|
|
return []TestAvailabilityStatus{
|
|
TestAvailabilityStatusAvailable,
|
|
TestAvailabilityStatusInDevelopment,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s TestAvailabilityStatus) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case TestAvailabilityStatusAvailable:
|
|
return []byte(s), nil
|
|
case TestAvailabilityStatusInDevelopment:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *TestAvailabilityStatus) UnmarshalText(data []byte) error {
|
|
switch TestAvailabilityStatus(data) {
|
|
case TestAvailabilityStatusAvailable:
|
|
*s = TestAvailabilityStatusAvailable
|
|
return nil
|
|
case TestAvailabilityStatusInDevelopment:
|
|
*s = TestAvailabilityStatusInDevelopment
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|
|
|
|
type Timestamp time.Time
|
|
|
|
// TooManyRequestsHeaders wraps Problem with response headers.
|
|
type TooManyRequestsHeaders struct {
|
|
RetryAfter OptInt32
|
|
Response Problem
|
|
}
|
|
|
|
// GetRetryAfter returns the value of RetryAfter.
|
|
func (s *TooManyRequestsHeaders) GetRetryAfter() OptInt32 {
|
|
return s.RetryAfter
|
|
}
|
|
|
|
// GetResponse returns the value of Response.
|
|
func (s *TooManyRequestsHeaders) GetResponse() Problem {
|
|
return s.Response
|
|
}
|
|
|
|
// SetRetryAfter sets the value of RetryAfter.
|
|
func (s *TooManyRequestsHeaders) SetRetryAfter(val OptInt32) {
|
|
s.RetryAfter = val
|
|
}
|
|
|
|
// SetResponse sets the value of Response.
|
|
func (s *TooManyRequestsHeaders) SetResponse(val Problem) {
|
|
s.Response = val
|
|
}
|
|
|
|
func (*TooManyRequestsHeaders) acceptMyInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) cancelMyInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) confirmEmailRes() {}
|
|
func (*TooManyRequestsHeaders) createMyAssessmentAttemptRes() {}
|
|
func (*TooManyRequestsHeaders) createMySupportCaseRes() {}
|
|
func (*TooManyRequestsHeaders) createOrganizationInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) createOrganizationNeedRes() {}
|
|
func (*TooManyRequestsHeaders) createOrganizationRes() {}
|
|
func (*TooManyRequestsHeaders) declineMyInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) hideOrganizationRes() {}
|
|
func (*TooManyRequestsHeaders) loginRes() {}
|
|
func (*TooManyRequestsHeaders) raiseOrganizationInvitationSalaryRes() {}
|
|
func (*TooManyRequestsHeaders) registerAccountRes() {}
|
|
func (*TooManyRequestsHeaders) resendEmailVerificationRes() {}
|
|
func (*TooManyRequestsHeaders) sendOrganizationInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) startMyAssessmentAttemptSessionRes() {}
|
|
func (*TooManyRequestsHeaders) submitMyAssessmentAnswerRes() {}
|
|
func (*TooManyRequestsHeaders) updateOrganizationInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) updateOrganizationNeedRes() {}
|
|
func (*TooManyRequestsHeaders) updateOrganizationRes() {}
|
|
func (*TooManyRequestsHeaders) viewMyInvitationRes() {}
|
|
func (*TooManyRequestsHeaders) withdrawOrganizationInvitationRes() {}
|
|
|
|
type UnhideOrganizationBadRequest Problem
|
|
|
|
func (*UnhideOrganizationBadRequest) unhideOrganizationRes() {}
|
|
|
|
type UnhideOrganizationForbidden Problem
|
|
|
|
func (*UnhideOrganizationForbidden) unhideOrganizationRes() {}
|
|
|
|
// UnhideOrganizationNoContent is response for UnhideOrganization operation.
|
|
type UnhideOrganizationNoContent struct {
|
|
CacheControl CacheControlNoStore
|
|
}
|
|
|
|
// GetCacheControl returns the value of CacheControl.
|
|
func (s *UnhideOrganizationNoContent) GetCacheControl() CacheControlNoStore {
|
|
return s.CacheControl
|
|
}
|
|
|
|
// SetCacheControl sets the value of CacheControl.
|
|
func (s *UnhideOrganizationNoContent) SetCacheControl(val CacheControlNoStore) {
|
|
s.CacheControl = val
|
|
}
|
|
|
|
func (*UnhideOrganizationNoContent) unhideOrganizationRes() {}
|
|
|
|
type UnhideOrganizationUnauthorized Problem
|
|
|
|
func (*UnhideOrganizationUnauthorized) unhideOrganizationRes() {}
|
|
|
|
type UpdateOrganizationBadRequest Problem
|
|
|
|
func (*UpdateOrganizationBadRequest) updateOrganizationRes() {}
|
|
|
|
type UpdateOrganizationForbidden Problem
|
|
|
|
func (*UpdateOrganizationForbidden) updateOrganizationRes() {}
|
|
|
|
type UpdateOrganizationInvitationBadRequest Problem
|
|
|
|
func (*UpdateOrganizationInvitationBadRequest) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationInvitationConflict Problem
|
|
|
|
func (*UpdateOrganizationInvitationConflict) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationInvitationForbidden Problem
|
|
|
|
func (*UpdateOrganizationInvitationForbidden) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationInvitationNotFound Problem
|
|
|
|
func (*UpdateOrganizationInvitationNotFound) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationInvitationPreconditionFailed Problem
|
|
|
|
func (*UpdateOrganizationInvitationPreconditionFailed) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationInvitationUnauthorized Problem
|
|
|
|
func (*UpdateOrganizationInvitationUnauthorized) updateOrganizationInvitationRes() {}
|
|
|
|
type UpdateOrganizationNeedBadRequest Problem
|
|
|
|
func (*UpdateOrganizationNeedBadRequest) updateOrganizationNeedRes() {}
|
|
|
|
type UpdateOrganizationNeedForbidden Problem
|
|
|
|
func (*UpdateOrganizationNeedForbidden) updateOrganizationNeedRes() {}
|
|
|
|
type UpdateOrganizationNeedNotFound Problem
|
|
|
|
func (*UpdateOrganizationNeedNotFound) updateOrganizationNeedRes() {}
|
|
|
|
type UpdateOrganizationNeedPreconditionFailed Problem
|
|
|
|
func (*UpdateOrganizationNeedPreconditionFailed) updateOrganizationNeedRes() {}
|
|
|
|
type UpdateOrganizationNeedUnauthorized Problem
|
|
|
|
func (*UpdateOrganizationNeedUnauthorized) updateOrganizationNeedRes() {}
|
|
|
|
type UpdateOrganizationNotFound Problem
|
|
|
|
func (*UpdateOrganizationNotFound) updateOrganizationRes() {}
|
|
|
|
type UpdateOrganizationPreconditionFailed Problem
|
|
|
|
func (*UpdateOrganizationPreconditionFailed) updateOrganizationRes() {}
|
|
|
|
type UpdateOrganizationUnauthorized Problem
|
|
|
|
func (*UpdateOrganizationUnauthorized) updateOrganizationRes() {}
|
|
|
|
type VerificationToken string
|
|
|
|
type ViewMyInvitationBadRequest Problem
|
|
|
|
func (*ViewMyInvitationBadRequest) viewMyInvitationRes() {}
|
|
|
|
type ViewMyInvitationForbidden Problem
|
|
|
|
func (*ViewMyInvitationForbidden) viewMyInvitationRes() {}
|
|
|
|
type ViewMyInvitationNotFound Problem
|
|
|
|
func (*ViewMyInvitationNotFound) viewMyInvitationRes() {}
|
|
|
|
type ViewMyInvitationUnauthorized Problem
|
|
|
|
func (*ViewMyInvitationUnauthorized) viewMyInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationBadRequest Problem
|
|
|
|
func (*WithdrawOrganizationInvitationBadRequest) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationConflict Problem
|
|
|
|
func (*WithdrawOrganizationInvitationConflict) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationForbidden Problem
|
|
|
|
func (*WithdrawOrganizationInvitationForbidden) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationNotFound Problem
|
|
|
|
func (*WithdrawOrganizationInvitationNotFound) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationPreconditionFailed Problem
|
|
|
|
func (*WithdrawOrganizationInvitationPreconditionFailed) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationUnauthorized Problem
|
|
|
|
func (*WithdrawOrganizationInvitationUnauthorized) withdrawOrganizationInvitationRes() {}
|
|
|
|
type WithdrawOrganizationInvitationUnprocessableEntity Problem
|
|
|
|
func (*WithdrawOrganizationInvitationUnprocessableEntity) withdrawOrganizationInvitationRes() {}
|
|
|
|
// Working context of the candidate's search. It holds no personal data such as an address or a city;
|
|
// location, relocation, and salary expectations belong to the candidate profile (`ProfileTerms`). The
|
|
// acceptable work formats live only here: the profile does not repeat them.
|
|
// Ref: #/components/schemas/WorkContext
|
|
type WorkContext struct {
|
|
// Acceptable work formats.
|
|
WorkFormats []WorkFormat `json:"work_formats"`
|
|
}
|
|
|
|
// GetWorkFormats returns the value of WorkFormats.
|
|
func (s *WorkContext) GetWorkFormats() []WorkFormat {
|
|
return s.WorkFormats
|
|
}
|
|
|
|
// SetWorkFormats sets the value of WorkFormats.
|
|
func (s *WorkContext) SetWorkFormats(val []WorkFormat) {
|
|
s.WorkFormats = val
|
|
}
|
|
|
|
// Acceptable work format: `remote`, `office`, or `hybrid`.
|
|
// Ref: #/components/schemas/WorkFormat
|
|
type WorkFormat string
|
|
|
|
const (
|
|
WorkFormatRemote WorkFormat = "remote"
|
|
WorkFormatOffice WorkFormat = "office"
|
|
WorkFormatHybrid WorkFormat = "hybrid"
|
|
)
|
|
|
|
// AllValues returns all WorkFormat values.
|
|
func (WorkFormat) AllValues() []WorkFormat {
|
|
return []WorkFormat{
|
|
WorkFormatRemote,
|
|
WorkFormatOffice,
|
|
WorkFormatHybrid,
|
|
}
|
|
}
|
|
|
|
// MarshalText implements encoding.TextMarshaler.
|
|
func (s WorkFormat) MarshalText() ([]byte, error) {
|
|
switch s {
|
|
case WorkFormatRemote:
|
|
return []byte(s), nil
|
|
case WorkFormatOffice:
|
|
return []byte(s), nil
|
|
case WorkFormatHybrid:
|
|
return []byte(s), nil
|
|
default:
|
|
return nil, errors.Errorf("invalid value: %q", s)
|
|
}
|
|
}
|
|
|
|
// UnmarshalText implements encoding.TextUnmarshaler.
|
|
func (s *WorkFormat) UnmarshalText(data []byte) error {
|
|
switch WorkFormat(data) {
|
|
case WorkFormatRemote:
|
|
*s = WorkFormatRemote
|
|
return nil
|
|
case WorkFormatOffice:
|
|
*s = WorkFormatOffice
|
|
return nil
|
|
case WorkFormatHybrid:
|
|
*s = WorkFormatHybrid
|
|
return nil
|
|
default:
|
|
return errors.Errorf("invalid value: %q", data)
|
|
}
|
|
}
|