rewrite
This commit is contained in:
parent
c4f355a32e
commit
7a8d5d13fa
72 changed files with 4510 additions and 4104 deletions
|
|
@ -1,12 +1,13 @@
|
|||
// Code generated by ogen, DO NOT EDIT.
|
||||
|
||||
package gsn
|
||||
package rest
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"time"
|
||||
|
||||
"github.com/go-faster/errors"
|
||||
"github.com/go-faster/jx"
|
||||
)
|
||||
|
||||
func (s *ErrorStatusCode) Error() string {
|
||||
|
|
@ -15,28 +16,42 @@ func (s *ErrorStatusCode) Error() string {
|
|||
|
||||
// Ref: #/components/schemas/Error
|
||||
type Error struct {
|
||||
Message string `json:"message"`
|
||||
Details OptString `json:"details"`
|
||||
Error ErrorError `json:"error"`
|
||||
}
|
||||
|
||||
// GetMessage returns the value of Message.
|
||||
func (s *Error) GetMessage() string {
|
||||
return s.Message
|
||||
// GetError returns the value of Error.
|
||||
func (s *Error) GetError() ErrorError {
|
||||
return s.Error
|
||||
}
|
||||
|
||||
// GetDetails returns the value of Details.
|
||||
func (s *Error) GetDetails() OptString {
|
||||
return s.Details
|
||||
// SetError sets the value of Error.
|
||||
func (s *Error) SetError(val ErrorError) {
|
||||
s.Error = val
|
||||
}
|
||||
|
||||
// SetMessage sets the value of Message.
|
||||
func (s *Error) SetMessage(val string) {
|
||||
s.Message = val
|
||||
type ErrorError struct {
|
||||
Type string `json:"type"`
|
||||
Description string `json:"description"`
|
||||
}
|
||||
|
||||
// SetDetails sets the value of Details.
|
||||
func (s *Error) SetDetails(val OptString) {
|
||||
s.Details = val
|
||||
// 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
|
||||
}
|
||||
|
||||
// ErrorStatusCode wraps Error with StatusCode.
|
||||
|
|
@ -65,52 +80,6 @@ func (s *ErrorStatusCode) SetResponse(val Error) {
|
|||
s.Response = val
|
||||
}
|
||||
|
||||
// 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
|
||||
}
|
||||
|
||||
// NewOptDateTime returns new OptDateTime with value set to v.
|
||||
func NewOptDateTime(v time.Time) OptDateTime {
|
||||
return OptDateTime{
|
||||
|
|
@ -203,52 +172,6 @@ func (o OptFloat64) Or(d float64) float64 {
|
|||
return d
|
||||
}
|
||||
|
||||
// NewOptPerformPredictionFormat returns new OptPerformPredictionFormat with value set to v.
|
||||
func NewOptPerformPredictionFormat(v PerformPredictionFormat) OptPerformPredictionFormat {
|
||||
return OptPerformPredictionFormat{
|
||||
Value: v,
|
||||
Set: true,
|
||||
}
|
||||
}
|
||||
|
||||
// OptPerformPredictionFormat is optional PerformPredictionFormat.
|
||||
type OptPerformPredictionFormat struct {
|
||||
Value PerformPredictionFormat
|
||||
Set bool
|
||||
}
|
||||
|
||||
// IsSet returns true if OptPerformPredictionFormat was set.
|
||||
func (o OptPerformPredictionFormat) IsSet() bool { return o.Set }
|
||||
|
||||
// Reset unsets value.
|
||||
func (o *OptPerformPredictionFormat) Reset() {
|
||||
var v PerformPredictionFormat
|
||||
o.Value = v
|
||||
o.Set = false
|
||||
}
|
||||
|
||||
// SetTo sets value to v.
|
||||
func (o *OptPerformPredictionFormat) SetTo(v PerformPredictionFormat) {
|
||||
o.Set = true
|
||||
o.Value = v
|
||||
}
|
||||
|
||||
// Get returns value and boolean that denotes whether value was set.
|
||||
func (o OptPerformPredictionFormat) Get() (v PerformPredictionFormat, 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 OptPerformPredictionFormat) Or(d PerformPredictionFormat) PerformPredictionFormat {
|
||||
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{
|
||||
|
|
@ -295,6 +218,98 @@ func (o OptPerformPredictionProfile) Or(d PerformPredictionProfile) PerformPredi
|
|||
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
|
||||
}
|
||||
|
||||
// NewOptString returns new OptString with value set to v.
|
||||
func NewOptString(v string) OptString {
|
||||
return OptString{
|
||||
|
|
@ -341,47 +356,11 @@ func (o OptString) Or(d string) string {
|
|||
return d
|
||||
}
|
||||
|
||||
type PerformPredictionFormat string
|
||||
|
||||
const (
|
||||
PerformPredictionFormatJSON PerformPredictionFormat = "json"
|
||||
)
|
||||
|
||||
// AllValues returns all PerformPredictionFormat values.
|
||||
func (PerformPredictionFormat) AllValues() []PerformPredictionFormat {
|
||||
return []PerformPredictionFormat{
|
||||
PerformPredictionFormatJSON,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s PerformPredictionFormat) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case PerformPredictionFormatJSON:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *PerformPredictionFormat) UnmarshalText(data []byte) error {
|
||||
switch PerformPredictionFormat(data) {
|
||||
case PerformPredictionFormatJSON:
|
||||
*s = PerformPredictionFormatJSON
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
type PerformPredictionProfile string
|
||||
|
||||
const (
|
||||
PerformPredictionProfileStandardProfile PerformPredictionProfile = "standard_profile"
|
||||
PerformPredictionProfileFloatProfile PerformPredictionProfile = "float_profile"
|
||||
PerformPredictionProfileReverseProfile PerformPredictionProfile = "reverse_profile"
|
||||
PerformPredictionProfileCustomProfile PerformPredictionProfile = "custom_profile"
|
||||
)
|
||||
|
||||
// AllValues returns all PerformPredictionProfile values.
|
||||
|
|
@ -389,8 +368,6 @@ func (PerformPredictionProfile) AllValues() []PerformPredictionProfile {
|
|||
return []PerformPredictionProfile{
|
||||
PerformPredictionProfileStandardProfile,
|
||||
PerformPredictionProfileFloatProfile,
|
||||
PerformPredictionProfileReverseProfile,
|
||||
PerformPredictionProfileCustomProfile,
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -401,10 +378,6 @@ func (s PerformPredictionProfile) MarshalText() ([]byte, error) {
|
|||
return []byte(s), nil
|
||||
case PerformPredictionProfileFloatProfile:
|
||||
return []byte(s), nil
|
||||
case PerformPredictionProfileReverseProfile:
|
||||
return []byte(s), nil
|
||||
case PerformPredictionProfileCustomProfile:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
}
|
||||
|
|
@ -419,114 +392,134 @@ func (s *PerformPredictionProfile) UnmarshalText(data []byte) error {
|
|||
case PerformPredictionProfileFloatProfile:
|
||||
*s = PerformPredictionProfileFloatProfile
|
||||
return nil
|
||||
case PerformPredictionProfileReverseProfile:
|
||||
*s = PerformPredictionProfileReverseProfile
|
||||
return nil
|
||||
case PerformPredictionProfileCustomProfile:
|
||||
*s = PerformPredictionProfileCustomProfile
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
// Ref: #/components/schemas/PredictionResult
|
||||
type PredictionResult struct {
|
||||
Metadata PredictionResultMetadata `json:"metadata"`
|
||||
Prediction []PredictionResultPredictionItem `json:"prediction"`
|
||||
// Ref: #/components/schemas/PredictionResponse
|
||||
type PredictionResponse struct {
|
||||
Request OptPredictionResponseRequest `json:"request"`
|
||||
Prediction []PredictionResponsePredictionItem `json:"prediction"`
|
||||
Metadata PredictionResponseMetadata `json:"metadata"`
|
||||
Warnings OptPredictionResponseWarnings `json:"warnings"`
|
||||
}
|
||||
|
||||
// GetMetadata returns the value of Metadata.
|
||||
func (s *PredictionResult) GetMetadata() PredictionResultMetadata {
|
||||
return s.Metadata
|
||||
// GetRequest returns the value of Request.
|
||||
func (s *PredictionResponse) GetRequest() OptPredictionResponseRequest {
|
||||
return s.Request
|
||||
}
|
||||
|
||||
// GetPrediction returns the value of Prediction.
|
||||
func (s *PredictionResult) GetPrediction() []PredictionResultPredictionItem {
|
||||
func (s *PredictionResponse) GetPrediction() []PredictionResponsePredictionItem {
|
||||
return s.Prediction
|
||||
}
|
||||
|
||||
// SetMetadata sets the value of Metadata.
|
||||
func (s *PredictionResult) SetMetadata(val PredictionResultMetadata) {
|
||||
s.Metadata = val
|
||||
// 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 *PredictionResult) SetPrediction(val []PredictionResultPredictionItem) {
|
||||
func (s *PredictionResponse) SetPrediction(val []PredictionResponsePredictionItem) {
|
||||
s.Prediction = val
|
||||
}
|
||||
|
||||
type PredictionResultMetadata struct {
|
||||
CompleteDatetime time.Time `json:"complete_datetime"`
|
||||
StartDatetime time.Time `json:"start_datetime"`
|
||||
// SetMetadata sets the value of Metadata.
|
||||
func (s *PredictionResponse) SetMetadata(val PredictionResponseMetadata) {
|
||||
s.Metadata = val
|
||||
}
|
||||
|
||||
// GetCompleteDatetime returns the value of CompleteDatetime.
|
||||
func (s *PredictionResultMetadata) GetCompleteDatetime() time.Time {
|
||||
return s.CompleteDatetime
|
||||
// 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 *PredictionResultMetadata) GetStartDatetime() time.Time {
|
||||
func (s *PredictionResponseMetadata) GetStartDatetime() time.Time {
|
||||
return s.StartDatetime
|
||||
}
|
||||
|
||||
// SetCompleteDatetime sets the value of CompleteDatetime.
|
||||
func (s *PredictionResultMetadata) SetCompleteDatetime(val time.Time) {
|
||||
s.CompleteDatetime = val
|
||||
// GetCompleteDatetime returns the value of CompleteDatetime.
|
||||
func (s *PredictionResponseMetadata) GetCompleteDatetime() time.Time {
|
||||
return s.CompleteDatetime
|
||||
}
|
||||
|
||||
// SetStartDatetime sets the value of StartDatetime.
|
||||
func (s *PredictionResultMetadata) SetStartDatetime(val time.Time) {
|
||||
func (s *PredictionResponseMetadata) SetStartDatetime(val time.Time) {
|
||||
s.StartDatetime = val
|
||||
}
|
||||
|
||||
type PredictionResultPredictionItem struct {
|
||||
Stage PredictionResultPredictionItemStage `json:"stage"`
|
||||
Trajectory []PredictionResultPredictionItemTrajectoryItem `json:"trajectory"`
|
||||
// SetCompleteDatetime sets the value of CompleteDatetime.
|
||||
func (s *PredictionResponseMetadata) SetCompleteDatetime(val time.Time) {
|
||||
s.CompleteDatetime = val
|
||||
}
|
||||
|
||||
type PredictionResponsePredictionItem struct {
|
||||
Stage PredictionResponsePredictionItemStage `json:"stage"`
|
||||
Trajectory []PredictionResponsePredictionItemTrajectoryItem `json:"trajectory"`
|
||||
}
|
||||
|
||||
// GetStage returns the value of Stage.
|
||||
func (s *PredictionResultPredictionItem) GetStage() PredictionResultPredictionItemStage {
|
||||
func (s *PredictionResponsePredictionItem) GetStage() PredictionResponsePredictionItemStage {
|
||||
return s.Stage
|
||||
}
|
||||
|
||||
// GetTrajectory returns the value of Trajectory.
|
||||
func (s *PredictionResultPredictionItem) GetTrajectory() []PredictionResultPredictionItemTrajectoryItem {
|
||||
func (s *PredictionResponsePredictionItem) GetTrajectory() []PredictionResponsePredictionItemTrajectoryItem {
|
||||
return s.Trajectory
|
||||
}
|
||||
|
||||
// SetStage sets the value of Stage.
|
||||
func (s *PredictionResultPredictionItem) SetStage(val PredictionResultPredictionItemStage) {
|
||||
func (s *PredictionResponsePredictionItem) SetStage(val PredictionResponsePredictionItemStage) {
|
||||
s.Stage = val
|
||||
}
|
||||
|
||||
// SetTrajectory sets the value of Trajectory.
|
||||
func (s *PredictionResultPredictionItem) SetTrajectory(val []PredictionResultPredictionItemTrajectoryItem) {
|
||||
func (s *PredictionResponsePredictionItem) SetTrajectory(val []PredictionResponsePredictionItemTrajectoryItem) {
|
||||
s.Trajectory = val
|
||||
}
|
||||
|
||||
type PredictionResultPredictionItemStage string
|
||||
type PredictionResponsePredictionItemStage string
|
||||
|
||||
const (
|
||||
PredictionResultPredictionItemStageAscent PredictionResultPredictionItemStage = "ascent"
|
||||
PredictionResultPredictionItemStageDescent PredictionResultPredictionItemStage = "descent"
|
||||
PredictionResponsePredictionItemStageAscent PredictionResponsePredictionItemStage = "ascent"
|
||||
PredictionResponsePredictionItemStageDescent PredictionResponsePredictionItemStage = "descent"
|
||||
PredictionResponsePredictionItemStageFloat PredictionResponsePredictionItemStage = "float"
|
||||
)
|
||||
|
||||
// AllValues returns all PredictionResultPredictionItemStage values.
|
||||
func (PredictionResultPredictionItemStage) AllValues() []PredictionResultPredictionItemStage {
|
||||
return []PredictionResultPredictionItemStage{
|
||||
PredictionResultPredictionItemStageAscent,
|
||||
PredictionResultPredictionItemStageDescent,
|
||||
// AllValues returns all PredictionResponsePredictionItemStage values.
|
||||
func (PredictionResponsePredictionItemStage) AllValues() []PredictionResponsePredictionItemStage {
|
||||
return []PredictionResponsePredictionItemStage{
|
||||
PredictionResponsePredictionItemStageAscent,
|
||||
PredictionResponsePredictionItemStageDescent,
|
||||
PredictionResponsePredictionItemStageFloat,
|
||||
}
|
||||
}
|
||||
|
||||
// MarshalText implements encoding.TextMarshaler.
|
||||
func (s PredictionResultPredictionItemStage) MarshalText() ([]byte, error) {
|
||||
func (s PredictionResponsePredictionItemStage) MarshalText() ([]byte, error) {
|
||||
switch s {
|
||||
case PredictionResultPredictionItemStageAscent:
|
||||
case PredictionResponsePredictionItemStageAscent:
|
||||
return []byte(s), nil
|
||||
case PredictionResultPredictionItemStageDescent:
|
||||
case PredictionResponsePredictionItemStageDescent:
|
||||
return []byte(s), nil
|
||||
case PredictionResponsePredictionItemStageFloat:
|
||||
return []byte(s), nil
|
||||
default:
|
||||
return nil, errors.Errorf("invalid value: %q", s)
|
||||
|
|
@ -534,20 +527,23 @@ func (s PredictionResultPredictionItemStage) MarshalText() ([]byte, error) {
|
|||
}
|
||||
|
||||
// UnmarshalText implements encoding.TextUnmarshaler.
|
||||
func (s *PredictionResultPredictionItemStage) UnmarshalText(data []byte) error {
|
||||
switch PredictionResultPredictionItemStage(data) {
|
||||
case PredictionResultPredictionItemStageAscent:
|
||||
*s = PredictionResultPredictionItemStageAscent
|
||||
func (s *PredictionResponsePredictionItemStage) UnmarshalText(data []byte) error {
|
||||
switch PredictionResponsePredictionItemStage(data) {
|
||||
case PredictionResponsePredictionItemStageAscent:
|
||||
*s = PredictionResponsePredictionItemStageAscent
|
||||
return nil
|
||||
case PredictionResultPredictionItemStageDescent:
|
||||
*s = PredictionResultPredictionItemStageDescent
|
||||
case PredictionResponsePredictionItemStageDescent:
|
||||
*s = PredictionResponsePredictionItemStageDescent
|
||||
return nil
|
||||
case PredictionResponsePredictionItemStageFloat:
|
||||
*s = PredictionResponsePredictionItemStageFloat
|
||||
return nil
|
||||
default:
|
||||
return errors.Errorf("invalid value: %q", data)
|
||||
}
|
||||
}
|
||||
|
||||
type PredictionResultPredictionItemTrajectoryItem struct {
|
||||
type PredictionResponsePredictionItemTrajectoryItem struct {
|
||||
Datetime time.Time `json:"datetime"`
|
||||
Latitude float64 `json:"latitude"`
|
||||
Longitude float64 `json:"longitude"`
|
||||
|
|
@ -555,50 +551,162 @@ type PredictionResultPredictionItemTrajectoryItem struct {
|
|||
}
|
||||
|
||||
// GetDatetime returns the value of Datetime.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) GetDatetime() time.Time {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) GetDatetime() time.Time {
|
||||
return s.Datetime
|
||||
}
|
||||
|
||||
// GetLatitude returns the value of Latitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) GetLatitude() float64 {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) GetLatitude() float64 {
|
||||
return s.Latitude
|
||||
}
|
||||
|
||||
// GetLongitude returns the value of Longitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) GetLongitude() float64 {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) GetLongitude() float64 {
|
||||
return s.Longitude
|
||||
}
|
||||
|
||||
// GetAltitude returns the value of Altitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) GetAltitude() float64 {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) GetAltitude() float64 {
|
||||
return s.Altitude
|
||||
}
|
||||
|
||||
// SetDatetime sets the value of Datetime.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) SetDatetime(val time.Time) {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) SetDatetime(val time.Time) {
|
||||
s.Datetime = val
|
||||
}
|
||||
|
||||
// SetLatitude sets the value of Latitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) SetLatitude(val float64) {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) SetLatitude(val float64) {
|
||||
s.Latitude = val
|
||||
}
|
||||
|
||||
// SetLongitude sets the value of Longitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) SetLongitude(val float64) {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) SetLongitude(val float64) {
|
||||
s.Longitude = val
|
||||
}
|
||||
|
||||
// SetAltitude sets the value of Altitude.
|
||||
func (s *PredictionResultPredictionItemTrajectoryItem) SetAltitude(val float64) {
|
||||
func (s *PredictionResponsePredictionItemTrajectoryItem) SetAltitude(val float64) {
|
||||
s.Altitude = val
|
||||
}
|
||||
|
||||
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
|
||||
}
|
||||
|
||||
// Ref: #/components/schemas/ReadinessResponse
|
||||
type ReadinessResponse struct {
|
||||
Status ReadinessResponseStatus `json:"status"`
|
||||
LastUpdate OptDateTime `json:"last_update"`
|
||||
IsFresh OptBool `json:"is_fresh"`
|
||||
DatasetTime OptDateTime `json:"dataset_time"`
|
||||
ErrorMessage OptString `json:"error_message"`
|
||||
}
|
||||
|
||||
|
|
@ -607,14 +715,9 @@ func (s *ReadinessResponse) GetStatus() ReadinessResponseStatus {
|
|||
return s.Status
|
||||
}
|
||||
|
||||
// GetLastUpdate returns the value of LastUpdate.
|
||||
func (s *ReadinessResponse) GetLastUpdate() OptDateTime {
|
||||
return s.LastUpdate
|
||||
}
|
||||
|
||||
// GetIsFresh returns the value of IsFresh.
|
||||
func (s *ReadinessResponse) GetIsFresh() OptBool {
|
||||
return s.IsFresh
|
||||
// GetDatasetTime returns the value of DatasetTime.
|
||||
func (s *ReadinessResponse) GetDatasetTime() OptDateTime {
|
||||
return s.DatasetTime
|
||||
}
|
||||
|
||||
// GetErrorMessage returns the value of ErrorMessage.
|
||||
|
|
@ -627,14 +730,9 @@ func (s *ReadinessResponse) SetStatus(val ReadinessResponseStatus) {
|
|||
s.Status = val
|
||||
}
|
||||
|
||||
// SetLastUpdate sets the value of LastUpdate.
|
||||
func (s *ReadinessResponse) SetLastUpdate(val OptDateTime) {
|
||||
s.LastUpdate = val
|
||||
}
|
||||
|
||||
// SetIsFresh sets the value of IsFresh.
|
||||
func (s *ReadinessResponse) SetIsFresh(val OptBool) {
|
||||
s.IsFresh = val
|
||||
// SetDatasetTime sets the value of DatasetTime.
|
||||
func (s *ReadinessResponse) SetDatasetTime(val OptDateTime) {
|
||||
s.DatasetTime = val
|
||||
}
|
||||
|
||||
// SetErrorMessage sets the value of ErrorMessage.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue