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

2549 lines
73 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)
}
}
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)
}
}
// 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
}
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 CsrfToken string
// 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,
}
}
// 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 GetMyQuestionnaireForbidden Problem
func (*GetMyQuestionnaireForbidden) getMyQuestionnaireRes() {}
type GetMyQuestionnaireUnauthorized Problem
func (*GetMyQuestionnaireUnauthorized) getMyQuestionnaireRes() {}
// 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)
}
}
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() {}
type NewPassword string
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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
}
// 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,
}
}
// 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 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() {}
// 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
// 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) loginRes() {}
func (*TooManyRequestsHeaders) registerAccountRes() {}
func (*TooManyRequestsHeaders) resendEmailVerificationRes() {}
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)
}
}