// Code generated by go-swagger; DO NOT EDIT. // All Code Copyright(c) 2018-2020 by Taxnexus, Inc. // All rights reserved worldwide. // Proprietary product; unlicensed use is not allowed package sf_gate_models // This file was generated by the swagger tool. // Editing this file might prove futile when you re-run the swagger generate command import ( "encoding/json" "github.com/go-openapi/errors" "github.com/go-openapi/strfmt" "github.com/go-openapi/swag" "github.com/go-openapi/validate" ) // Job job // // swagger:model Job type Job struct { // Taxnexus Account Id Accountid string `json:"accountid,omitempty"` // Taxnexus Backend ID Backendid string `json:"backendid,omitempty"` // Taxnexus Company ID Companyid string `json:"companyid,omitempty"` // Taxnexus Coordinate ID Coordinateid string `json:"coordinateid,omitempty"` // Taxnexus User ID Createdbyid string `json:"createdbyid,omitempty"` // Date of Job Creation Createddate string `json:"createddate,omitempty"` // The amount of time after the Start Time to perform one or more jobs // Enum: [day document hour minute month quarter second week year] Duration string `json:"duration,omitempty"` // End Date/Time Enddate string `json:"enddate,omitempty"` // Error Reason Errorreason string `json:"errorreason,omitempty"` // Taxnexus Record Id of the Job record ID string `json:"id,omitempty"` // The time interval by which multiple jobs are executed within the Duration // Enum: [day each hour minute month quarter second week year] Interval string `json:"interval,omitempty"` // Job Date Jobdate string `json:"jobdate,omitempty"` // Last Modified By Lastmodifiedbyid string `json:"lastmodifiedbyid,omitempty"` // Last Modified Date Lastmodifieddate string `json:"lastmodifieddate,omitempty"` // month Month int64 `json:"month,omitempty"` // Next Job Nextjobid string `json:"nextjobid,omitempty"` // Object Type // Enum: [invoice order po quote] Objecttype string `json:"objecttype,omitempty"` // The user ID that owns this job Ownerid string `json:"ownerid,omitempty"` // Any parameters needed to process the job Parameters string `json:"parameters,omitempty"` // Period Periodid string `json:"periodid,omitempty"` // quarter Quarter int64 `json:"quarter,omitempty"` // Rating Engine Ratingengineid string `json:"ratingengineid,omitempty"` // External Reference Ref string `json:"ref,omitempty"` // Reschedule? Reschedule bool `json:"reschedule,omitempty"` // Reschedule Interval Rescheduleinterval int64 `json:"rescheduleinterval,omitempty"` // The Saga ID used to link log entries and transactions Sagaid string `json:"sagaid,omitempty"` // The type of Saga transaction being performed // Enum: [newGLPostInvoices newIngestInvoice newIngestPO] Sagatype string `json:"sagatype,omitempty"` // semiannual Semiannual int64 `json:"semiannual,omitempty"` // The source system that generated this job // Enum: [api fabric taxnexus telnexus] Source string `json:"source,omitempty"` // Start Date/Time Startdate string `json:"startdate,omitempty"` // Status // Enum: [active complete error new queued] Status string `json:"status,omitempty"` // The target system that executes this job // Enum: [api fabric taxnexus telnexus] Target string `json:"target,omitempty"` // Type // Enum: [coordinate email ingest tax] Type string `json:"type,omitempty"` // year Year int64 `json:"year,omitempty"` } // Validate validates this job func (m *Job) Validate(formats strfmt.Registry) error { var res []error if err := m.validateDuration(formats); err != nil { res = append(res, err) } if err := m.validateInterval(formats); err != nil { res = append(res, err) } if err := m.validateObjecttype(formats); err != nil { res = append(res, err) } if err := m.validateSagatype(formats); err != nil { res = append(res, err) } if err := m.validateSource(formats); err != nil { res = append(res, err) } if err := m.validateStatus(formats); err != nil { res = append(res, err) } if err := m.validateTarget(formats); err != nil { res = append(res, err) } if err := m.validateType(formats); err != nil { res = append(res, err) } if len(res) > 0 { return errors.CompositeValidationError(res...) } return nil } var jobTypeDurationPropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["day","document","hour","minute","month","quarter","second","week","year"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeDurationPropEnum = append(jobTypeDurationPropEnum, v) } } const ( // JobDurationDay captures enum value "day" JobDurationDay string = "day" // JobDurationDocument captures enum value "document" JobDurationDocument string = "document" // JobDurationHour captures enum value "hour" JobDurationHour string = "hour" // JobDurationMinute captures enum value "minute" JobDurationMinute string = "minute" // JobDurationMonth captures enum value "month" JobDurationMonth string = "month" // JobDurationQuarter captures enum value "quarter" JobDurationQuarter string = "quarter" // JobDurationSecond captures enum value "second" JobDurationSecond string = "second" // JobDurationWeek captures enum value "week" JobDurationWeek string = "week" // JobDurationYear captures enum value "year" JobDurationYear string = "year" ) // prop value enum func (m *Job) validateDurationEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeDurationPropEnum, true); err != nil { return err } return nil } func (m *Job) validateDuration(formats strfmt.Registry) error { if swag.IsZero(m.Duration) { // not required return nil } // value enum if err := m.validateDurationEnum("duration", "body", m.Duration); err != nil { return err } return nil } var jobTypeIntervalPropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["day","each","hour","minute","month","quarter","second","week","year"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeIntervalPropEnum = append(jobTypeIntervalPropEnum, v) } } const ( // JobIntervalDay captures enum value "day" JobIntervalDay string = "day" // JobIntervalEach captures enum value "each" JobIntervalEach string = "each" // JobIntervalHour captures enum value "hour" JobIntervalHour string = "hour" // JobIntervalMinute captures enum value "minute" JobIntervalMinute string = "minute" // JobIntervalMonth captures enum value "month" JobIntervalMonth string = "month" // JobIntervalQuarter captures enum value "quarter" JobIntervalQuarter string = "quarter" // JobIntervalSecond captures enum value "second" JobIntervalSecond string = "second" // JobIntervalWeek captures enum value "week" JobIntervalWeek string = "week" // JobIntervalYear captures enum value "year" JobIntervalYear string = "year" ) // prop value enum func (m *Job) validateIntervalEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeIntervalPropEnum, true); err != nil { return err } return nil } func (m *Job) validateInterval(formats strfmt.Registry) error { if swag.IsZero(m.Interval) { // not required return nil } // value enum if err := m.validateIntervalEnum("interval", "body", m.Interval); err != nil { return err } return nil } var jobTypeObjecttypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["invoice","order","po","quote"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeObjecttypePropEnum = append(jobTypeObjecttypePropEnum, v) } } const ( // JobObjecttypeInvoice captures enum value "invoice" JobObjecttypeInvoice string = "invoice" // JobObjecttypeOrder captures enum value "order" JobObjecttypeOrder string = "order" // JobObjecttypePo captures enum value "po" JobObjecttypePo string = "po" // JobObjecttypeQuote captures enum value "quote" JobObjecttypeQuote string = "quote" ) // prop value enum func (m *Job) validateObjecttypeEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeObjecttypePropEnum, true); err != nil { return err } return nil } func (m *Job) validateObjecttype(formats strfmt.Registry) error { if swag.IsZero(m.Objecttype) { // not required return nil } // value enum if err := m.validateObjecttypeEnum("objecttype", "body", m.Objecttype); err != nil { return err } return nil } var jobTypeSagatypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["newGLPostInvoices","newIngestInvoice","newIngestPO"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeSagatypePropEnum = append(jobTypeSagatypePropEnum, v) } } const ( // JobSagatypeNewGLPostInvoices captures enum value "newGLPostInvoices" JobSagatypeNewGLPostInvoices string = "newGLPostInvoices" // JobSagatypeNewIngestInvoice captures enum value "newIngestInvoice" JobSagatypeNewIngestInvoice string = "newIngestInvoice" // JobSagatypeNewIngestPO captures enum value "newIngestPO" JobSagatypeNewIngestPO string = "newIngestPO" ) // prop value enum func (m *Job) validateSagatypeEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeSagatypePropEnum, true); err != nil { return err } return nil } func (m *Job) validateSagatype(formats strfmt.Registry) error { if swag.IsZero(m.Sagatype) { // not required return nil } // value enum if err := m.validateSagatypeEnum("sagatype", "body", m.Sagatype); err != nil { return err } return nil } var jobTypeSourcePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeSourcePropEnum = append(jobTypeSourcePropEnum, v) } } const ( // JobSourceAPI captures enum value "api" JobSourceAPI string = "api" // JobSourceFabric captures enum value "fabric" JobSourceFabric string = "fabric" // JobSourceTaxnexus captures enum value "taxnexus" JobSourceTaxnexus string = "taxnexus" // JobSourceTelnexus captures enum value "telnexus" JobSourceTelnexus string = "telnexus" ) // prop value enum func (m *Job) validateSourceEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeSourcePropEnum, true); err != nil { return err } return nil } func (m *Job) validateSource(formats strfmt.Registry) error { if swag.IsZero(m.Source) { // not required return nil } // value enum if err := m.validateSourceEnum("source", "body", m.Source); err != nil { return err } return nil } var jobTypeStatusPropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["active","complete","error","new","queued"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeStatusPropEnum = append(jobTypeStatusPropEnum, v) } } const ( // JobStatusActive captures enum value "active" JobStatusActive string = "active" // JobStatusComplete captures enum value "complete" JobStatusComplete string = "complete" // JobStatusError captures enum value "error" JobStatusError string = "error" // JobStatusNew captures enum value "new" JobStatusNew string = "new" // JobStatusQueued captures enum value "queued" JobStatusQueued string = "queued" ) // prop value enum func (m *Job) validateStatusEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeStatusPropEnum, true); err != nil { return err } return nil } func (m *Job) validateStatus(formats strfmt.Registry) error { if swag.IsZero(m.Status) { // not required return nil } // value enum if err := m.validateStatusEnum("status", "body", m.Status); err != nil { return err } return nil } var jobTypeTargetPropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["api","fabric","taxnexus","telnexus"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeTargetPropEnum = append(jobTypeTargetPropEnum, v) } } const ( // JobTargetAPI captures enum value "api" JobTargetAPI string = "api" // JobTargetFabric captures enum value "fabric" JobTargetFabric string = "fabric" // JobTargetTaxnexus captures enum value "taxnexus" JobTargetTaxnexus string = "taxnexus" // JobTargetTelnexus captures enum value "telnexus" JobTargetTelnexus string = "telnexus" ) // prop value enum func (m *Job) validateTargetEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeTargetPropEnum, true); err != nil { return err } return nil } func (m *Job) validateTarget(formats strfmt.Registry) error { if swag.IsZero(m.Target) { // not required return nil } // value enum if err := m.validateTargetEnum("target", "body", m.Target); err != nil { return err } return nil } var jobTypeTypePropEnum []interface{} func init() { var res []string if err := json.Unmarshal([]byte(`["coordinate","email","ingest","tax"]`), &res); err != nil { panic(err) } for _, v := range res { jobTypeTypePropEnum = append(jobTypeTypePropEnum, v) } } const ( // JobTypeCoordinate captures enum value "coordinate" JobTypeCoordinate string = "coordinate" // JobTypeEmail captures enum value "email" JobTypeEmail string = "email" // JobTypeIngest captures enum value "ingest" JobTypeIngest string = "ingest" // JobTypeTax captures enum value "tax" JobTypeTax string = "tax" ) // prop value enum func (m *Job) validateTypeEnum(path, location string, value string) error { if err := validate.EnumCase(path, location, value, jobTypeTypePropEnum, true); err != nil { return err } return nil } func (m *Job) validateType(formats strfmt.Registry) error { if swag.IsZero(m.Type) { // not required return nil } // value enum if err := m.validateTypeEnum("type", "body", m.Type); err != nil { return err } return nil } // MarshalBinary interface implementation func (m *Job) MarshalBinary() ([]byte, error) { if m == nil { return nil, nil } return swag.WriteJSON(m) } // UnmarshalBinary interface implementation func (m *Job) UnmarshalBinary(b []byte) error { var res Job if err := swag.ReadJSON(b, &res); err != nil { return err } *m = res return nil }