From 1f277a9f1750efbbb5c4d5360bbb0b75434dfce0 Mon Sep 17 00:00:00 2001 From: Oscar Reyes Date: Tue, 25 Jun 2024 12:39:51 -0500 Subject: [PATCH] chore: Updating OpenAPI client --- api/monitors.yaml | 46 +++- api/openapi.yaml | 2 +- cli/openapi/api_api.go | 14 +- cli/openapi/model_alert_result.go | 36 +++ cli/openapi/model_monitor.go | 36 +++ cli/openapi/model_monitor_run.go | 36 +++ cli/openapi/model_run_monitor_information.go | 233 +++++++++++++++++++ cli/openapi/model_schedule.go | 38 ++- cli/openapi/model_webhook_result_request.go | 36 +++ cli/openapi/model_webhook_result_response.go | 54 ++++- 10 files changed, 511 insertions(+), 20 deletions(-) create mode 100644 cli/openapi/model_run_monitor_information.go diff --git a/api/monitors.yaml b/api/monitors.yaml index 43f664e722..94fd909362 100644 --- a/api/monitors.yaml +++ b/api/monitors.yaml @@ -65,6 +65,8 @@ components: $ref: "./testsuites.yaml#/components/schemas/TestSuite" variableSetId: type: string + tokenId: + type: string schedule: $ref: "#/components/schemas/Schedule" alerts: @@ -78,7 +80,7 @@ components: type: object properties: runs: - type: integer + type: integer lastState: type: string lastRunTime: @@ -90,6 +92,8 @@ components: properties: cron: type: string + timeZone: + type: string Alert: type: object @@ -158,6 +162,8 @@ components: enum: - MANUAL - SCHEDULED + lastError: + type: string state: type: string enum: [CREATED, EXECUTING, FINISHED, FAILED] @@ -199,6 +205,10 @@ components: type: string webhook: $ref: "#/components/schemas/WebhookResult" + type: + type: string + enum: + - webhook WebhookResult: type: object @@ -214,11 +224,23 @@ components: $ref: "./http.yaml#/components/schemas/HTTPHeader" body: type: string + method: + type: string + enum: + - GET + - POST + - PUT + - DELETE + - PATCH + - HEAD + - OPTIONS response: type: object properties: - status: + statusCode: type: integer + status: + type: string body: type: string headers: @@ -227,3 +249,23 @@ components: $ref: "./http.yaml#/components/schemas/HTTPHeader" error: type: string + + RunMonitorInformation: + type: object + properties: + metadata: + type: object + nullable: true + additionalProperties: + type: string + runGroupId: + type: string + runType: + type: string + enum: + - SCHEDULED + - MANUAL + variables: + type: array + items: + $ref: "./variableSets.yaml#/components/schemas/VariableSetValue" diff --git a/api/openapi.yaml b/api/openapi.yaml index 7037d38fbc..a821e44faf 100644 --- a/api/openapi.yaml +++ b/api/openapi.yaml @@ -1754,7 +1754,7 @@ paths: content: application/json: schema: - $ref: "./tests.yaml#/components/schemas/RunInformation" + $ref: "./monitors.yaml#/components/schemas/RunMonitorInformation" responses: 200: description: successful operation diff --git a/cli/openapi/api_api.go b/cli/openapi/api_api.go index 1813f00cea..45718bef18 100644 --- a/cli/openapi/api_api.go +++ b/cli/openapi/api_api.go @@ -4497,14 +4497,14 @@ func (a *ApiApiService) ResetOTLPConnectionInformationExecute(r ApiResetOTLPConn } type ApiRunMonitorRequest struct { - ctx context.Context - ApiService *ApiApiService - monitorId string - runInformation *RunInformation + ctx context.Context + ApiService *ApiApiService + monitorId string + runMonitorInformation *RunMonitorInformation } -func (r ApiRunMonitorRequest) RunInformation(runInformation RunInformation) ApiRunMonitorRequest { - r.runInformation = &runInformation +func (r ApiRunMonitorRequest) RunMonitorInformation(runMonitorInformation RunMonitorInformation) ApiRunMonitorRequest { + r.runMonitorInformation = &runMonitorInformation return r } @@ -4570,7 +4570,7 @@ func (a *ApiApiService) RunMonitorExecute(r ApiRunMonitorRequest) (*MonitorRun, localVarHeaderParams["Accept"] = localVarHTTPHeaderAccept } // body params - localVarPostBody = r.runInformation + localVarPostBody = r.runMonitorInformation req, err := a.client.prepareRequest(r.ctx, localVarPath, localVarHTTPMethod, localVarPostBody, localVarHeaderParams, localVarQueryParams, localVarFormParams, formFiles) if err != nil { return localVarReturnValue, nil, err diff --git a/cli/openapi/model_alert_result.go b/cli/openapi/model_alert_result.go index 67915dcff2..606bef7746 100644 --- a/cli/openapi/model_alert_result.go +++ b/cli/openapi/model_alert_result.go @@ -22,6 +22,7 @@ type AlertResult struct { AlertId *string `json:"alertId,omitempty"` Id *string `json:"id,omitempty"` Webhook *WebhookResult `json:"webhook,omitempty"` + Type *string `json:"type,omitempty"` } // NewAlertResult instantiates a new AlertResult object @@ -137,6 +138,38 @@ func (o *AlertResult) SetWebhook(v WebhookResult) { o.Webhook = &v } +// GetType returns the Type field value if set, zero value otherwise. +func (o *AlertResult) GetType() string { + if o == nil || isNil(o.Type) { + var ret string + return ret + } + return *o.Type +} + +// GetTypeOk returns a tuple with the Type field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *AlertResult) GetTypeOk() (*string, bool) { + if o == nil || isNil(o.Type) { + return nil, false + } + return o.Type, true +} + +// HasType returns a boolean if a field has been set. +func (o *AlertResult) HasType() bool { + if o != nil && !isNil(o.Type) { + return true + } + + return false +} + +// SetType gets a reference to the given string and assigns it to the Type field. +func (o *AlertResult) SetType(v string) { + o.Type = &v +} + func (o AlertResult) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -156,6 +189,9 @@ func (o AlertResult) ToMap() (map[string]interface{}, error) { if !isNil(o.Webhook) { toSerialize["webhook"] = o.Webhook } + if !isNil(o.Type) { + toSerialize["type"] = o.Type + } return toSerialize, nil } diff --git a/cli/openapi/model_monitor.go b/cli/openapi/model_monitor.go index f5e357a12a..9a48c8da24 100644 --- a/cli/openapi/model_monitor.go +++ b/cli/openapi/model_monitor.go @@ -36,6 +36,7 @@ type Monitor struct { // list of steps of the Monitor containing the whole test suite object FullTestSuites []TestSuite `json:"fullTestSuites,omitempty"` VariableSetId *string `json:"variableSetId,omitempty"` + TokenId *string `json:"tokenId,omitempty"` Schedule *Schedule `json:"schedule,omitempty"` Alerts []Alert `json:"alerts,omitempty"` Summary *Summary `json:"summary,omitempty"` @@ -442,6 +443,38 @@ func (o *Monitor) SetVariableSetId(v string) { o.VariableSetId = &v } +// GetTokenId returns the TokenId field value if set, zero value otherwise. +func (o *Monitor) GetTokenId() string { + if o == nil || isNil(o.TokenId) { + var ret string + return ret + } + return *o.TokenId +} + +// GetTokenIdOk returns a tuple with the TokenId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Monitor) GetTokenIdOk() (*string, bool) { + if o == nil || isNil(o.TokenId) { + return nil, false + } + return o.TokenId, true +} + +// HasTokenId returns a boolean if a field has been set. +func (o *Monitor) HasTokenId() bool { + if o != nil && !isNil(o.TokenId) { + return true + } + + return false +} + +// SetTokenId gets a reference to the given string and assigns it to the TokenId field. +func (o *Monitor) SetTokenId(v string) { + o.TokenId = &v +} + // GetSchedule returns the Schedule field value if set, zero value otherwise. func (o *Monitor) GetSchedule() Schedule { if o == nil || isNil(o.Schedule) { @@ -584,6 +617,9 @@ func (o Monitor) ToMap() (map[string]interface{}, error) { if !isNil(o.VariableSetId) { toSerialize["variableSetId"] = o.VariableSetId } + if !isNil(o.TokenId) { + toSerialize["tokenId"] = o.TokenId + } if !isNil(o.Schedule) { toSerialize["schedule"] = o.Schedule } diff --git a/cli/openapi/model_monitor_run.go b/cli/openapi/model_monitor_run.go index c6a5abb92f..90ddc5ac73 100644 --- a/cli/openapi/model_monitor_run.go +++ b/cli/openapi/model_monitor_run.go @@ -27,6 +27,7 @@ type MonitorRun struct { CreatedAt *time.Time `json:"createdAt,omitempty"` CompletedAt *time.Time `json:"completedAt,omitempty"` ExecutionType *string `json:"executionType,omitempty"` + LastError *string `json:"lastError,omitempty"` State *string `json:"state,omitempty"` VariableSet *VariableSet `json:"variableSet,omitempty"` Metadata *map[string]string `json:"metadata,omitempty"` @@ -284,6 +285,38 @@ func (o *MonitorRun) SetExecutionType(v string) { o.ExecutionType = &v } +// GetLastError returns the LastError field value if set, zero value otherwise. +func (o *MonitorRun) GetLastError() string { + if o == nil || isNil(o.LastError) { + var ret string + return ret + } + return *o.LastError +} + +// GetLastErrorOk returns a tuple with the LastError field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *MonitorRun) GetLastErrorOk() (*string, bool) { + if o == nil || isNil(o.LastError) { + return nil, false + } + return o.LastError, true +} + +// HasLastError returns a boolean if a field has been set. +func (o *MonitorRun) HasLastError() bool { + if o != nil && !isNil(o.LastError) { + return true + } + + return false +} + +// SetLastError gets a reference to the given string and assigns it to the LastError field. +func (o *MonitorRun) SetLastError(v string) { + o.LastError = &v +} + // GetState returns the State field value if set, zero value otherwise. func (o *MonitorRun) GetState() string { if o == nil || isNil(o.State) { @@ -569,6 +602,9 @@ func (o MonitorRun) ToMap() (map[string]interface{}, error) { if !isNil(o.ExecutionType) { toSerialize["executionType"] = o.ExecutionType } + if !isNil(o.LastError) { + toSerialize["lastError"] = o.LastError + } if !isNil(o.State) { toSerialize["state"] = o.State } diff --git a/cli/openapi/model_run_monitor_information.go b/cli/openapi/model_run_monitor_information.go new file mode 100644 index 0000000000..86f01d0bd7 --- /dev/null +++ b/cli/openapi/model_run_monitor_information.go @@ -0,0 +1,233 @@ +/* +TraceTest + +OpenAPI definition for TraceTest endpoint and resources + +API version: 0.2.1 +*/ + +// Code generated by OpenAPI Generator (https://openapi-generator.tech); DO NOT EDIT. + +package openapi + +import ( + "encoding/json" +) + +// checks if the RunMonitorInformation type satisfies the MappedNullable interface at compile time +var _ MappedNullable = &RunMonitorInformation{} + +// RunMonitorInformation struct for RunMonitorInformation +type RunMonitorInformation struct { + Metadata map[string]string `json:"metadata,omitempty"` + RunGroupId *string `json:"runGroupId,omitempty"` + RunType *string `json:"runType,omitempty"` + Variables []VariableSetValue `json:"variables,omitempty"` +} + +// NewRunMonitorInformation instantiates a new RunMonitorInformation object +// This constructor will assign default values to properties that have it defined, +// and makes sure properties required by API are set, but the set of arguments +// will change when the set of required properties is changed +func NewRunMonitorInformation() *RunMonitorInformation { + this := RunMonitorInformation{} + return &this +} + +// NewRunMonitorInformationWithDefaults instantiates a new RunMonitorInformation object +// This constructor will only assign default values to properties that have it defined, +// but it doesn't guarantee that properties required by API are set +func NewRunMonitorInformationWithDefaults() *RunMonitorInformation { + this := RunMonitorInformation{} + return &this +} + +// GetMetadata returns the Metadata field value if set, zero value otherwise (both if not set or set to explicit null). +func (o *RunMonitorInformation) GetMetadata() map[string]string { + if o == nil { + var ret map[string]string + return ret + } + return o.Metadata +} + +// GetMetadataOk returns a tuple with the Metadata field value if set, nil otherwise +// and a boolean to check if the value has been set. +// NOTE: If the value is an explicit nil, `nil, true` will be returned +func (o *RunMonitorInformation) GetMetadataOk() (*map[string]string, bool) { + if o == nil || isNil(o.Metadata) { + return nil, false + } + return &o.Metadata, true +} + +// HasMetadata returns a boolean if a field has been set. +func (o *RunMonitorInformation) HasMetadata() bool { + if o != nil && isNil(o.Metadata) { + return true + } + + return false +} + +// SetMetadata gets a reference to the given map[string]string and assigns it to the Metadata field. +func (o *RunMonitorInformation) SetMetadata(v map[string]string) { + o.Metadata = v +} + +// GetRunGroupId returns the RunGroupId field value if set, zero value otherwise. +func (o *RunMonitorInformation) GetRunGroupId() string { + if o == nil || isNil(o.RunGroupId) { + var ret string + return ret + } + return *o.RunGroupId +} + +// GetRunGroupIdOk returns a tuple with the RunGroupId field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunMonitorInformation) GetRunGroupIdOk() (*string, bool) { + if o == nil || isNil(o.RunGroupId) { + return nil, false + } + return o.RunGroupId, true +} + +// HasRunGroupId returns a boolean if a field has been set. +func (o *RunMonitorInformation) HasRunGroupId() bool { + if o != nil && !isNil(o.RunGroupId) { + return true + } + + return false +} + +// SetRunGroupId gets a reference to the given string and assigns it to the RunGroupId field. +func (o *RunMonitorInformation) SetRunGroupId(v string) { + o.RunGroupId = &v +} + +// GetRunType returns the RunType field value if set, zero value otherwise. +func (o *RunMonitorInformation) GetRunType() string { + if o == nil || isNil(o.RunType) { + var ret string + return ret + } + return *o.RunType +} + +// GetRunTypeOk returns a tuple with the RunType field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunMonitorInformation) GetRunTypeOk() (*string, bool) { + if o == nil || isNil(o.RunType) { + return nil, false + } + return o.RunType, true +} + +// HasRunType returns a boolean if a field has been set. +func (o *RunMonitorInformation) HasRunType() bool { + if o != nil && !isNil(o.RunType) { + return true + } + + return false +} + +// SetRunType gets a reference to the given string and assigns it to the RunType field. +func (o *RunMonitorInformation) SetRunType(v string) { + o.RunType = &v +} + +// GetVariables returns the Variables field value if set, zero value otherwise. +func (o *RunMonitorInformation) GetVariables() []VariableSetValue { + if o == nil || isNil(o.Variables) { + var ret []VariableSetValue + return ret + } + return o.Variables +} + +// GetVariablesOk returns a tuple with the Variables field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *RunMonitorInformation) GetVariablesOk() ([]VariableSetValue, bool) { + if o == nil || isNil(o.Variables) { + return nil, false + } + return o.Variables, true +} + +// HasVariables returns a boolean if a field has been set. +func (o *RunMonitorInformation) HasVariables() bool { + if o != nil && !isNil(o.Variables) { + return true + } + + return false +} + +// SetVariables gets a reference to the given []VariableSetValue and assigns it to the Variables field. +func (o *RunMonitorInformation) SetVariables(v []VariableSetValue) { + o.Variables = v +} + +func (o RunMonitorInformation) MarshalJSON() ([]byte, error) { + toSerialize, err := o.ToMap() + if err != nil { + return []byte{}, err + } + return json.Marshal(toSerialize) +} + +func (o RunMonitorInformation) ToMap() (map[string]interface{}, error) { + toSerialize := map[string]interface{}{} + if o.Metadata != nil { + toSerialize["metadata"] = o.Metadata + } + if !isNil(o.RunGroupId) { + toSerialize["runGroupId"] = o.RunGroupId + } + if !isNil(o.RunType) { + toSerialize["runType"] = o.RunType + } + if !isNil(o.Variables) { + toSerialize["variables"] = o.Variables + } + return toSerialize, nil +} + +type NullableRunMonitorInformation struct { + value *RunMonitorInformation + isSet bool +} + +func (v NullableRunMonitorInformation) Get() *RunMonitorInformation { + return v.value +} + +func (v *NullableRunMonitorInformation) Set(val *RunMonitorInformation) { + v.value = val + v.isSet = true +} + +func (v NullableRunMonitorInformation) IsSet() bool { + return v.isSet +} + +func (v *NullableRunMonitorInformation) Unset() { + v.value = nil + v.isSet = false +} + +func NewNullableRunMonitorInformation(val *RunMonitorInformation) *NullableRunMonitorInformation { + return &NullableRunMonitorInformation{value: val, isSet: true} +} + +func (v NullableRunMonitorInformation) MarshalJSON() ([]byte, error) { + return json.Marshal(v.value) +} + +func (v *NullableRunMonitorInformation) UnmarshalJSON(src []byte) error { + v.isSet = true + return json.Unmarshal(src, &v.value) +} diff --git a/cli/openapi/model_schedule.go b/cli/openapi/model_schedule.go index 48491c890b..be93194802 100644 --- a/cli/openapi/model_schedule.go +++ b/cli/openapi/model_schedule.go @@ -19,7 +19,8 @@ var _ MappedNullable = &Schedule{} // Schedule struct for Schedule type Schedule struct { - Cron *string `json:"cron,omitempty"` + Cron *string `json:"cron,omitempty"` + TimeZone *string `json:"timeZone,omitempty"` } // NewSchedule instantiates a new Schedule object @@ -71,6 +72,38 @@ func (o *Schedule) SetCron(v string) { o.Cron = &v } +// GetTimeZone returns the TimeZone field value if set, zero value otherwise. +func (o *Schedule) GetTimeZone() string { + if o == nil || isNil(o.TimeZone) { + var ret string + return ret + } + return *o.TimeZone +} + +// GetTimeZoneOk returns a tuple with the TimeZone field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *Schedule) GetTimeZoneOk() (*string, bool) { + if o == nil || isNil(o.TimeZone) { + return nil, false + } + return o.TimeZone, true +} + +// HasTimeZone returns a boolean if a field has been set. +func (o *Schedule) HasTimeZone() bool { + if o != nil && !isNil(o.TimeZone) { + return true + } + + return false +} + +// SetTimeZone gets a reference to the given string and assigns it to the TimeZone field. +func (o *Schedule) SetTimeZone(v string) { + o.TimeZone = &v +} + func (o Schedule) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -84,6 +117,9 @@ func (o Schedule) ToMap() (map[string]interface{}, error) { if !isNil(o.Cron) { toSerialize["cron"] = o.Cron } + if !isNil(o.TimeZone) { + toSerialize["timeZone"] = o.TimeZone + } return toSerialize, nil } diff --git a/cli/openapi/model_webhook_result_request.go b/cli/openapi/model_webhook_result_request.go index a1cf5e8040..0ae2d6432f 100644 --- a/cli/openapi/model_webhook_result_request.go +++ b/cli/openapi/model_webhook_result_request.go @@ -22,6 +22,7 @@ type WebhookResultRequest struct { Url *string `json:"url,omitempty"` Headers []HTTPHeader `json:"headers,omitempty"` Body *string `json:"body,omitempty"` + Method *string `json:"method,omitempty"` } // NewWebhookResultRequest instantiates a new WebhookResultRequest object @@ -137,6 +138,38 @@ func (o *WebhookResultRequest) SetBody(v string) { o.Body = &v } +// GetMethod returns the Method field value if set, zero value otherwise. +func (o *WebhookResultRequest) GetMethod() string { + if o == nil || isNil(o.Method) { + var ret string + return ret + } + return *o.Method +} + +// GetMethodOk returns a tuple with the Method field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookResultRequest) GetMethodOk() (*string, bool) { + if o == nil || isNil(o.Method) { + return nil, false + } + return o.Method, true +} + +// HasMethod returns a boolean if a field has been set. +func (o *WebhookResultRequest) HasMethod() bool { + if o != nil && !isNil(o.Method) { + return true + } + + return false +} + +// SetMethod gets a reference to the given string and assigns it to the Method field. +func (o *WebhookResultRequest) SetMethod(v string) { + o.Method = &v +} + func (o WebhookResultRequest) MarshalJSON() ([]byte, error) { toSerialize, err := o.ToMap() if err != nil { @@ -156,6 +189,9 @@ func (o WebhookResultRequest) ToMap() (map[string]interface{}, error) { if !isNil(o.Body) { toSerialize["body"] = o.Body } + if !isNil(o.Method) { + toSerialize["method"] = o.Method + } return toSerialize, nil } diff --git a/cli/openapi/model_webhook_result_response.go b/cli/openapi/model_webhook_result_response.go index ed9cb05414..c244bb76f9 100644 --- a/cli/openapi/model_webhook_result_response.go +++ b/cli/openapi/model_webhook_result_response.go @@ -19,10 +19,11 @@ var _ MappedNullable = &WebhookResultResponse{} // WebhookResultResponse struct for WebhookResultResponse type WebhookResultResponse struct { - Status *int32 `json:"status,omitempty"` - Body *string `json:"body,omitempty"` - Headers []HTTPHeader `json:"headers,omitempty"` - Error *string `json:"error,omitempty"` + StatusCode *int32 `json:"statusCode,omitempty"` + Status *string `json:"status,omitempty"` + Body *string `json:"body,omitempty"` + Headers []HTTPHeader `json:"headers,omitempty"` + Error *string `json:"error,omitempty"` } // NewWebhookResultResponse instantiates a new WebhookResultResponse object @@ -42,10 +43,42 @@ func NewWebhookResultResponseWithDefaults() *WebhookResultResponse { return &this } +// GetStatusCode returns the StatusCode field value if set, zero value otherwise. +func (o *WebhookResultResponse) GetStatusCode() int32 { + if o == nil || isNil(o.StatusCode) { + var ret int32 + return ret + } + return *o.StatusCode +} + +// GetStatusCodeOk returns a tuple with the StatusCode field value if set, nil otherwise +// and a boolean to check if the value has been set. +func (o *WebhookResultResponse) GetStatusCodeOk() (*int32, bool) { + if o == nil || isNil(o.StatusCode) { + return nil, false + } + return o.StatusCode, true +} + +// HasStatusCode returns a boolean if a field has been set. +func (o *WebhookResultResponse) HasStatusCode() bool { + if o != nil && !isNil(o.StatusCode) { + return true + } + + return false +} + +// SetStatusCode gets a reference to the given int32 and assigns it to the StatusCode field. +func (o *WebhookResultResponse) SetStatusCode(v int32) { + o.StatusCode = &v +} + // GetStatus returns the Status field value if set, zero value otherwise. -func (o *WebhookResultResponse) GetStatus() int32 { +func (o *WebhookResultResponse) GetStatus() string { if o == nil || isNil(o.Status) { - var ret int32 + var ret string return ret } return *o.Status @@ -53,7 +86,7 @@ func (o *WebhookResultResponse) GetStatus() int32 { // GetStatusOk returns a tuple with the Status field value if set, nil otherwise // and a boolean to check if the value has been set. -func (o *WebhookResultResponse) GetStatusOk() (*int32, bool) { +func (o *WebhookResultResponse) GetStatusOk() (*string, bool) { if o == nil || isNil(o.Status) { return nil, false } @@ -69,8 +102,8 @@ func (o *WebhookResultResponse) HasStatus() bool { return false } -// SetStatus gets a reference to the given int32 and assigns it to the Status field. -func (o *WebhookResultResponse) SetStatus(v int32) { +// SetStatus gets a reference to the given string and assigns it to the Status field. +func (o *WebhookResultResponse) SetStatus(v string) { o.Status = &v } @@ -180,6 +213,9 @@ func (o WebhookResultResponse) MarshalJSON() ([]byte, error) { func (o WebhookResultResponse) ToMap() (map[string]interface{}, error) { toSerialize := map[string]interface{}{} + if !isNil(o.StatusCode) { + toSerialize["statusCode"] = o.StatusCode + } if !isNil(o.Status) { toSerialize["status"] = o.Status }