// Code generated by ogen, DO NOT EDIT. package rest import ( "fmt" "time" "github.com/go-faster/errors" "github.com/go-faster/jx" ) func (s *DefaultErrorStatusCode) Error() string { return fmt.Sprintf("code %d: %+v", s.StatusCode, s.Response) } // CancelDatasetJobNoContent is response for CancelDatasetJob operation. type CancelDatasetJobNoContent struct{} // CancelPredictionJobNoContent is response for CancelPredictionJob operation. type CancelPredictionJobNoContent struct{} // Ref: #/components/schemas/ConstraintSpec type ConstraintSpec struct { Type ConstraintSpecType `json:"type"` Op OptConstraintSpecOp `json:"op"` Limit OptFloat64 `json:"limit"` Action OptConstraintSpecAction `json:"action"` Mode OptConstraintSpecMode `json:"mode"` Label OptString `json:"label"` Vertices []PolygonVertex `json:"vertices"` } // GetType returns the value of Type. func (s *ConstraintSpec) GetType() ConstraintSpecType { return s.Type } // GetOp returns the value of Op. func (s *ConstraintSpec) GetOp() OptConstraintSpecOp { return s.Op } // GetLimit returns the value of Limit. func (s *ConstraintSpec) GetLimit() OptFloat64 { return s.Limit } // GetAction returns the value of Action. func (s *ConstraintSpec) GetAction() OptConstraintSpecAction { return s.Action } // GetMode returns the value of Mode. func (s *ConstraintSpec) GetMode() OptConstraintSpecMode { return s.Mode } // GetLabel returns the value of Label. func (s *ConstraintSpec) GetLabel() OptString { return s.Label } // GetVertices returns the value of Vertices. func (s *ConstraintSpec) GetVertices() []PolygonVertex { return s.Vertices } // SetType sets the value of Type. func (s *ConstraintSpec) SetType(val ConstraintSpecType) { s.Type = val } // SetOp sets the value of Op. func (s *ConstraintSpec) SetOp(val OptConstraintSpecOp) { s.Op = val } // SetLimit sets the value of Limit. func (s *ConstraintSpec) SetLimit(val OptFloat64) { s.Limit = val } // SetAction sets the value of Action. func (s *ConstraintSpec) SetAction(val OptConstraintSpecAction) { s.Action = val } // SetMode sets the value of Mode. func (s *ConstraintSpec) SetMode(val OptConstraintSpecMode) { s.Mode = val } // SetLabel sets the value of Label. func (s *ConstraintSpec) SetLabel(val OptString) { s.Label = val } // SetVertices sets the value of Vertices. func (s *ConstraintSpec) SetVertices(val []PolygonVertex) { s.Vertices = val } type ConstraintSpecAction string const ( ConstraintSpecActionStop ConstraintSpecAction = "stop" ConstraintSpecActionFallback ConstraintSpecAction = "fallback" ConstraintSpecActionClip ConstraintSpecAction = "clip" ) // AllValues returns all ConstraintSpecAction values. func (ConstraintSpecAction) AllValues() []ConstraintSpecAction { return []ConstraintSpecAction{ ConstraintSpecActionStop, ConstraintSpecActionFallback, ConstraintSpecActionClip, } } // MarshalText implements encoding.TextMarshaler. func (s ConstraintSpecAction) MarshalText() ([]byte, error) { switch s { case ConstraintSpecActionStop: return []byte(s), nil case ConstraintSpecActionFallback: return []byte(s), nil case ConstraintSpecActionClip: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConstraintSpecAction) UnmarshalText(data []byte) error { switch ConstraintSpecAction(data) { case ConstraintSpecActionStop: *s = ConstraintSpecActionStop return nil case ConstraintSpecActionFallback: *s = ConstraintSpecActionFallback return nil case ConstraintSpecActionClip: *s = ConstraintSpecActionClip return nil default: return errors.Errorf("invalid value: %q", data) } } type ConstraintSpecMode string const ( ConstraintSpecModeInside ConstraintSpecMode = "inside" ConstraintSpecModeOutside ConstraintSpecMode = "outside" ) // AllValues returns all ConstraintSpecMode values. func (ConstraintSpecMode) AllValues() []ConstraintSpecMode { return []ConstraintSpecMode{ ConstraintSpecModeInside, ConstraintSpecModeOutside, } } // MarshalText implements encoding.TextMarshaler. func (s ConstraintSpecMode) MarshalText() ([]byte, error) { switch s { case ConstraintSpecModeInside: return []byte(s), nil case ConstraintSpecModeOutside: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConstraintSpecMode) UnmarshalText(data []byte) error { switch ConstraintSpecMode(data) { case ConstraintSpecModeInside: *s = ConstraintSpecModeInside return nil case ConstraintSpecModeOutside: *s = ConstraintSpecModeOutside return nil default: return errors.Errorf("invalid value: %q", data) } } type ConstraintSpecOp string const ( ConstraintSpecOpLess ConstraintSpecOp = "<" ConstraintSpecOpLessEq ConstraintSpecOp = "<=" ConstraintSpecOpGreater ConstraintSpecOp = ">" ConstraintSpecOpGreaterEq ConstraintSpecOp = ">=" ConstraintSpecOpEqEq ConstraintSpecOp = "==" ) // AllValues returns all ConstraintSpecOp values. func (ConstraintSpecOp) AllValues() []ConstraintSpecOp { return []ConstraintSpecOp{ ConstraintSpecOpLess, ConstraintSpecOpLessEq, ConstraintSpecOpGreater, ConstraintSpecOpGreaterEq, ConstraintSpecOpEqEq, } } // MarshalText implements encoding.TextMarshaler. func (s ConstraintSpecOp) MarshalText() ([]byte, error) { switch s { case ConstraintSpecOpLess: return []byte(s), nil case ConstraintSpecOpLessEq: return []byte(s), nil case ConstraintSpecOpGreater: return []byte(s), nil case ConstraintSpecOpGreaterEq: return []byte(s), nil case ConstraintSpecOpEqEq: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConstraintSpecOp) UnmarshalText(data []byte) error { switch ConstraintSpecOp(data) { case ConstraintSpecOpLess: *s = ConstraintSpecOpLess return nil case ConstraintSpecOpLessEq: *s = ConstraintSpecOpLessEq return nil case ConstraintSpecOpGreater: *s = ConstraintSpecOpGreater return nil case ConstraintSpecOpGreaterEq: *s = ConstraintSpecOpGreaterEq return nil case ConstraintSpecOpEqEq: *s = ConstraintSpecOpEqEq return nil default: return errors.Errorf("invalid value: %q", data) } } type ConstraintSpecType string const ( ConstraintSpecTypeAltitude ConstraintSpecType = "altitude" ConstraintSpecTypeTime ConstraintSpecType = "time" ConstraintSpecTypeTerrainContact ConstraintSpecType = "terrain_contact" ConstraintSpecTypePolygon ConstraintSpecType = "polygon" ) // AllValues returns all ConstraintSpecType values. func (ConstraintSpecType) AllValues() []ConstraintSpecType { return []ConstraintSpecType{ ConstraintSpecTypeAltitude, ConstraintSpecTypeTime, ConstraintSpecTypeTerrainContact, ConstraintSpecTypePolygon, } } // MarshalText implements encoding.TextMarshaler. func (s ConstraintSpecType) MarshalText() ([]byte, error) { switch s { case ConstraintSpecTypeAltitude: return []byte(s), nil case ConstraintSpecTypeTime: return []byte(s), nil case ConstraintSpecTypeTerrainContact: return []byte(s), nil case ConstraintSpecTypePolygon: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ConstraintSpecType) UnmarshalText(data []byte) error { switch ConstraintSpecType(data) { case ConstraintSpecTypeAltitude: *s = ConstraintSpecTypeAltitude return nil case ConstraintSpecTypeTime: *s = ConstraintSpecTypeTime return nil case ConstraintSpecTypeTerrainContact: *s = ConstraintSpecTypeTerrainContact return nil case ConstraintSpecTypePolygon: *s = ConstraintSpecTypePolygon return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/Coverage type Coverage struct { Region Region `json:"region"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` } // GetRegion returns the value of Region. func (s *Coverage) GetRegion() Region { return s.Region } // GetStartTime returns the value of StartTime. func (s *Coverage) GetStartTime() time.Time { return s.StartTime } // GetEndTime returns the value of EndTime. func (s *Coverage) GetEndTime() time.Time { return s.EndTime } // SetRegion sets the value of Region. func (s *Coverage) SetRegion(val Region) { s.Region = val } // SetStartTime sets the value of StartTime. func (s *Coverage) SetStartTime(val time.Time) { s.StartTime = val } // SetEndTime sets the value of EndTime. func (s *Coverage) SetEndTime(val time.Time) { s.EndTime = val } // Ref: #/components/schemas/DatasetEntry type DatasetEntry struct { Filename string `json:"filename"` Epoch time.Time `json:"epoch"` Subset OptSubsetSpec `json:"subset"` Coverage OptCoverage `json:"coverage"` Loaded bool `json:"loaded"` } // GetFilename returns the value of Filename. func (s *DatasetEntry) GetFilename() string { return s.Filename } // GetEpoch returns the value of Epoch. func (s *DatasetEntry) GetEpoch() time.Time { return s.Epoch } // GetSubset returns the value of Subset. func (s *DatasetEntry) GetSubset() OptSubsetSpec { return s.Subset } // GetCoverage returns the value of Coverage. func (s *DatasetEntry) GetCoverage() OptCoverage { return s.Coverage } // GetLoaded returns the value of Loaded. func (s *DatasetEntry) GetLoaded() bool { return s.Loaded } // SetFilename sets the value of Filename. func (s *DatasetEntry) SetFilename(val string) { s.Filename = val } // SetEpoch sets the value of Epoch. func (s *DatasetEntry) SetEpoch(val time.Time) { s.Epoch = val } // SetSubset sets the value of Subset. func (s *DatasetEntry) SetSubset(val OptSubsetSpec) { s.Subset = val } // SetCoverage sets the value of Coverage. func (s *DatasetEntry) SetCoverage(val OptCoverage) { s.Coverage = val } // SetLoaded sets the value of Loaded. func (s *DatasetEntry) SetLoaded(val bool) { s.Loaded = val } // Ref: #/components/schemas/DatasetInfo type DatasetInfo struct { Source string `json:"source"` Epoch time.Time `json:"epoch"` } // GetSource returns the value of Source. func (s *DatasetInfo) GetSource() string { return s.Source } // GetEpoch returns the value of Epoch. func (s *DatasetInfo) GetEpoch() time.Time { return s.Epoch } // SetSource sets the value of Source. func (s *DatasetInfo) SetSource(val string) { s.Source = val } // SetEpoch sets the value of Epoch. func (s *DatasetInfo) SetEpoch(val time.Time) { s.Epoch = val } // Ref: #/components/schemas/DatasetList type DatasetList struct { Source string `json:"source"` Datasets []DatasetEntry `json:"datasets"` } // GetSource returns the value of Source. func (s *DatasetList) GetSource() string { return s.Source } // GetDatasets returns the value of Datasets. func (s *DatasetList) GetDatasets() []DatasetEntry { return s.Datasets } // SetSource sets the value of Source. func (s *DatasetList) SetSource(val string) { s.Source = val } // SetDatasets sets the value of Datasets. func (s *DatasetList) SetDatasets(val []DatasetEntry) { s.Datasets = val } // DefaultErrorStatusCode wraps Error with StatusCode. type DefaultErrorStatusCode struct { StatusCode int Response Error } // GetStatusCode returns the value of StatusCode. func (s *DefaultErrorStatusCode) GetStatusCode() int { return s.StatusCode } // GetResponse returns the value of Response. func (s *DefaultErrorStatusCode) GetResponse() Error { return s.Response } // SetStatusCode sets the value of StatusCode. func (s *DefaultErrorStatusCode) SetStatusCode(val int) { s.StatusCode = val } // SetResponse sets the value of Response. func (s *DefaultErrorStatusCode) SetResponse(val Error) { s.Response = val } // DeleteDatasetNoContent is response for DeleteDataset operation. type DeleteDatasetNoContent struct{} // Ref: #/components/schemas/DownloadAccepted type DownloadAccepted struct { JobID string `json:"job_id"` } // GetJobID returns the value of JobID. func (s *DownloadAccepted) GetJobID() string { return s.JobID } // SetJobID sets the value of JobID. func (s *DownloadAccepted) SetJobID(val string) { s.JobID = val } // Ref: #/components/schemas/DownloadJob type DownloadJob struct { ID string `json:"id"` Source string `json:"source"` Dataset string `json:"dataset"` Epoch time.Time `json:"epoch"` Status DownloadJobStatus `json:"status"` StartedAt time.Time `json:"started_at"` EndedAt OptDateTime `json:"ended_at"` Error OptString `json:"error"` TotalUnits int `json:"total_units"` DoneUnits int `json:"done_units"` Bytes int64 `json:"bytes"` } // GetID returns the value of ID. func (s *DownloadJob) GetID() string { return s.ID } // GetSource returns the value of Source. func (s *DownloadJob) GetSource() string { return s.Source } // GetDataset returns the value of Dataset. func (s *DownloadJob) GetDataset() string { return s.Dataset } // GetEpoch returns the value of Epoch. func (s *DownloadJob) GetEpoch() time.Time { return s.Epoch } // GetStatus returns the value of Status. func (s *DownloadJob) GetStatus() DownloadJobStatus { return s.Status } // GetStartedAt returns the value of StartedAt. func (s *DownloadJob) GetStartedAt() time.Time { return s.StartedAt } // GetEndedAt returns the value of EndedAt. func (s *DownloadJob) GetEndedAt() OptDateTime { return s.EndedAt } // GetError returns the value of Error. func (s *DownloadJob) GetError() OptString { return s.Error } // GetTotalUnits returns the value of TotalUnits. func (s *DownloadJob) GetTotalUnits() int { return s.TotalUnits } // GetDoneUnits returns the value of DoneUnits. func (s *DownloadJob) GetDoneUnits() int { return s.DoneUnits } // GetBytes returns the value of Bytes. func (s *DownloadJob) GetBytes() int64 { return s.Bytes } // SetID sets the value of ID. func (s *DownloadJob) SetID(val string) { s.ID = val } // SetSource sets the value of Source. func (s *DownloadJob) SetSource(val string) { s.Source = val } // SetDataset sets the value of Dataset. func (s *DownloadJob) SetDataset(val string) { s.Dataset = val } // SetEpoch sets the value of Epoch. func (s *DownloadJob) SetEpoch(val time.Time) { s.Epoch = val } // SetStatus sets the value of Status. func (s *DownloadJob) SetStatus(val DownloadJobStatus) { s.Status = val } // SetStartedAt sets the value of StartedAt. func (s *DownloadJob) SetStartedAt(val time.Time) { s.StartedAt = val } // SetEndedAt sets the value of EndedAt. func (s *DownloadJob) SetEndedAt(val OptDateTime) { s.EndedAt = val } // SetError sets the value of Error. func (s *DownloadJob) SetError(val OptString) { s.Error = val } // SetTotalUnits sets the value of TotalUnits. func (s *DownloadJob) SetTotalUnits(val int) { s.TotalUnits = val } // SetDoneUnits sets the value of DoneUnits. func (s *DownloadJob) SetDoneUnits(val int) { s.DoneUnits = val } // SetBytes sets the value of Bytes. func (s *DownloadJob) SetBytes(val int64) { s.Bytes = val } type DownloadJobStatus string const ( DownloadJobStatusPending DownloadJobStatus = "pending" DownloadJobStatusRunning DownloadJobStatus = "running" DownloadJobStatusComplete DownloadJobStatus = "complete" DownloadJobStatusFailed DownloadJobStatus = "failed" DownloadJobStatusCancelled DownloadJobStatus = "cancelled" ) // AllValues returns all DownloadJobStatus values. func (DownloadJobStatus) AllValues() []DownloadJobStatus { return []DownloadJobStatus{ DownloadJobStatusPending, DownloadJobStatusRunning, DownloadJobStatusComplete, DownloadJobStatusFailed, DownloadJobStatusCancelled, } } // MarshalText implements encoding.TextMarshaler. func (s DownloadJobStatus) MarshalText() ([]byte, error) { switch s { case DownloadJobStatusPending: return []byte(s), nil case DownloadJobStatusRunning: return []byte(s), nil case DownloadJobStatusComplete: return []byte(s), nil case DownloadJobStatusFailed: return []byte(s), nil case DownloadJobStatusCancelled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *DownloadJobStatus) UnmarshalText(data []byte) error { switch DownloadJobStatus(data) { case DownloadJobStatusPending: *s = DownloadJobStatusPending return nil case DownloadJobStatusRunning: *s = DownloadJobStatusRunning return nil case DownloadJobStatusComplete: *s = DownloadJobStatusComplete return nil case DownloadJobStatusFailed: *s = DownloadJobStatusFailed return nil case DownloadJobStatusCancelled: *s = DownloadJobStatusCancelled return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/DownloadRequest type DownloadRequest struct { Epoch OptDateTime `json:"epoch"` Latest OptBool `json:"latest"` Subset OptSubsetSpec `json:"subset"` } // GetEpoch returns the value of Epoch. func (s *DownloadRequest) GetEpoch() OptDateTime { return s.Epoch } // GetLatest returns the value of Latest. func (s *DownloadRequest) GetLatest() OptBool { return s.Latest } // GetSubset returns the value of Subset. func (s *DownloadRequest) GetSubset() OptSubsetSpec { return s.Subset } // SetEpoch sets the value of Epoch. func (s *DownloadRequest) SetEpoch(val OptDateTime) { s.Epoch = val } // SetLatest sets the value of Latest. func (s *DownloadRequest) SetLatest(val OptBool) { s.Latest = val } // SetSubset sets the value of Subset. func (s *DownloadRequest) SetSubset(val OptSubsetSpec) { s.Subset = val } // Ref: #/components/schemas/Error type Error struct { Error ErrorError `json:"error"` } // GetError returns the value of Error. func (s *Error) GetError() ErrorError { return s.Error } // SetError sets the value of Error. func (s *Error) SetError(val ErrorError) { s.Error = val } type ErrorError struct { Type string `json:"type"` Description string `json:"description"` } // GetType returns the value of Type. func (s *ErrorError) GetType() string { return s.Type } // GetDescription returns the value of Description. func (s *ErrorError) GetDescription() string { return s.Description } // SetType sets the value of Type. func (s *ErrorError) SetType(val string) { s.Type = val } // SetDescription sets the value of Description. func (s *ErrorError) SetDescription(val string) { s.Description = val } // Ref: #/components/schemas/EventSummary type EventSummary struct { Type string `json:"type"` Count int64 `json:"count"` FirstTime OptFloat64 `json:"first_time"` LastTime OptFloat64 `json:"last_time"` FirstState OptGeoState `json:"first_state"` LastState OptGeoState `json:"last_state"` Message OptString `json:"message"` } // GetType returns the value of Type. func (s *EventSummary) GetType() string { return s.Type } // GetCount returns the value of Count. func (s *EventSummary) GetCount() int64 { return s.Count } // GetFirstTime returns the value of FirstTime. func (s *EventSummary) GetFirstTime() OptFloat64 { return s.FirstTime } // GetLastTime returns the value of LastTime. func (s *EventSummary) GetLastTime() OptFloat64 { return s.LastTime } // GetFirstState returns the value of FirstState. func (s *EventSummary) GetFirstState() OptGeoState { return s.FirstState } // GetLastState returns the value of LastState. func (s *EventSummary) GetLastState() OptGeoState { return s.LastState } // GetMessage returns the value of Message. func (s *EventSummary) GetMessage() OptString { return s.Message } // SetType sets the value of Type. func (s *EventSummary) SetType(val string) { s.Type = val } // SetCount sets the value of Count. func (s *EventSummary) SetCount(val int64) { s.Count = val } // SetFirstTime sets the value of FirstTime. func (s *EventSummary) SetFirstTime(val OptFloat64) { s.FirstTime = val } // SetLastTime sets the value of LastTime. func (s *EventSummary) SetLastTime(val OptFloat64) { s.LastTime = val } // SetFirstState sets the value of FirstState. func (s *EventSummary) SetFirstState(val OptGeoState) { s.FirstState = val } // SetLastState sets the value of LastState. func (s *EventSummary) SetLastState(val OptGeoState) { s.LastState = val } // SetMessage sets the value of Message. func (s *EventSummary) SetMessage(val OptString) { s.Message = val } // Ref: #/components/schemas/GeoState type GeoState struct { Lat float64 `json:"lat"` Lng float64 `json:"lng"` Altitude float64 `json:"altitude"` } // GetLat returns the value of Lat. func (s *GeoState) GetLat() float64 { return s.Lat } // GetLng returns the value of Lng. func (s *GeoState) GetLng() float64 { return s.Lng } // GetAltitude returns the value of Altitude. func (s *GeoState) GetAltitude() float64 { return s.Altitude } // SetLat sets the value of Lat. func (s *GeoState) SetLat(val float64) { s.Lat = val } // SetLng sets the value of Lng. func (s *GeoState) SetLng(val float64) { s.Lng = val } // SetAltitude sets the value of Altitude. func (s *GeoState) SetAltitude(val float64) { s.Altitude = val } // Ref: #/components/schemas/HourRange type HourRange struct { MinHour int `json:"min_hour"` MaxHour int `json:"max_hour"` } // GetMinHour returns the value of MinHour. func (s *HourRange) GetMinHour() int { return s.MinHour } // GetMaxHour returns the value of MaxHour. func (s *HourRange) GetMaxHour() int { return s.MaxHour } // SetMinHour sets the value of MinHour. func (s *HourRange) SetMinHour(val int) { s.MinHour = val } // SetMaxHour sets the value of MaxHour. func (s *HourRange) SetMaxHour(val int) { s.MaxHour = val } // Ref: #/components/schemas/Launch type Launch struct { Time time.Time `json:"time"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude OptFloat64 `json:"altitude"` } // GetTime returns the value of Time. func (s *Launch) GetTime() time.Time { return s.Time } // GetLatitude returns the value of Latitude. func (s *Launch) GetLatitude() float64 { return s.Latitude } // GetLongitude returns the value of Longitude. func (s *Launch) GetLongitude() float64 { return s.Longitude } // GetAltitude returns the value of Altitude. func (s *Launch) GetAltitude() OptFloat64 { return s.Altitude } // SetTime sets the value of Time. func (s *Launch) SetTime(val time.Time) { s.Time = val } // SetLatitude sets the value of Latitude. func (s *Launch) SetLatitude(val float64) { s.Latitude = val } // SetLongitude sets the value of Longitude. func (s *Launch) SetLongitude(val float64) { s.Longitude = val } // SetAltitude sets the value of Altitude. func (s *Launch) SetAltitude(val OptFloat64) { s.Altitude = val } // Ref: #/components/schemas/ModelSpec type ModelSpec struct { Type ModelSpecType `json:"type"` Rate OptFloat64 `json:"rate"` SeaLevelRate OptFloat64 `json:"sea_level_rate"` IncludeWind OptBool `json:"include_wind"` Segments []PiecewiseSegment `json:"segments"` } // GetType returns the value of Type. func (s *ModelSpec) GetType() ModelSpecType { return s.Type } // GetRate returns the value of Rate. func (s *ModelSpec) GetRate() OptFloat64 { return s.Rate } // GetSeaLevelRate returns the value of SeaLevelRate. func (s *ModelSpec) GetSeaLevelRate() OptFloat64 { return s.SeaLevelRate } // GetIncludeWind returns the value of IncludeWind. func (s *ModelSpec) GetIncludeWind() OptBool { return s.IncludeWind } // GetSegments returns the value of Segments. func (s *ModelSpec) GetSegments() []PiecewiseSegment { return s.Segments } // SetType sets the value of Type. func (s *ModelSpec) SetType(val ModelSpecType) { s.Type = val } // SetRate sets the value of Rate. func (s *ModelSpec) SetRate(val OptFloat64) { s.Rate = val } // SetSeaLevelRate sets the value of SeaLevelRate. func (s *ModelSpec) SetSeaLevelRate(val OptFloat64) { s.SeaLevelRate = val } // SetIncludeWind sets the value of IncludeWind. func (s *ModelSpec) SetIncludeWind(val OptBool) { s.IncludeWind = val } // SetSegments sets the value of Segments. func (s *ModelSpec) SetSegments(val []PiecewiseSegment) { s.Segments = val } type ModelSpecType string const ( ModelSpecTypeConstantRate ModelSpecType = "constant_rate" ModelSpecTypeParachuteDescent ModelSpecType = "parachute_descent" ModelSpecTypePiecewise ModelSpecType = "piecewise" ModelSpecTypeWind ModelSpecType = "wind" ) // AllValues returns all ModelSpecType values. func (ModelSpecType) AllValues() []ModelSpecType { return []ModelSpecType{ ModelSpecTypeConstantRate, ModelSpecTypeParachuteDescent, ModelSpecTypePiecewise, ModelSpecTypeWind, } } // MarshalText implements encoding.TextMarshaler. func (s ModelSpecType) MarshalText() ([]byte, error) { switch s { case ModelSpecTypeConstantRate: return []byte(s), nil case ModelSpecTypeParachuteDescent: return []byte(s), nil case ModelSpecTypePiecewise: return []byte(s), nil case ModelSpecTypeWind: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ModelSpecType) UnmarshalText(data []byte) error { switch ModelSpecType(data) { case ModelSpecTypeConstantRate: *s = ModelSpecTypeConstantRate return nil case ModelSpecTypeParachuteDescent: *s = ModelSpecTypeParachuteDescent return nil case ModelSpecTypePiecewise: *s = ModelSpecTypePiecewise return nil case ModelSpecTypeWind: *s = ModelSpecTypeWind return nil default: return errors.Errorf("invalid value: %q", data) } } // NewOptBool returns new OptBool with value set to v. func NewOptBool(v bool) OptBool { return OptBool{ Value: v, Set: true, } } // OptBool is optional bool. type OptBool struct { Value bool Set bool } // IsSet returns true if OptBool was set. func (o OptBool) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptBool) Reset() { var v bool o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptBool) SetTo(v bool) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptBool) Get() (v bool, 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 OptBool) Or(d bool) bool { if v, ok := o.Get(); ok { return v } return d } // NewOptConstraintSpecAction returns new OptConstraintSpecAction with value set to v. func NewOptConstraintSpecAction(v ConstraintSpecAction) OptConstraintSpecAction { return OptConstraintSpecAction{ Value: v, Set: true, } } // OptConstraintSpecAction is optional ConstraintSpecAction. type OptConstraintSpecAction struct { Value ConstraintSpecAction Set bool } // IsSet returns true if OptConstraintSpecAction was set. func (o OptConstraintSpecAction) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptConstraintSpecAction) Reset() { var v ConstraintSpecAction o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptConstraintSpecAction) SetTo(v ConstraintSpecAction) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptConstraintSpecAction) Get() (v ConstraintSpecAction, 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 OptConstraintSpecAction) Or(d ConstraintSpecAction) ConstraintSpecAction { if v, ok := o.Get(); ok { return v } return d } // NewOptConstraintSpecMode returns new OptConstraintSpecMode with value set to v. func NewOptConstraintSpecMode(v ConstraintSpecMode) OptConstraintSpecMode { return OptConstraintSpecMode{ Value: v, Set: true, } } // OptConstraintSpecMode is optional ConstraintSpecMode. type OptConstraintSpecMode struct { Value ConstraintSpecMode Set bool } // IsSet returns true if OptConstraintSpecMode was set. func (o OptConstraintSpecMode) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptConstraintSpecMode) Reset() { var v ConstraintSpecMode o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptConstraintSpecMode) SetTo(v ConstraintSpecMode) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptConstraintSpecMode) Get() (v ConstraintSpecMode, 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 OptConstraintSpecMode) Or(d ConstraintSpecMode) ConstraintSpecMode { if v, ok := o.Get(); ok { return v } return d } // NewOptConstraintSpecOp returns new OptConstraintSpecOp with value set to v. func NewOptConstraintSpecOp(v ConstraintSpecOp) OptConstraintSpecOp { return OptConstraintSpecOp{ Value: v, Set: true, } } // OptConstraintSpecOp is optional ConstraintSpecOp. type OptConstraintSpecOp struct { Value ConstraintSpecOp Set bool } // IsSet returns true if OptConstraintSpecOp was set. func (o OptConstraintSpecOp) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptConstraintSpecOp) Reset() { var v ConstraintSpecOp o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptConstraintSpecOp) SetTo(v ConstraintSpecOp) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptConstraintSpecOp) Get() (v ConstraintSpecOp, 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 OptConstraintSpecOp) Or(d ConstraintSpecOp) ConstraintSpecOp { if v, ok := o.Get(); ok { return v } return d } // NewOptCoverage returns new OptCoverage with value set to v. func NewOptCoverage(v Coverage) OptCoverage { return OptCoverage{ Value: v, Set: true, } } // OptCoverage is optional Coverage. type OptCoverage struct { Value Coverage Set bool } // IsSet returns true if OptCoverage was set. func (o OptCoverage) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptCoverage) Reset() { var v Coverage o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptCoverage) SetTo(v Coverage) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptCoverage) Get() (v Coverage, 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 OptCoverage) Or(d Coverage) Coverage { if v, ok := o.Get(); ok { return v } return d } // NewOptDateTime returns new OptDateTime with value set to v. func NewOptDateTime(v time.Time) OptDateTime { return OptDateTime{ Value: v, Set: true, } } // OptDateTime is optional time.Time. type OptDateTime struct { Value time.Time Set bool } // IsSet returns true if OptDateTime was set. func (o OptDateTime) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptDateTime) Reset() { var v time.Time o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptDateTime) SetTo(v time.Time) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptDateTime) Get() (v time.Time, 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 OptDateTime) Or(d time.Time) time.Time { if v, ok := o.Get(); ok { return v } return d } // NewOptFloat64 returns new OptFloat64 with value set to v. func NewOptFloat64(v float64) OptFloat64 { return OptFloat64{ Value: v, Set: true, } } // OptFloat64 is optional float64. type OptFloat64 struct { Value float64 Set bool } // IsSet returns true if OptFloat64 was set. func (o OptFloat64) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptFloat64) Reset() { var v float64 o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptFloat64) SetTo(v float64) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptFloat64) Get() (v float64, 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 OptFloat64) Or(d float64) float64 { if v, ok := o.Get(); ok { return v } return d } // NewOptGeoState returns new OptGeoState with value set to v. func NewOptGeoState(v GeoState) OptGeoState { return OptGeoState{ Value: v, Set: true, } } // OptGeoState is optional GeoState. type OptGeoState struct { Value GeoState Set bool } // IsSet returns true if OptGeoState was set. func (o OptGeoState) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptGeoState) Reset() { var v GeoState o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptGeoState) SetTo(v GeoState) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptGeoState) Get() (v GeoState, 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 OptGeoState) Or(d GeoState) GeoState { if v, ok := o.Get(); ok { return v } return d } // NewOptHourRange returns new OptHourRange with value set to v. func NewOptHourRange(v HourRange) OptHourRange { return OptHourRange{ Value: v, Set: true, } } // OptHourRange is optional HourRange. type OptHourRange struct { Value HourRange Set bool } // IsSet returns true if OptHourRange was set. func (o OptHourRange) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptHourRange) Reset() { var v HourRange o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptHourRange) SetTo(v HourRange) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptHourRange) Get() (v HourRange, 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 OptHourRange) Or(d HourRange) HourRange { if v, ok := o.Get(); ok { return v } return d } // NewOptInt returns new OptInt with value set to v. func NewOptInt(v int) OptInt { return OptInt{ Value: v, Set: true, } } // OptInt is optional int. type OptInt struct { Value int Set bool } // IsSet returns true if OptInt was set. func (o OptInt) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptInt) Reset() { var v int o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptInt) SetTo(v int) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptInt) Get() (v int, 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 OptInt) Or(d int) int { if v, ok := o.Get(); ok { return v } return d } // NewOptOptions returns new OptOptions with value set to v. func NewOptOptions(v Options) OptOptions { return OptOptions{ Value: v, Set: true, } } // OptOptions is optional Options. type OptOptions struct { Value Options Set bool } // IsSet returns true if OptOptions was set. func (o OptOptions) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptOptions) Reset() { var v Options o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptOptions) SetTo(v Options) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptOptions) Get() (v Options, 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 OptOptions) Or(d Options) Options { if v, ok := o.Get(); ok { return v } return d } // NewOptPerformPredictionProfile returns new OptPerformPredictionProfile with value set to v. func NewOptPerformPredictionProfile(v PerformPredictionProfile) OptPerformPredictionProfile { return OptPerformPredictionProfile{ Value: v, Set: true, } } // OptPerformPredictionProfile is optional PerformPredictionProfile. type OptPerformPredictionProfile struct { Value PerformPredictionProfile Set bool } // IsSet returns true if OptPerformPredictionProfile was set. func (o OptPerformPredictionProfile) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPerformPredictionProfile) Reset() { var v PerformPredictionProfile o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPerformPredictionProfile) SetTo(v PerformPredictionProfile) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPerformPredictionProfile) Get() (v PerformPredictionProfile, 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 OptPerformPredictionProfile) Or(d PerformPredictionProfile) PerformPredictionProfile { if v, ok := o.Get(); ok { return v } return d } // NewOptPiecewiseSegmentReference returns new OptPiecewiseSegmentReference with value set to v. func NewOptPiecewiseSegmentReference(v PiecewiseSegmentReference) OptPiecewiseSegmentReference { return OptPiecewiseSegmentReference{ Value: v, Set: true, } } // OptPiecewiseSegmentReference is optional PiecewiseSegmentReference. type OptPiecewiseSegmentReference struct { Value PiecewiseSegmentReference Set bool } // IsSet returns true if OptPiecewiseSegmentReference was set. func (o OptPiecewiseSegmentReference) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPiecewiseSegmentReference) Reset() { var v PiecewiseSegmentReference o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPiecewiseSegmentReference) SetTo(v PiecewiseSegmentReference) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPiecewiseSegmentReference) Get() (v PiecewiseSegmentReference, 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 OptPiecewiseSegmentReference) Or(d PiecewiseSegmentReference) PiecewiseSegmentReference { if v, ok := o.Get(); ok { return v } return d } // NewOptPredictionResponseRequest returns new OptPredictionResponseRequest with value set to v. func NewOptPredictionResponseRequest(v PredictionResponseRequest) OptPredictionResponseRequest { return OptPredictionResponseRequest{ Value: v, Set: true, } } // OptPredictionResponseRequest is optional PredictionResponseRequest. type OptPredictionResponseRequest struct { Value PredictionResponseRequest Set bool } // IsSet returns true if OptPredictionResponseRequest was set. func (o OptPredictionResponseRequest) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPredictionResponseRequest) Reset() { var v PredictionResponseRequest o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPredictionResponseRequest) SetTo(v PredictionResponseRequest) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPredictionResponseRequest) Get() (v PredictionResponseRequest, 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 OptPredictionResponseRequest) Or(d PredictionResponseRequest) PredictionResponseRequest { if v, ok := o.Get(); ok { return v } return d } // NewOptPredictionResponseWarnings returns new OptPredictionResponseWarnings with value set to v. func NewOptPredictionResponseWarnings(v PredictionResponseWarnings) OptPredictionResponseWarnings { return OptPredictionResponseWarnings{ Value: v, Set: true, } } // OptPredictionResponseWarnings is optional PredictionResponseWarnings. type OptPredictionResponseWarnings struct { Value PredictionResponseWarnings Set bool } // IsSet returns true if OptPredictionResponseWarnings was set. func (o OptPredictionResponseWarnings) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPredictionResponseWarnings) Reset() { var v PredictionResponseWarnings o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPredictionResponseWarnings) SetTo(v PredictionResponseWarnings) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPredictionResponseWarnings) Get() (v PredictionResponseWarnings, 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 OptPredictionResponseWarnings) Or(d PredictionResponseWarnings) PredictionResponseWarnings { if v, ok := o.Get(); ok { return v } return d } // NewOptPredictionV2RequestDirection returns new OptPredictionV2RequestDirection with value set to v. func NewOptPredictionV2RequestDirection(v PredictionV2RequestDirection) OptPredictionV2RequestDirection { return OptPredictionV2RequestDirection{ Value: v, Set: true, } } // OptPredictionV2RequestDirection is optional PredictionV2RequestDirection. type OptPredictionV2RequestDirection struct { Value PredictionV2RequestDirection Set bool } // IsSet returns true if OptPredictionV2RequestDirection was set. func (o OptPredictionV2RequestDirection) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPredictionV2RequestDirection) Reset() { var v PredictionV2RequestDirection o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPredictionV2RequestDirection) SetTo(v PredictionV2RequestDirection) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPredictionV2RequestDirection) Get() (v PredictionV2RequestDirection, 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 OptPredictionV2RequestDirection) Or(d PredictionV2RequestDirection) PredictionV2RequestDirection { if v, ok := o.Get(); ok { return v } return d } // NewOptPredictionV2Response returns new OptPredictionV2Response with value set to v. func NewOptPredictionV2Response(v PredictionV2Response) OptPredictionV2Response { return OptPredictionV2Response{ Value: v, Set: true, } } // OptPredictionV2Response is optional PredictionV2Response. type OptPredictionV2Response struct { Value PredictionV2Response Set bool } // IsSet returns true if OptPredictionV2Response was set. func (o OptPredictionV2Response) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptPredictionV2Response) Reset() { var v PredictionV2Response o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptPredictionV2Response) SetTo(v PredictionV2Response) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptPredictionV2Response) Get() (v PredictionV2Response, 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 OptPredictionV2Response) Or(d PredictionV2Response) PredictionV2Response { if v, ok := o.Get(); ok { return v } return d } // NewOptRegion returns new OptRegion with value set to v. func NewOptRegion(v Region) OptRegion { return OptRegion{ Value: v, Set: true, } } // OptRegion is optional Region. type OptRegion struct { Value Region Set bool } // IsSet returns true if OptRegion was set. func (o OptRegion) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptRegion) Reset() { var v Region o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptRegion) SetTo(v Region) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptRegion) Get() (v Region, 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 OptRegion) Or(d Region) Region { 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 } // NewOptSubsetSpec returns new OptSubsetSpec with value set to v. func NewOptSubsetSpec(v SubsetSpec) OptSubsetSpec { return OptSubsetSpec{ Value: v, Set: true, } } // OptSubsetSpec is optional SubsetSpec. type OptSubsetSpec struct { Value SubsetSpec Set bool } // IsSet returns true if OptSubsetSpec was set. func (o OptSubsetSpec) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptSubsetSpec) Reset() { var v SubsetSpec o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptSubsetSpec) SetTo(v SubsetSpec) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptSubsetSpec) Get() (v SubsetSpec, 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 OptSubsetSpec) Or(d SubsetSpec) SubsetSpec { if v, ok := o.Get(); ok { return v } return d } // NewOptTerminationInfo returns new OptTerminationInfo with value set to v. func NewOptTerminationInfo(v TerminationInfo) OptTerminationInfo { return OptTerminationInfo{ Value: v, Set: true, } } // OptTerminationInfo is optional TerminationInfo. type OptTerminationInfo struct { Value TerminationInfo Set bool } // IsSet returns true if OptTerminationInfo was set. func (o OptTerminationInfo) IsSet() bool { return o.Set } // Reset unsets value. func (o *OptTerminationInfo) Reset() { var v TerminationInfo o.Value = v o.Set = false } // SetTo sets value to v. func (o *OptTerminationInfo) SetTo(v TerminationInfo) { o.Set = true o.Value = v } // Get returns value and boolean that denotes whether value was set. func (o OptTerminationInfo) Get() (v TerminationInfo, 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 OptTerminationInfo) Or(d TerminationInfo) TerminationInfo { if v, ok := o.Get(); ok { return v } return d } // Ref: #/components/schemas/Options type Options struct { StepSeconds OptFloat64 `json:"step_seconds"` Tolerance OptFloat64 `json:"tolerance"` } // GetStepSeconds returns the value of StepSeconds. func (s *Options) GetStepSeconds() OptFloat64 { return s.StepSeconds } // GetTolerance returns the value of Tolerance. func (s *Options) GetTolerance() OptFloat64 { return s.Tolerance } // SetStepSeconds sets the value of StepSeconds. func (s *Options) SetStepSeconds(val OptFloat64) { s.StepSeconds = val } // SetTolerance sets the value of Tolerance. func (s *Options) SetTolerance(val OptFloat64) { s.Tolerance = val } type PerformPredictionProfile string const ( PerformPredictionProfileStandardProfile PerformPredictionProfile = "standard_profile" PerformPredictionProfileFloatProfile PerformPredictionProfile = "float_profile" ) // AllValues returns all PerformPredictionProfile values. func (PerformPredictionProfile) AllValues() []PerformPredictionProfile { return []PerformPredictionProfile{ PerformPredictionProfileStandardProfile, PerformPredictionProfileFloatProfile, } } // MarshalText implements encoding.TextMarshaler. func (s PerformPredictionProfile) MarshalText() ([]byte, error) { switch s { case PerformPredictionProfileStandardProfile: return []byte(s), nil case PerformPredictionProfileFloatProfile: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PerformPredictionProfile) UnmarshalText(data []byte) error { switch PerformPredictionProfile(data) { case PerformPredictionProfileStandardProfile: *s = PerformPredictionProfileStandardProfile return nil case PerformPredictionProfileFloatProfile: *s = PerformPredictionProfileFloatProfile return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/PiecewiseSegment type PiecewiseSegment struct { Until float64 `json:"until"` Rate float64 `json:"rate"` Reference OptPiecewiseSegmentReference `json:"reference"` } // GetUntil returns the value of Until. func (s *PiecewiseSegment) GetUntil() float64 { return s.Until } // GetRate returns the value of Rate. func (s *PiecewiseSegment) GetRate() float64 { return s.Rate } // GetReference returns the value of Reference. func (s *PiecewiseSegment) GetReference() OptPiecewiseSegmentReference { return s.Reference } // SetUntil sets the value of Until. func (s *PiecewiseSegment) SetUntil(val float64) { s.Until = val } // SetRate sets the value of Rate. func (s *PiecewiseSegment) SetRate(val float64) { s.Rate = val } // SetReference sets the value of Reference. func (s *PiecewiseSegment) SetReference(val OptPiecewiseSegmentReference) { s.Reference = val } type PiecewiseSegmentReference string const ( PiecewiseSegmentReferenceAbsolute PiecewiseSegmentReference = "absolute" PiecewiseSegmentReferenceProfileStart PiecewiseSegmentReference = "profile_start" PiecewiseSegmentReferencePropagatorStart PiecewiseSegmentReference = "propagator_start" ) // AllValues returns all PiecewiseSegmentReference values. func (PiecewiseSegmentReference) AllValues() []PiecewiseSegmentReference { return []PiecewiseSegmentReference{ PiecewiseSegmentReferenceAbsolute, PiecewiseSegmentReferenceProfileStart, PiecewiseSegmentReferencePropagatorStart, } } // MarshalText implements encoding.TextMarshaler. func (s PiecewiseSegmentReference) MarshalText() ([]byte, error) { switch s { case PiecewiseSegmentReferenceAbsolute: return []byte(s), nil case PiecewiseSegmentReferenceProfileStart: return []byte(s), nil case PiecewiseSegmentReferencePropagatorStart: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PiecewiseSegmentReference) UnmarshalText(data []byte) error { switch PiecewiseSegmentReference(data) { case PiecewiseSegmentReferenceAbsolute: *s = PiecewiseSegmentReferenceAbsolute return nil case PiecewiseSegmentReferenceProfileStart: *s = PiecewiseSegmentReferenceProfileStart return nil case PiecewiseSegmentReferencePropagatorStart: *s = PiecewiseSegmentReferencePropagatorStart return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/PolygonVertex type PolygonVertex struct { Lat float64 `json:"lat"` Lng float64 `json:"lng"` } // GetLat returns the value of Lat. func (s *PolygonVertex) GetLat() float64 { return s.Lat } // GetLng returns the value of Lng. func (s *PolygonVertex) GetLng() float64 { return s.Lng } // SetLat sets the value of Lat. func (s *PolygonVertex) SetLat(val float64) { s.Lat = val } // SetLng sets the value of Lng. func (s *PolygonVertex) SetLng(val float64) { s.Lng = val } // Ref: #/components/schemas/PredictionJob type PredictionJob struct { ID string `json:"id"` Status PredictionJobStatus `json:"status"` CreatedAt time.Time `json:"created_at"` StartedAt OptDateTime `json:"started_at"` CompletedAt OptDateTime `json:"completed_at"` Error OptString `json:"error"` Result OptPredictionV2Response `json:"result"` } // GetID returns the value of ID. func (s *PredictionJob) GetID() string { return s.ID } // GetStatus returns the value of Status. func (s *PredictionJob) GetStatus() PredictionJobStatus { return s.Status } // GetCreatedAt returns the value of CreatedAt. func (s *PredictionJob) GetCreatedAt() time.Time { return s.CreatedAt } // GetStartedAt returns the value of StartedAt. func (s *PredictionJob) GetStartedAt() OptDateTime { return s.StartedAt } // GetCompletedAt returns the value of CompletedAt. func (s *PredictionJob) GetCompletedAt() OptDateTime { return s.CompletedAt } // GetError returns the value of Error. func (s *PredictionJob) GetError() OptString { return s.Error } // GetResult returns the value of Result. func (s *PredictionJob) GetResult() OptPredictionV2Response { return s.Result } // SetID sets the value of ID. func (s *PredictionJob) SetID(val string) { s.ID = val } // SetStatus sets the value of Status. func (s *PredictionJob) SetStatus(val PredictionJobStatus) { s.Status = val } // SetCreatedAt sets the value of CreatedAt. func (s *PredictionJob) SetCreatedAt(val time.Time) { s.CreatedAt = val } // SetStartedAt sets the value of StartedAt. func (s *PredictionJob) SetStartedAt(val OptDateTime) { s.StartedAt = val } // SetCompletedAt sets the value of CompletedAt. func (s *PredictionJob) SetCompletedAt(val OptDateTime) { s.CompletedAt = val } // SetError sets the value of Error. func (s *PredictionJob) SetError(val OptString) { s.Error = val } // SetResult sets the value of Result. func (s *PredictionJob) SetResult(val OptPredictionV2Response) { s.Result = val } type PredictionJobStatus string const ( PredictionJobStatusPending PredictionJobStatus = "pending" PredictionJobStatusRunning PredictionJobStatus = "running" PredictionJobStatusComplete PredictionJobStatus = "complete" PredictionJobStatusFailed PredictionJobStatus = "failed" PredictionJobStatusCancelled PredictionJobStatus = "cancelled" ) // AllValues returns all PredictionJobStatus values. func (PredictionJobStatus) AllValues() []PredictionJobStatus { return []PredictionJobStatus{ PredictionJobStatusPending, PredictionJobStatusRunning, PredictionJobStatusComplete, PredictionJobStatusFailed, PredictionJobStatusCancelled, } } // MarshalText implements encoding.TextMarshaler. func (s PredictionJobStatus) MarshalText() ([]byte, error) { switch s { case PredictionJobStatusPending: return []byte(s), nil case PredictionJobStatusRunning: return []byte(s), nil case PredictionJobStatusComplete: return []byte(s), nil case PredictionJobStatusFailed: return []byte(s), nil case PredictionJobStatusCancelled: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PredictionJobStatus) UnmarshalText(data []byte) error { switch PredictionJobStatus(data) { case PredictionJobStatusPending: *s = PredictionJobStatusPending return nil case PredictionJobStatusRunning: *s = PredictionJobStatusRunning return nil case PredictionJobStatusComplete: *s = PredictionJobStatusComplete return nil case PredictionJobStatusFailed: *s = PredictionJobStatusFailed return nil case PredictionJobStatusCancelled: *s = PredictionJobStatusCancelled return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/PredictionResponse type PredictionResponse struct { Request OptPredictionResponseRequest `json:"request"` Prediction []PredictionResponsePredictionItem `json:"prediction"` Metadata PredictionResponseMetadata `json:"metadata"` Warnings OptPredictionResponseWarnings `json:"warnings"` } // GetRequest returns the value of Request. func (s *PredictionResponse) GetRequest() OptPredictionResponseRequest { return s.Request } // GetPrediction returns the value of Prediction. func (s *PredictionResponse) GetPrediction() []PredictionResponsePredictionItem { return s.Prediction } // GetMetadata returns the value of Metadata. func (s *PredictionResponse) GetMetadata() PredictionResponseMetadata { return s.Metadata } // GetWarnings returns the value of Warnings. func (s *PredictionResponse) GetWarnings() OptPredictionResponseWarnings { return s.Warnings } // SetRequest sets the value of Request. func (s *PredictionResponse) SetRequest(val OptPredictionResponseRequest) { s.Request = val } // SetPrediction sets the value of Prediction. func (s *PredictionResponse) SetPrediction(val []PredictionResponsePredictionItem) { s.Prediction = val } // SetMetadata sets the value of Metadata. func (s *PredictionResponse) SetMetadata(val PredictionResponseMetadata) { s.Metadata = val } // SetWarnings sets the value of Warnings. func (s *PredictionResponse) SetWarnings(val OptPredictionResponseWarnings) { s.Warnings = val } type PredictionResponseMetadata struct { StartDatetime time.Time `json:"start_datetime"` CompleteDatetime time.Time `json:"complete_datetime"` } // GetStartDatetime returns the value of StartDatetime. func (s *PredictionResponseMetadata) GetStartDatetime() time.Time { return s.StartDatetime } // GetCompleteDatetime returns the value of CompleteDatetime. func (s *PredictionResponseMetadata) GetCompleteDatetime() time.Time { return s.CompleteDatetime } // SetStartDatetime sets the value of StartDatetime. func (s *PredictionResponseMetadata) SetStartDatetime(val time.Time) { s.StartDatetime = val } // SetCompleteDatetime sets the value of CompleteDatetime. func (s *PredictionResponseMetadata) SetCompleteDatetime(val time.Time) { s.CompleteDatetime = val } type PredictionResponsePredictionItem struct { Stage PredictionResponsePredictionItemStage `json:"stage"` Trajectory []TawhiriPoint `json:"trajectory"` } // GetStage returns the value of Stage. func (s *PredictionResponsePredictionItem) GetStage() PredictionResponsePredictionItemStage { return s.Stage } // GetTrajectory returns the value of Trajectory. func (s *PredictionResponsePredictionItem) GetTrajectory() []TawhiriPoint { return s.Trajectory } // SetStage sets the value of Stage. func (s *PredictionResponsePredictionItem) SetStage(val PredictionResponsePredictionItemStage) { s.Stage = val } // SetTrajectory sets the value of Trajectory. func (s *PredictionResponsePredictionItem) SetTrajectory(val []TawhiriPoint) { s.Trajectory = val } type PredictionResponsePredictionItemStage string const ( PredictionResponsePredictionItemStageAscent PredictionResponsePredictionItemStage = "ascent" PredictionResponsePredictionItemStageDescent PredictionResponsePredictionItemStage = "descent" PredictionResponsePredictionItemStageFloat PredictionResponsePredictionItemStage = "float" ) // AllValues returns all PredictionResponsePredictionItemStage values. func (PredictionResponsePredictionItemStage) AllValues() []PredictionResponsePredictionItemStage { return []PredictionResponsePredictionItemStage{ PredictionResponsePredictionItemStageAscent, PredictionResponsePredictionItemStageDescent, PredictionResponsePredictionItemStageFloat, } } // MarshalText implements encoding.TextMarshaler. func (s PredictionResponsePredictionItemStage) MarshalText() ([]byte, error) { switch s { case PredictionResponsePredictionItemStageAscent: return []byte(s), nil case PredictionResponsePredictionItemStageDescent: return []byte(s), nil case PredictionResponsePredictionItemStageFloat: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PredictionResponsePredictionItemStage) UnmarshalText(data []byte) error { switch PredictionResponsePredictionItemStage(data) { case PredictionResponsePredictionItemStageAscent: *s = PredictionResponsePredictionItemStageAscent return nil case PredictionResponsePredictionItemStageDescent: *s = PredictionResponsePredictionItemStageDescent return nil case PredictionResponsePredictionItemStageFloat: *s = PredictionResponsePredictionItemStageFloat return nil default: return errors.Errorf("invalid value: %q", data) } } type PredictionResponseRequest struct { Dataset OptString `json:"dataset"` LaunchLatitude OptFloat64 `json:"launch_latitude"` LaunchLongitude OptFloat64 `json:"launch_longitude"` LaunchDatetime OptString `json:"launch_datetime"` LaunchAltitude OptFloat64 `json:"launch_altitude"` Profile OptString `json:"profile"` AscentRate OptFloat64 `json:"ascent_rate"` BurstAltitude OptFloat64 `json:"burst_altitude"` DescentRate OptFloat64 `json:"descent_rate"` } // GetDataset returns the value of Dataset. func (s *PredictionResponseRequest) GetDataset() OptString { return s.Dataset } // GetLaunchLatitude returns the value of LaunchLatitude. func (s *PredictionResponseRequest) GetLaunchLatitude() OptFloat64 { return s.LaunchLatitude } // GetLaunchLongitude returns the value of LaunchLongitude. func (s *PredictionResponseRequest) GetLaunchLongitude() OptFloat64 { return s.LaunchLongitude } // GetLaunchDatetime returns the value of LaunchDatetime. func (s *PredictionResponseRequest) GetLaunchDatetime() OptString { return s.LaunchDatetime } // GetLaunchAltitude returns the value of LaunchAltitude. func (s *PredictionResponseRequest) GetLaunchAltitude() OptFloat64 { return s.LaunchAltitude } // GetProfile returns the value of Profile. func (s *PredictionResponseRequest) GetProfile() OptString { return s.Profile } // GetAscentRate returns the value of AscentRate. func (s *PredictionResponseRequest) GetAscentRate() OptFloat64 { return s.AscentRate } // GetBurstAltitude returns the value of BurstAltitude. func (s *PredictionResponseRequest) GetBurstAltitude() OptFloat64 { return s.BurstAltitude } // GetDescentRate returns the value of DescentRate. func (s *PredictionResponseRequest) GetDescentRate() OptFloat64 { return s.DescentRate } // SetDataset sets the value of Dataset. func (s *PredictionResponseRequest) SetDataset(val OptString) { s.Dataset = val } // SetLaunchLatitude sets the value of LaunchLatitude. func (s *PredictionResponseRequest) SetLaunchLatitude(val OptFloat64) { s.LaunchLatitude = val } // SetLaunchLongitude sets the value of LaunchLongitude. func (s *PredictionResponseRequest) SetLaunchLongitude(val OptFloat64) { s.LaunchLongitude = val } // SetLaunchDatetime sets the value of LaunchDatetime. func (s *PredictionResponseRequest) SetLaunchDatetime(val OptString) { s.LaunchDatetime = val } // SetLaunchAltitude sets the value of LaunchAltitude. func (s *PredictionResponseRequest) SetLaunchAltitude(val OptFloat64) { s.LaunchAltitude = val } // SetProfile sets the value of Profile. func (s *PredictionResponseRequest) SetProfile(val OptString) { s.Profile = val } // SetAscentRate sets the value of AscentRate. func (s *PredictionResponseRequest) SetAscentRate(val OptFloat64) { s.AscentRate = val } // SetBurstAltitude sets the value of BurstAltitude. func (s *PredictionResponseRequest) SetBurstAltitude(val OptFloat64) { s.BurstAltitude = val } // SetDescentRate sets the value of DescentRate. func (s *PredictionResponseRequest) SetDescentRate(val OptFloat64) { s.DescentRate = val } type PredictionResponseWarnings map[string]jx.Raw func (s *PredictionResponseWarnings) init() PredictionResponseWarnings { m := *s if m == nil { m = map[string]jx.Raw{} *s = m } return m } // A profile-driven prediction. `profile` is an ordered chain of // propagators; each integrates from where the previous ended. A stage's // `constraints` decide when it ends and what happens next: stop the // profile, hand off to `fallback_index`, or clip to the boundary. // Ref: #/components/schemas/PredictionV2Request type PredictionV2Request struct { Launch Launch `json:"launch"` // Forward integrates launch→landing; reverse integrates backward in time. Direction OptPredictionV2RequestDirection `json:"direction"` Profile []StageSpec `json:"profile"` // Constraints evaluated on every stage in addition to its own. Globals []ConstraintSpec `json:"globals"` Options OptOptions `json:"options"` } // GetLaunch returns the value of Launch. func (s *PredictionV2Request) GetLaunch() Launch { return s.Launch } // GetDirection returns the value of Direction. func (s *PredictionV2Request) GetDirection() OptPredictionV2RequestDirection { return s.Direction } // GetProfile returns the value of Profile. func (s *PredictionV2Request) GetProfile() []StageSpec { return s.Profile } // GetGlobals returns the value of Globals. func (s *PredictionV2Request) GetGlobals() []ConstraintSpec { return s.Globals } // GetOptions returns the value of Options. func (s *PredictionV2Request) GetOptions() OptOptions { return s.Options } // SetLaunch sets the value of Launch. func (s *PredictionV2Request) SetLaunch(val Launch) { s.Launch = val } // SetDirection sets the value of Direction. func (s *PredictionV2Request) SetDirection(val OptPredictionV2RequestDirection) { s.Direction = val } // SetProfile sets the value of Profile. func (s *PredictionV2Request) SetProfile(val []StageSpec) { s.Profile = val } // SetGlobals sets the value of Globals. func (s *PredictionV2Request) SetGlobals(val []ConstraintSpec) { s.Globals = val } // SetOptions sets the value of Options. func (s *PredictionV2Request) SetOptions(val OptOptions) { s.Options = val } // Forward integrates launch→landing; reverse integrates backward in time. type PredictionV2RequestDirection string const ( PredictionV2RequestDirectionForward PredictionV2RequestDirection = "forward" PredictionV2RequestDirectionReverse PredictionV2RequestDirection = "reverse" ) // AllValues returns all PredictionV2RequestDirection values. func (PredictionV2RequestDirection) AllValues() []PredictionV2RequestDirection { return []PredictionV2RequestDirection{ PredictionV2RequestDirectionForward, PredictionV2RequestDirectionReverse, } } // MarshalText implements encoding.TextMarshaler. func (s PredictionV2RequestDirection) MarshalText() ([]byte, error) { switch s { case PredictionV2RequestDirectionForward: return []byte(s), nil case PredictionV2RequestDirectionReverse: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *PredictionV2RequestDirection) UnmarshalText(data []byte) error { switch PredictionV2RequestDirection(data) { case PredictionV2RequestDirectionForward: *s = PredictionV2RequestDirectionForward return nil case PredictionV2RequestDirectionReverse: *s = PredictionV2RequestDirectionReverse return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/PredictionV2Response type PredictionV2Response struct { Stages []StageResult `json:"stages"` Events []EventSummary `json:"events"` Dataset DatasetInfo `json:"dataset"` StartedAt time.Time `json:"started_at"` CompletedAt time.Time `json:"completed_at"` } // GetStages returns the value of Stages. func (s *PredictionV2Response) GetStages() []StageResult { return s.Stages } // GetEvents returns the value of Events. func (s *PredictionV2Response) GetEvents() []EventSummary { return s.Events } // GetDataset returns the value of Dataset. func (s *PredictionV2Response) GetDataset() DatasetInfo { return s.Dataset } // GetStartedAt returns the value of StartedAt. func (s *PredictionV2Response) GetStartedAt() time.Time { return s.StartedAt } // GetCompletedAt returns the value of CompletedAt. func (s *PredictionV2Response) GetCompletedAt() time.Time { return s.CompletedAt } // SetStages sets the value of Stages. func (s *PredictionV2Response) SetStages(val []StageResult) { s.Stages = val } // SetEvents sets the value of Events. func (s *PredictionV2Response) SetEvents(val []EventSummary) { s.Events = val } // SetDataset sets the value of Dataset. func (s *PredictionV2Response) SetDataset(val DatasetInfo) { s.Dataset = val } // SetStartedAt sets the value of StartedAt. func (s *PredictionV2Response) SetStartedAt(val time.Time) { s.StartedAt = val } // SetCompletedAt sets the value of CompletedAt. func (s *PredictionV2Response) SetCompletedAt(val time.Time) { s.CompletedAt = val } // Ref: #/components/schemas/ReadinessResponse type ReadinessResponse struct { Status ReadinessResponseStatus `json:"status"` DatasetTime OptDateTime `json:"dataset_time"` ErrorMessage OptString `json:"error_message"` } // GetStatus returns the value of Status. func (s *ReadinessResponse) GetStatus() ReadinessResponseStatus { return s.Status } // GetDatasetTime returns the value of DatasetTime. func (s *ReadinessResponse) GetDatasetTime() OptDateTime { return s.DatasetTime } // GetErrorMessage returns the value of ErrorMessage. func (s *ReadinessResponse) GetErrorMessage() OptString { return s.ErrorMessage } // SetStatus sets the value of Status. func (s *ReadinessResponse) SetStatus(val ReadinessResponseStatus) { s.Status = val } // SetDatasetTime sets the value of DatasetTime. func (s *ReadinessResponse) SetDatasetTime(val OptDateTime) { s.DatasetTime = val } // SetErrorMessage sets the value of ErrorMessage. func (s *ReadinessResponse) SetErrorMessage(val OptString) { s.ErrorMessage = val } type ReadinessResponseStatus string const ( ReadinessResponseStatusOk ReadinessResponseStatus = "ok" ReadinessResponseStatusNotReady ReadinessResponseStatus = "not_ready" ReadinessResponseStatusError ReadinessResponseStatus = "error" ) // AllValues returns all ReadinessResponseStatus values. func (ReadinessResponseStatus) AllValues() []ReadinessResponseStatus { return []ReadinessResponseStatus{ ReadinessResponseStatusOk, ReadinessResponseStatusNotReady, ReadinessResponseStatusError, } } // MarshalText implements encoding.TextMarshaler. func (s ReadinessResponseStatus) MarshalText() ([]byte, error) { switch s { case ReadinessResponseStatusOk: return []byte(s), nil case ReadinessResponseStatusNotReady: return []byte(s), nil case ReadinessResponseStatusError: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *ReadinessResponseStatus) UnmarshalText(data []byte) error { switch ReadinessResponseStatus(data) { case ReadinessResponseStatusOk: *s = ReadinessResponseStatusOk return nil case ReadinessResponseStatusNotReady: *s = ReadinessResponseStatusNotReady return nil case ReadinessResponseStatusError: *s = ReadinessResponseStatusError return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/Region type Region struct { MinLat float64 `json:"min_lat"` MaxLat float64 `json:"max_lat"` MinLng float64 `json:"min_lng"` MaxLng float64 `json:"max_lng"` } // GetMinLat returns the value of MinLat. func (s *Region) GetMinLat() float64 { return s.MinLat } // GetMaxLat returns the value of MaxLat. func (s *Region) GetMaxLat() float64 { return s.MaxLat } // GetMinLng returns the value of MinLng. func (s *Region) GetMinLng() float64 { return s.MinLng } // GetMaxLng returns the value of MaxLng. func (s *Region) GetMaxLng() float64 { return s.MaxLng } // SetMinLat sets the value of MinLat. func (s *Region) SetMinLat(val float64) { s.MinLat = val } // SetMaxLat sets the value of MaxLat. func (s *Region) SetMaxLat(val float64) { s.MaxLat = val } // SetMinLng sets the value of MinLng. func (s *Region) SetMinLng(val float64) { s.MinLng = val } // SetMaxLng sets the value of MaxLng. func (s *Region) SetMaxLng(val float64) { s.MaxLng = val } // Ref: #/components/schemas/StageResult type StageResult struct { Name string `json:"name"` Outcome StageResultOutcome `json:"outcome"` Constraint OptString `json:"constraint"` Termination OptTerminationInfo `json:"termination"` Events []EventSummary `json:"events"` Trajectory []TrajectoryPoint `json:"trajectory"` } // GetName returns the value of Name. func (s *StageResult) GetName() string { return s.Name } // GetOutcome returns the value of Outcome. func (s *StageResult) GetOutcome() StageResultOutcome { return s.Outcome } // GetConstraint returns the value of Constraint. func (s *StageResult) GetConstraint() OptString { return s.Constraint } // GetTermination returns the value of Termination. func (s *StageResult) GetTermination() OptTerminationInfo { return s.Termination } // GetEvents returns the value of Events. func (s *StageResult) GetEvents() []EventSummary { return s.Events } // GetTrajectory returns the value of Trajectory. func (s *StageResult) GetTrajectory() []TrajectoryPoint { return s.Trajectory } // SetName sets the value of Name. func (s *StageResult) SetName(val string) { s.Name = val } // SetOutcome sets the value of Outcome. func (s *StageResult) SetOutcome(val StageResultOutcome) { s.Outcome = val } // SetConstraint sets the value of Constraint. func (s *StageResult) SetConstraint(val OptString) { s.Constraint = val } // SetTermination sets the value of Termination. func (s *StageResult) SetTermination(val OptTerminationInfo) { s.Termination = val } // SetEvents sets the value of Events. func (s *StageResult) SetEvents(val []EventSummary) { s.Events = val } // SetTrajectory sets the value of Trajectory. func (s *StageResult) SetTrajectory(val []TrajectoryPoint) { s.Trajectory = val } type StageResultOutcome string const ( StageResultOutcomeStopped StageResultOutcome = "stopped" StageResultOutcomeFallback StageResultOutcome = "fallback" StageResultOutcomeContinued StageResultOutcome = "continued" ) // AllValues returns all StageResultOutcome values. func (StageResultOutcome) AllValues() []StageResultOutcome { return []StageResultOutcome{ StageResultOutcomeStopped, StageResultOutcomeFallback, StageResultOutcomeContinued, } } // MarshalText implements encoding.TextMarshaler. func (s StageResultOutcome) MarshalText() ([]byte, error) { switch s { case StageResultOutcomeStopped: return []byte(s), nil case StageResultOutcomeFallback: return []byte(s), nil case StageResultOutcomeContinued: return []byte(s), nil default: return nil, errors.Errorf("invalid value: %q", s) } } // UnmarshalText implements encoding.TextUnmarshaler. func (s *StageResultOutcome) UnmarshalText(data []byte) error { switch StageResultOutcome(data) { case StageResultOutcomeStopped: *s = StageResultOutcomeStopped return nil case StageResultOutcomeFallback: *s = StageResultOutcomeFallback return nil case StageResultOutcomeContinued: *s = StageResultOutcomeContinued return nil default: return errors.Errorf("invalid value: %q", data) } } // Ref: #/components/schemas/StageSpec type StageSpec struct { Name string `json:"name"` Model ModelSpec `json:"model"` Constraints []ConstraintSpec `json:"constraints"` FallbackIndex OptInt `json:"fallback_index"` } // GetName returns the value of Name. func (s *StageSpec) GetName() string { return s.Name } // GetModel returns the value of Model. func (s *StageSpec) GetModel() ModelSpec { return s.Model } // GetConstraints returns the value of Constraints. func (s *StageSpec) GetConstraints() []ConstraintSpec { return s.Constraints } // GetFallbackIndex returns the value of FallbackIndex. func (s *StageSpec) GetFallbackIndex() OptInt { return s.FallbackIndex } // SetName sets the value of Name. func (s *StageSpec) SetName(val string) { s.Name = val } // SetModel sets the value of Model. func (s *StageSpec) SetModel(val ModelSpec) { s.Model = val } // SetConstraints sets the value of Constraints. func (s *StageSpec) SetConstraints(val []ConstraintSpec) { s.Constraints = val } // SetFallbackIndex sets the value of FallbackIndex. func (s *StageSpec) SetFallbackIndex(val OptInt) { s.FallbackIndex = val } // Ref: #/components/schemas/StatusResponse type StatusResponse struct { Source string `json:"source"` Uptime string `json:"uptime"` Goroutines int `json:"goroutines"` MemoryMB int64 `json:"memory_mb"` JobsByStatus StatusResponseJobsByStatus `json:"jobs_by_status"` StoredDatasets int `json:"stored_datasets"` LoadedDatasets int `json:"loaded_datasets"` } // GetSource returns the value of Source. func (s *StatusResponse) GetSource() string { return s.Source } // GetUptime returns the value of Uptime. func (s *StatusResponse) GetUptime() string { return s.Uptime } // GetGoroutines returns the value of Goroutines. func (s *StatusResponse) GetGoroutines() int { return s.Goroutines } // GetMemoryMB returns the value of MemoryMB. func (s *StatusResponse) GetMemoryMB() int64 { return s.MemoryMB } // GetJobsByStatus returns the value of JobsByStatus. func (s *StatusResponse) GetJobsByStatus() StatusResponseJobsByStatus { return s.JobsByStatus } // GetStoredDatasets returns the value of StoredDatasets. func (s *StatusResponse) GetStoredDatasets() int { return s.StoredDatasets } // GetLoadedDatasets returns the value of LoadedDatasets. func (s *StatusResponse) GetLoadedDatasets() int { return s.LoadedDatasets } // SetSource sets the value of Source. func (s *StatusResponse) SetSource(val string) { s.Source = val } // SetUptime sets the value of Uptime. func (s *StatusResponse) SetUptime(val string) { s.Uptime = val } // SetGoroutines sets the value of Goroutines. func (s *StatusResponse) SetGoroutines(val int) { s.Goroutines = val } // SetMemoryMB sets the value of MemoryMB. func (s *StatusResponse) SetMemoryMB(val int64) { s.MemoryMB = val } // SetJobsByStatus sets the value of JobsByStatus. func (s *StatusResponse) SetJobsByStatus(val StatusResponseJobsByStatus) { s.JobsByStatus = val } // SetStoredDatasets sets the value of StoredDatasets. func (s *StatusResponse) SetStoredDatasets(val int) { s.StoredDatasets = val } // SetLoadedDatasets sets the value of LoadedDatasets. func (s *StatusResponse) SetLoadedDatasets(val int) { s.LoadedDatasets = val } type StatusResponseJobsByStatus map[string]int func (s *StatusResponseJobsByStatus) init() StatusResponseJobsByStatus { m := *s if m == nil { m = map[string]int{} *s = m } return m } // Ref: #/components/schemas/SubsetSpec type SubsetSpec struct { Region OptRegion `json:"region"` HourRange OptHourRange `json:"hour_range"` Members []int `json:"members"` } // GetRegion returns the value of Region. func (s *SubsetSpec) GetRegion() OptRegion { return s.Region } // GetHourRange returns the value of HourRange. func (s *SubsetSpec) GetHourRange() OptHourRange { return s.HourRange } // GetMembers returns the value of Members. func (s *SubsetSpec) GetMembers() []int { return s.Members } // SetRegion sets the value of Region. func (s *SubsetSpec) SetRegion(val OptRegion) { s.Region = val } // SetHourRange sets the value of HourRange. func (s *SubsetSpec) SetHourRange(val OptHourRange) { s.HourRange = val } // SetMembers sets the value of Members. func (s *SubsetSpec) SetMembers(val []int) { s.Members = val } // Ref: #/components/schemas/TawhiriPoint type TawhiriPoint struct { Datetime time.Time `json:"datetime"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` } // GetDatetime returns the value of Datetime. func (s *TawhiriPoint) GetDatetime() time.Time { return s.Datetime } // GetLatitude returns the value of Latitude. func (s *TawhiriPoint) GetLatitude() float64 { return s.Latitude } // GetLongitude returns the value of Longitude. func (s *TawhiriPoint) GetLongitude() float64 { return s.Longitude } // GetAltitude returns the value of Altitude. func (s *TawhiriPoint) GetAltitude() float64 { return s.Altitude } // SetDatetime sets the value of Datetime. func (s *TawhiriPoint) SetDatetime(val time.Time) { s.Datetime = val } // SetLatitude sets the value of Latitude. func (s *TawhiriPoint) SetLatitude(val float64) { s.Latitude = val } // SetLongitude sets the value of Longitude. func (s *TawhiriPoint) SetLongitude(val float64) { s.Longitude = val } // SetAltitude sets the value of Altitude. func (s *TawhiriPoint) SetAltitude(val float64) { s.Altitude = val } // Ref: #/components/schemas/TerminationInfo type TerminationInfo struct { ViolationTime time.Time `json:"violation_time"` ViolationState GeoState `json:"violation_state"` RefinedTime time.Time `json:"refined_time"` RefinedState GeoState `json:"refined_state"` } // GetViolationTime returns the value of ViolationTime. func (s *TerminationInfo) GetViolationTime() time.Time { return s.ViolationTime } // GetViolationState returns the value of ViolationState. func (s *TerminationInfo) GetViolationState() GeoState { return s.ViolationState } // GetRefinedTime returns the value of RefinedTime. func (s *TerminationInfo) GetRefinedTime() time.Time { return s.RefinedTime } // GetRefinedState returns the value of RefinedState. func (s *TerminationInfo) GetRefinedState() GeoState { return s.RefinedState } // SetViolationTime sets the value of ViolationTime. func (s *TerminationInfo) SetViolationTime(val time.Time) { s.ViolationTime = val } // SetViolationState sets the value of ViolationState. func (s *TerminationInfo) SetViolationState(val GeoState) { s.ViolationState = val } // SetRefinedTime sets the value of RefinedTime. func (s *TerminationInfo) SetRefinedTime(val time.Time) { s.RefinedTime = val } // SetRefinedState sets the value of RefinedState. func (s *TerminationInfo) SetRefinedState(val GeoState) { s.RefinedState = val } // Ref: #/components/schemas/TrajectoryPoint type TrajectoryPoint struct { Time time.Time `json:"time"` Latitude float64 `json:"latitude"` Longitude float64 `json:"longitude"` Altitude float64 `json:"altitude"` } // GetTime returns the value of Time. func (s *TrajectoryPoint) GetTime() time.Time { return s.Time } // GetLatitude returns the value of Latitude. func (s *TrajectoryPoint) GetLatitude() float64 { return s.Latitude } // GetLongitude returns the value of Longitude. func (s *TrajectoryPoint) GetLongitude() float64 { return s.Longitude } // GetAltitude returns the value of Altitude. func (s *TrajectoryPoint) GetAltitude() float64 { return s.Altitude } // SetTime sets the value of Time. func (s *TrajectoryPoint) SetTime(val time.Time) { s.Time = val } // SetLatitude sets the value of Latitude. func (s *TrajectoryPoint) SetLatitude(val float64) { s.Latitude = val } // SetLongitude sets the value of Longitude. func (s *TrajectoryPoint) SetLongitude(val float64) { s.Longitude = val } // SetAltitude sets the value of Altitude. func (s *TrajectoryPoint) SetAltitude(val float64) { s.Altitude = val } // Ref: #/components/schemas/WindComponent type WindComponent struct { Header WindHeader `json:"header"` Data []float64 `json:"data"` } // GetHeader returns the value of Header. func (s *WindComponent) GetHeader() WindHeader { return s.Header } // GetData returns the value of Data. func (s *WindComponent) GetData() []float64 { return s.Data } // SetHeader sets the value of Header. func (s *WindComponent) SetHeader(val WindHeader) { s.Header = val } // SetData sets the value of Data. func (s *WindComponent) SetData(val []float64) { s.Data = val } // Ref: #/components/schemas/WindHeader type WindHeader struct { ParameterCategory int `json:"parameterCategory"` ParameterNumber int `json:"parameterNumber"` ParameterNumberName OptString `json:"parameterNumberName"` ParameterUnit OptString `json:"parameterUnit"` Nx int `json:"nx"` Ny int `json:"ny"` Lo1 float64 `json:"lo1"` La1 float64 `json:"la1"` Lo2 float64 `json:"lo2"` La2 float64 `json:"la2"` Dx float64 `json:"dx"` Dy float64 `json:"dy"` RefTime string `json:"refTime"` ForecastTime int `json:"forecastTime"` } // GetParameterCategory returns the value of ParameterCategory. func (s *WindHeader) GetParameterCategory() int { return s.ParameterCategory } // GetParameterNumber returns the value of ParameterNumber. func (s *WindHeader) GetParameterNumber() int { return s.ParameterNumber } // GetParameterNumberName returns the value of ParameterNumberName. func (s *WindHeader) GetParameterNumberName() OptString { return s.ParameterNumberName } // GetParameterUnit returns the value of ParameterUnit. func (s *WindHeader) GetParameterUnit() OptString { return s.ParameterUnit } // GetNx returns the value of Nx. func (s *WindHeader) GetNx() int { return s.Nx } // GetNy returns the value of Ny. func (s *WindHeader) GetNy() int { return s.Ny } // GetLo1 returns the value of Lo1. func (s *WindHeader) GetLo1() float64 { return s.Lo1 } // GetLa1 returns the value of La1. func (s *WindHeader) GetLa1() float64 { return s.La1 } // GetLo2 returns the value of Lo2. func (s *WindHeader) GetLo2() float64 { return s.Lo2 } // GetLa2 returns the value of La2. func (s *WindHeader) GetLa2() float64 { return s.La2 } // GetDx returns the value of Dx. func (s *WindHeader) GetDx() float64 { return s.Dx } // GetDy returns the value of Dy. func (s *WindHeader) GetDy() float64 { return s.Dy } // GetRefTime returns the value of RefTime. func (s *WindHeader) GetRefTime() string { return s.RefTime } // GetForecastTime returns the value of ForecastTime. func (s *WindHeader) GetForecastTime() int { return s.ForecastTime } // SetParameterCategory sets the value of ParameterCategory. func (s *WindHeader) SetParameterCategory(val int) { s.ParameterCategory = val } // SetParameterNumber sets the value of ParameterNumber. func (s *WindHeader) SetParameterNumber(val int) { s.ParameterNumber = val } // SetParameterNumberName sets the value of ParameterNumberName. func (s *WindHeader) SetParameterNumberName(val OptString) { s.ParameterNumberName = val } // SetParameterUnit sets the value of ParameterUnit. func (s *WindHeader) SetParameterUnit(val OptString) { s.ParameterUnit = val } // SetNx sets the value of Nx. func (s *WindHeader) SetNx(val int) { s.Nx = val } // SetNy sets the value of Ny. func (s *WindHeader) SetNy(val int) { s.Ny = val } // SetLo1 sets the value of Lo1. func (s *WindHeader) SetLo1(val float64) { s.Lo1 = val } // SetLa1 sets the value of La1. func (s *WindHeader) SetLa1(val float64) { s.La1 = val } // SetLo2 sets the value of Lo2. func (s *WindHeader) SetLo2(val float64) { s.Lo2 = val } // SetLa2 sets the value of La2. func (s *WindHeader) SetLa2(val float64) { s.La2 = val } // SetDx sets the value of Dx. func (s *WindHeader) SetDx(val float64) { s.Dx = val } // SetDy sets the value of Dy. func (s *WindHeader) SetDy(val float64) { s.Dy = val } // SetRefTime sets the value of RefTime. func (s *WindHeader) SetRefTime(val string) { s.RefTime = val } // SetForecastTime sets the value of ForecastTime. func (s *WindHeader) SetForecastTime(val int) { s.ForecastTime = val } // Ref: #/components/schemas/WindMeta type WindMeta struct { Source string `json:"source"` Epoch time.Time `json:"epoch"` DefaultStep float64 `json:"default_step"` MinStep float64 `json:"min_step"` SuggestedAltitudes []int `json:"suggested_altitudes"` Bbox Region `json:"bbox"` } // GetSource returns the value of Source. func (s *WindMeta) GetSource() string { return s.Source } // GetEpoch returns the value of Epoch. func (s *WindMeta) GetEpoch() time.Time { return s.Epoch } // GetDefaultStep returns the value of DefaultStep. func (s *WindMeta) GetDefaultStep() float64 { return s.DefaultStep } // GetMinStep returns the value of MinStep. func (s *WindMeta) GetMinStep() float64 { return s.MinStep } // GetSuggestedAltitudes returns the value of SuggestedAltitudes. func (s *WindMeta) GetSuggestedAltitudes() []int { return s.SuggestedAltitudes } // GetBbox returns the value of Bbox. func (s *WindMeta) GetBbox() Region { return s.Bbox } // SetSource sets the value of Source. func (s *WindMeta) SetSource(val string) { s.Source = val } // SetEpoch sets the value of Epoch. func (s *WindMeta) SetEpoch(val time.Time) { s.Epoch = val } // SetDefaultStep sets the value of DefaultStep. func (s *WindMeta) SetDefaultStep(val float64) { s.DefaultStep = val } // SetMinStep sets the value of MinStep. func (s *WindMeta) SetMinStep(val float64) { s.MinStep = val } // SetSuggestedAltitudes sets the value of SuggestedAltitudes. func (s *WindMeta) SetSuggestedAltitudes(val []int) { s.SuggestedAltitudes = val } // SetBbox sets the value of Bbox. func (s *WindMeta) SetBbox(val Region) { s.Bbox = val }