Files
lincodex/backend/internal/adapter/primary/http/api/oas_schemas_gen.go
T

10445 lines
304 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)
}
// 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)
}
}
// 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
}
// Assessment attempt of the current candidate for one category, a specialization and a target grade.
// It shows the state, the fixed versions, the server deadline `expires_at` from the policy version,
// which the client clock never extends, the session limit, the progress, the item to answer now, and
// the practices. It never contains answer keys, the correctness of submitted answers, scores of single
// items, family or variant identifiers, seeds, hidden checks, or anti-cheat signals.
// Ref: #/components/schemas/AssessmentAttempt
type AssessmentAttempt struct {
// Attempt identifier.
ID uuid.UUID `json:"id"`
Version AssessmentAttemptVersion `json:"version"`
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"`
Mode AssessmentMode `json:"mode"`
State AssessmentAttemptState `json:"state"`
Versions AssessmentVersions `json:"versions"`
StartedAt Timestamp `json:"started_at"`
ExpiresAt Timestamp `json:"expires_at"`
// Session limit of the attempt, or null when its policy version 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 they were assigned: the `main` practice first, then an `additional` practice
// once finalize offers it. Empty only for a demo_basic attempt while code practice is disabled until
// the sandbox isolation is verified; its result then lists the `practice_not_included` limitation. A
// list rather than one field leaves room for more practices without a breaking change.
Practices []AssessmentPractice `json:"practices"`
}
// GetID returns the value of ID.
func (s *AssessmentAttempt) GetID() uuid.UUID {
return s.ID
}
// GetVersion returns the value of Version.
func (s *AssessmentAttempt) GetVersion() AssessmentAttemptVersion {
return s.Version
}
// GetSpecialization returns the value of Specialization.
func (s *AssessmentAttempt) GetSpecialization() SpecializationCode {
return s.Specialization
}
// GetTargetGrade returns the value of TargetGrade.
func (s *AssessmentAttempt) GetTargetGrade() GradeCode {
return s.TargetGrade
}
// GetTaskLanguage returns the value of TaskLanguage.
func (s *AssessmentAttempt) GetTaskLanguage() NilTaskLanguage {
return s.TaskLanguage
}
// GetMode returns the value of Mode.
func (s *AssessmentAttempt) GetMode() AssessmentMode {
return s.Mode
}
// GetState returns the value of State.
func (s *AssessmentAttempt) GetState() AssessmentAttemptState {
return s.State
}
// GetVersions returns the value of Versions.
func (s *AssessmentAttempt) GetVersions() AssessmentVersions {
return s.Versions
}
// GetStartedAt returns the value of StartedAt.
func (s *AssessmentAttempt) GetStartedAt() Timestamp {
return s.StartedAt
}
// GetExpiresAt returns the value of ExpiresAt.
func (s *AssessmentAttempt) GetExpiresAt() Timestamp {
return s.ExpiresAt
}
// GetSessions returns the value of Sessions.
func (s *AssessmentAttempt) GetSessions() NilAssessmentSessions {
return s.Sessions
}
// GetFinishedAt returns the value of FinishedAt.
func (s *AssessmentAttempt) GetFinishedAt() NilTimestamp {
return s.FinishedAt
}
// GetProgress returns the value of Progress.
func (s *AssessmentAttempt) GetProgress() AssessmentProgress {
return s.Progress
}
// GetCurrentItem returns the value of CurrentItem.
func (s *AssessmentAttempt) GetCurrentItem() NilAssessmentItem {
return s.CurrentItem
}
// GetPractices returns the value of Practices.
func (s *AssessmentAttempt) GetPractices() []AssessmentPractice {
return s.Practices
}
// SetID sets the value of ID.
func (s *AssessmentAttempt) SetID(val uuid.UUID) {
s.ID = val
}
// SetVersion sets the value of Version.
func (s *AssessmentAttempt) SetVersion(val AssessmentAttemptVersion) {
s.Version = val
}
// SetSpecialization sets the value of Specialization.
func (s *AssessmentAttempt) SetSpecialization(val SpecializationCode) {
s.Specialization = val
}
// SetTargetGrade sets the value of TargetGrade.
func (s *AssessmentAttempt) SetTargetGrade(val GradeCode) {
s.TargetGrade = val
}
// SetTaskLanguage sets the value of TaskLanguage.
func (s *AssessmentAttempt) SetTaskLanguage(val NilTaskLanguage) {
s.TaskLanguage = val
}
// SetMode sets the value of Mode.
func (s *AssessmentAttempt) SetMode(val AssessmentMode) {
s.Mode = val
}
// SetState sets the value of State.
func (s *AssessmentAttempt) SetState(val AssessmentAttemptState) {
s.State = val
}
// SetVersions sets the value of Versions.
func (s *AssessmentAttempt) SetVersions(val AssessmentVersions) {
s.Versions = val
}
// SetStartedAt sets the value of StartedAt.
func (s *AssessmentAttempt) SetStartedAt(val Timestamp) {
s.StartedAt = val
}
// SetExpiresAt sets the value of ExpiresAt.
func (s *AssessmentAttempt) SetExpiresAt(val Timestamp) {
s.ExpiresAt = val
}
// SetSessions sets the value of Sessions.
func (s *AssessmentAttempt) SetSessions(val NilAssessmentSessions) {
s.Sessions = val
}
// SetFinishedAt sets the value of FinishedAt.
func (s *AssessmentAttempt) SetFinishedAt(val NilTimestamp) {
s.FinishedAt = val
}
// SetProgress sets the value of Progress.
func (s *AssessmentAttempt) SetProgress(val AssessmentProgress) {
s.Progress = val
}
// SetCurrentItem sets the value of CurrentItem.
func (s *AssessmentAttempt) SetCurrentItem(val NilAssessmentItem) {
s.CurrentItem = val
}
// SetPractices sets the value of Practices.
func (s *AssessmentAttempt) SetPractices(val []AssessmentPractice) {
s.Practices = val
}
// Category to assess: a specialization and the target grade, with the task language. The candidate
// comes from the session. The mode and versions are chosen by the server; unknown fields such as
// `mode`, `seed`, or `score` are rejected.
// Ref: #/components/schemas/AssessmentAttemptCreate
type AssessmentAttemptCreate struct {
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"`
}
// GetSpecialization returns the value of Specialization.
func (s *AssessmentAttemptCreate) GetSpecialization() SpecializationCode {
return s.Specialization
}
// GetTargetGrade returns the value of TargetGrade.
func (s *AssessmentAttemptCreate) GetTargetGrade() GradeCode {
return s.TargetGrade
}
// GetTaskLanguage returns the value of TaskLanguage.
func (s *AssessmentAttemptCreate) GetTaskLanguage() NilTaskLanguage {
return s.TaskLanguage
}
// SetSpecialization sets the value of Specialization.
func (s *AssessmentAttemptCreate) SetSpecialization(val SpecializationCode) {
s.Specialization = val
}
// SetTargetGrade sets the value of TargetGrade.
func (s *AssessmentAttemptCreate) SetTargetGrade(val GradeCode) {
s.TargetGrade = val
}
// SetTaskLanguage sets the value of TaskLanguage.
func (s *AssessmentAttemptCreate) SetTaskLanguage(val NilTaskLanguage) {
s.TaskLanguage = val
}
// 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) submitMyAssessmentAnswerRes() {}
// 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 practice submitted before that and still
// `pending` is graded first. Then the server decides without another command: `ready_to_finalize` is
// finalized and 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() {}
// 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
}
// 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"`
// Mode that an attempt would use, or null when the status is `insufficient_bank`.
Mode NilAssessmentMode `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() NilAssessmentMode {
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 NilAssessmentMode) {
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 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)
}
}
// Measurement method of an attempt. The server selects it from the published task bank of the
// category; the client never chooses it.
//
// - demo_basic: a fixed form of reviewed demo items scored by their keys against the pass mark of the
// versioned basic grading policy. It computes no ability estimate, standard error, or probability,
// so every uncertainty field of its result is null, its thresholds are uncalibrated, and its
// decision is binary: it never offers an additional practice.
// - adaptive: the adaptive test on task families with an ability estimate, its standard error, and
// the probability of reaching the grade threshold, as the versioned assessment policy defines them.
// A probability in the band below confirmation offers one additional practice in the same attempt.
//
// Adding a value is a contract change.
// Ref: #/components/schemas/AssessmentMode
type AssessmentMode string
const (
AssessmentModeDemoBasic AssessmentMode = "demo_basic"
AssessmentModeAdaptive AssessmentMode = "adaptive"
)
// AllValues returns all AssessmentMode values.
func (AssessmentMode) AllValues() []AssessmentMode {
return []AssessmentMode{
AssessmentModeDemoBasic,
AssessmentModeAdaptive,
}
}
// MarshalText implements encoding.TextMarshaler.
func (s AssessmentMode) MarshalText() ([]byte, error) {
switch s {
case AssessmentModeDemoBasic:
return []byte(s), nil
case AssessmentModeAdaptive:
return []byte(s), nil
default:
return nil, errors.Errorf("invalid value: %q", s)
}
}
// UnmarshalText implements encoding.TextUnmarshaler.
func (s *AssessmentMode) UnmarshalText(data []byte) error {
switch AssessmentMode(data) {
case AssessmentModeDemoBasic:
*s = AssessmentModeDemoBasic
return nil
case AssessmentModeAdaptive:
*s = AssessmentModeAdaptive
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, and whether it counts against the retry rules.
//
// - expired: the time or session limit passed before the candidate finished the item part. It is the
// candidate's attempt: it counts toward the attempt limit and starts the same-grade retry interval.
// - practice_incomplete: the item part was done, but the candidate did not submit the main practice
// before the limit. It counts like `expired`.
// - insufficient_bank: the bank could not supply the required coverage within the limit. It is a
// platform limitation: it never counts toward the attempt limit and starts no retry interval.
// - 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: it never counts toward the attempt limit and starts no retry interval.
//
// 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
}
// Immutable result of a terminal attempt, visible only to its candidate. It records the method, the
// versions, the decision, its uncertainty, and its limitations; a later policy, bank, or algorithm
// version never changes it. It never contains answers, per-item correctness, answer keys, seeds,
// hidden checks, or anti-cheat signals. Fields that the method does not compute are null, never zero:
// demo_basic has null `uncertainty` and `strength`, and adaptive has null `basic_score`.
// Ref: #/components/schemas/AssessmentResult
type AssessmentResult struct {
AttemptID uuid.UUID `json:"attempt_id"`
Specialization SpecializationCode `json:"specialization"`
TargetGrade GradeCode `json:"target_grade"`
TaskLanguage NilTaskLanguage `json:"task_language"`
Mode AssessmentMode `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 *AssessmentResult) GetAttemptID() uuid.UUID {
return s.AttemptID
}
// GetSpecialization returns the value of Specialization.
func (s *AssessmentResult) GetSpecialization() SpecializationCode {
return s.Specialization
}
// GetTargetGrade returns the value of TargetGrade.
func (s *AssessmentResult) GetTargetGrade() GradeCode {
return s.TargetGrade
}
// GetTaskLanguage returns the value of TaskLanguage.
func (s *AssessmentResult) GetTaskLanguage() NilTaskLanguage {
return s.TaskLanguage
}
// GetMode returns the value of Mode.
func (s *AssessmentResult) GetMode() AssessmentMode {
return s.Mode
}
// GetVersions returns the value of Versions.
func (s *AssessmentResult) GetVersions() AssessmentVersions {
return s.Versions
}
// GetOutcome returns the value of Outcome.
func (s *AssessmentResult) GetOutcome() AssessmentOutcome {
return s.Outcome
}
// GetNotDeterminedReason returns the value of NotDeterminedReason.
func (s *AssessmentResult) GetNotDeterminedReason() NilAssessmentNotDeterminedReason {
return s.NotDeterminedReason
}
// GetConfirmedGrade returns the value of ConfirmedGrade.
func (s *AssessmentResult) GetConfirmedGrade() NilGradeCode {
return s.ConfirmedGrade
}
// GetPreviousConfirmedGrade returns the value of PreviousConfirmedGrade.
func (s *AssessmentResult) GetPreviousConfirmedGrade() NilGradeCode {
return s.PreviousConfirmedGrade
}
// GetStrength returns the value of Strength.
func (s *AssessmentResult) GetStrength() NilAssessmentStrength {
return s.Strength
}
// GetCalibrationStatus returns the value of CalibrationStatus.
func (s *AssessmentResult) GetCalibrationStatus() CalibrationStatus {
return s.CalibrationStatus
}
// GetLimitations returns the value of Limitations.
func (s *AssessmentResult) GetLimitations() []AssessmentLimitation {
return s.Limitations
}
// GetUncertainty returns the value of Uncertainty.
func (s *AssessmentResult) GetUncertainty() NilAssessmentUncertainty {
return s.Uncertainty
}
// GetBasicScore returns the value of BasicScore.
func (s *AssessmentResult) GetBasicScore() NilBasicScore {
return s.BasicScore
}
// GetPractices returns the value of Practices.
func (s *AssessmentResult) GetPractices() []AssessmentPracticeResult {
return s.Practices
}
// GetGaps returns the value of Gaps.
func (s *AssessmentResult) GetGaps() []AssessmentGap {
return s.Gaps
}
// GetDurations returns the value of Durations.
func (s *AssessmentResult) GetDurations() AssessmentDurations {
return s.Durations
}
// GetNextSteps returns the value of NextSteps.
func (s *AssessmentResult) GetNextSteps() []AssessmentNextStep {
return s.NextSteps
}
// GetDecidedAt returns the value of DecidedAt.
func (s *AssessmentResult) GetDecidedAt() Timestamp {
return s.DecidedAt
}
// SetAttemptID sets the value of AttemptID.
func (s *AssessmentResult) SetAttemptID(val uuid.UUID) {
s.AttemptID = val
}
// SetSpecialization sets the value of Specialization.
func (s *AssessmentResult) SetSpecialization(val SpecializationCode) {
s.Specialization = val
}
// SetTargetGrade sets the value of TargetGrade.
func (s *AssessmentResult) SetTargetGrade(val GradeCode) {
s.TargetGrade = val
}
// SetTaskLanguage sets the value of TaskLanguage.
func (s *AssessmentResult) SetTaskLanguage(val NilTaskLanguage) {
s.TaskLanguage = val
}
// SetMode sets the value of Mode.
func (s *AssessmentResult) SetMode(val AssessmentMode) {
s.Mode = val
}
// SetVersions sets the value of Versions.
func (s *AssessmentResult) SetVersions(val AssessmentVersions) {
s.Versions = val
}
// SetOutcome sets the value of Outcome.
func (s *AssessmentResult) SetOutcome(val AssessmentOutcome) {
s.Outcome = val
}
// SetNotDeterminedReason sets the value of NotDeterminedReason.
func (s *AssessmentResult) SetNotDeterminedReason(val NilAssessmentNotDeterminedReason) {
s.NotDeterminedReason = val
}
// SetConfirmedGrade sets the value of ConfirmedGrade.
func (s *AssessmentResult) SetConfirmedGrade(val NilGradeCode) {
s.ConfirmedGrade = val
}
// SetPreviousConfirmedGrade sets the value of PreviousConfirmedGrade.
func (s *AssessmentResult) SetPreviousConfirmedGrade(val NilGradeCode) {
s.PreviousConfirmedGrade = val
}
// SetStrength sets the value of Strength.
func (s *AssessmentResult) SetStrength(val NilAssessmentStrength) {
s.Strength = val
}
// SetCalibrationStatus sets the value of CalibrationStatus.
func (s *AssessmentResult) SetCalibrationStatus(val CalibrationStatus) {
s.CalibrationStatus = val
}
// SetLimitations sets the value of Limitations.
func (s *AssessmentResult) SetLimitations(val []AssessmentLimitation) {
s.Limitations = val
}
// SetUncertainty sets the value of Uncertainty.
func (s *AssessmentResult) SetUncertainty(val NilAssessmentUncertainty) {
s.Uncertainty = val
}
// SetBasicScore sets the value of BasicScore.
func (s *AssessmentResult) SetBasicScore(val NilBasicScore) {
s.BasicScore = val
}
// SetPractices sets the value of Practices.
func (s *AssessmentResult) SetPractices(val []AssessmentPracticeResult) {
s.Practices = val
}
// SetGaps sets the value of Gaps.
func (s *AssessmentResult) SetGaps(val []AssessmentGap) {
s.Gaps = val
}
// SetDurations sets the value of Durations.
func (s *AssessmentResult) SetDurations(val AssessmentDurations) {
s.Durations = val
}
// SetNextSteps sets the value of NextSteps.
func (s *AssessmentResult) SetNextSteps(val []AssessmentNextStep) {
s.NextSteps = val
}
// SetDecidedAt sets the value of DecidedAt.
func (s *AssessmentResult) SetDecidedAt(val Timestamp) {
s.DecidedAt = val
}
// 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.
//
// A session starts with the creation of the attempt or, after the previous session ended, with the
// next GetMyAssessmentAttempt or command on the active attempt. It ends after `idle_timeout_seconds`
// without such a request. A request that would start a session beyond `max_sessions` starts none: the
// server moves the attempt to `expired` and answers with it (a read) or with 409 state_conflict (a
// command). Reading a terminal attempt or a result never starts a session.
// 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)
}
}
// 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.
// 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
}
// 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
}
// 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() {}
// 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)
}
}
// 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 ConsentPurpose `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() ConsentPurpose {
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 ConsentPurpose) {
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() {}
type ConsentTextVersion 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 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 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)
}
}
// 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
// Token from the email verification link.
// Ref: #/components/schemas/EmailVerificationRequest
type EmailVerificationRequest struct {
Token VerificationToken `json:"token"`
}
// GetToken returns the value of Token.
func (s *EmailVerificationRequest) GetToken() VerificationToken {
return s.Token
}
// SetToken sets the value of Token.
func (s *EmailVerificationRequest) SetToken(val VerificationToken) {
s.Token = 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 GetMyQuestionnaireForbidden Problem
func (*GetMyQuestionnaireForbidden) getMyQuestionnaireRes() {}
type GetMyQuestionnaireUnauthorized Problem
func (*GetMyQuestionnaireUnauthorized) getMyQuestionnaireRes() {}
type GetOrganizationNeedBadRequest Problem
func (*GetOrganizationNeedBadRequest) getOrganizationNeedRes() {}
type GetOrganizationNeedForbidden Problem
func (*GetOrganizationNeedForbidden) getOrganizationNeedRes() {}
type GetOrganizationNeedNotFound Problem
func (*GetOrganizationNeedNotFound) getOrganizationNeedRes() {}
type GetOrganizationNeedUnauthorized Problem
func (*GetOrganizationNeedUnauthorized) getOrganizationNeedRes() {}
// 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)
}
}
// 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)
}
}
// 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)
}
}
// 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 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() {}
// 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, planned in TASK-211); 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
// 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
}
// NewNilAssessmentMode returns new NilAssessmentMode with value set to v.
func NewNilAssessmentMode(v AssessmentMode) NilAssessmentMode {
return NilAssessmentMode{
Value: v,
}
}
// NilAssessmentMode is nullable AssessmentMode.
type NilAssessmentMode struct {
Value AssessmentMode
Null bool
}
// SetTo sets value to v.
func (o *NilAssessmentMode) SetTo(v AssessmentMode) {
o.Null = false
o.Value = v
}
// IsNull returns true if value is Null.
func (o NilAssessmentMode) IsNull() bool { return o.Null }
// SetToNull sets value to null.
func (o *NilAssessmentMode) SetToNull() {
o.Null = true
var v AssessmentMode
o.Value = v
}
// Get returns value and boolean that denotes whether value was set.
func (o NilAssessmentMode) Get() (v AssessmentMode, 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 NilAssessmentMode) Or(d AssessmentMode) AssessmentMode {
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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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. The
// first successful SaveMyQuestionnaire moves the account from candidate_questionnaire to this step
// (planned).
// - 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)
}
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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)
}
}
// 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
}
// 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 for validation_failed. Other codes omit it.
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). 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
}
// 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.
// 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 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 ResendEmailVerificationBadRequest Problem
func (*ResendEmailVerificationBadRequest) resendEmailVerificationRes() {}
type ResendEmailVerificationForbidden Problem
func (*ResendEmailVerificationForbidden) resendEmailVerificationRes() {}
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 SaveMyQuestionnaireBadRequest Problem
func (*SaveMyQuestionnaireBadRequest) saveMyQuestionnaireRes() {}
type SaveMyQuestionnaireForbidden Problem
func (*SaveMyQuestionnaireForbidden) saveMyQuestionnaireRes() {}
type SaveMyQuestionnairePreconditionFailed Problem
func (*SaveMyQuestionnairePreconditionFailed) saveMyQuestionnaireRes() {}
type SaveMyQuestionnaireUnauthorized Problem
func (*SaveMyQuestionnaireUnauthorized) saveMyQuestionnaireRes() {}
// 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 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
// 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() {}
// 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) confirmEmailRes() {}
func (*TooManyRequestsHeaders) createMyAssessmentAttemptRes() {}
func (*TooManyRequestsHeaders) createOrganizationNeedRes() {}
func (*TooManyRequestsHeaders) loginRes() {}
func (*TooManyRequestsHeaders) registerAccountRes() {}
func (*TooManyRequestsHeaders) resendEmailVerificationRes() {}
func (*TooManyRequestsHeaders) submitMyAssessmentAnswerRes() {}
func (*TooManyRequestsHeaders) updateOrganizationNeedRes() {}
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 VerificationToken string
// 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.
// 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)
}
}