Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -35808,7 +35808,7 @@ components:
operation.
format: int64
type: integer
total_updated:
total_staged:
description: Total number of scorecard results modified during the bulk
operation.
format: int64
Expand Down
40 changes: 20 additions & 20 deletions api/datadogV2/model_outcomes_batch_response_meta.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ type OutcomesBatchResponseMeta struct {
// Total number of scorecard results received during the bulk operation.
TotalReceived *int64 `json:"total_received,omitempty"`
// Total number of scorecard results modified during the bulk operation.
TotalUpdated *int64 `json:"total_updated,omitempty"`
TotalStaged *int64 `json:"total_staged,omitempty"`
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
UnparsedObject map[string]interface{} `json:"-"`
AdditionalProperties map[string]interface{} `json:"-"`
Expand Down Expand Up @@ -64,32 +64,32 @@ func (o *OutcomesBatchResponseMeta) SetTotalReceived(v int64) {
o.TotalReceived = &v
}

// GetTotalUpdated returns the TotalUpdated field value if set, zero value otherwise.
func (o *OutcomesBatchResponseMeta) GetTotalUpdated() int64 {
if o == nil || o.TotalUpdated == nil {
// GetTotalStaged returns the TotalStaged field value if set, zero value otherwise.
func (o *OutcomesBatchResponseMeta) GetTotalStaged() int64 {
if o == nil || o.TotalStaged == nil {
var ret int64
return ret
}
return *o.TotalUpdated
return *o.TotalStaged
}

// GetTotalUpdatedOk returns a tuple with the TotalUpdated field value if set, nil otherwise
// GetTotalStagedOk returns a tuple with the TotalStaged field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *OutcomesBatchResponseMeta) GetTotalUpdatedOk() (*int64, bool) {
if o == nil || o.TotalUpdated == nil {
func (o *OutcomesBatchResponseMeta) GetTotalStagedOk() (*int64, bool) {
if o == nil || o.TotalStaged == nil {
return nil, false
}
return o.TotalUpdated, true
return o.TotalStaged, true
}

// HasTotalUpdated returns a boolean if a field has been set.
func (o *OutcomesBatchResponseMeta) HasTotalUpdated() bool {
return o != nil && o.TotalUpdated != nil
// HasTotalStaged returns a boolean if a field has been set.
func (o *OutcomesBatchResponseMeta) HasTotalStaged() bool {
return o != nil && o.TotalStaged != nil
}

// SetTotalUpdated gets a reference to the given int64 and assigns it to the TotalUpdated field.
func (o *OutcomesBatchResponseMeta) SetTotalUpdated(v int64) {
o.TotalUpdated = &v
// SetTotalStaged gets a reference to the given int64 and assigns it to the TotalStaged field.
func (o *OutcomesBatchResponseMeta) SetTotalStaged(v int64) {
o.TotalStaged = &v
}

// MarshalJSON serializes the struct using spec logic.
Expand All @@ -101,8 +101,8 @@ func (o OutcomesBatchResponseMeta) MarshalJSON() ([]byte, error) {
if o.TotalReceived != nil {
toSerialize["total_received"] = o.TotalReceived
}
if o.TotalUpdated != nil {
toSerialize["total_updated"] = o.TotalUpdated
if o.TotalStaged != nil {
toSerialize["total_staged"] = o.TotalStaged
}

for key, value := range o.AdditionalProperties {
Expand All @@ -115,19 +115,19 @@ func (o OutcomesBatchResponseMeta) MarshalJSON() ([]byte, error) {
func (o *OutcomesBatchResponseMeta) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
TotalReceived *int64 `json:"total_received,omitempty"`
TotalUpdated *int64 `json:"total_updated,omitempty"`
TotalStaged *int64 `json:"total_staged,omitempty"`
}{}
if err = datadog.Unmarshal(bytes, &all); err != nil {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}
additionalProperties := make(map[string]interface{})
if err = datadog.Unmarshal(bytes, &additionalProperties); err == nil {
datadog.DeleteKeys(additionalProperties, &[]string{"total_received", "total_updated"})
datadog.DeleteKeys(additionalProperties, &[]string{"total_received", "total_staged"})
} else {
return err
}
o.TotalReceived = all.TotalReceived
o.TotalUpdated = all.TotalUpdated
o.TotalStaged = all.TotalStaged

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ interactions:
url: https://api.datadoghq.com/api/v2/scorecard/outcomes/batch
response:
body: '{"data":[{"id":"b124b446-f246-41ab-b477-99293969cc5e\\my-service","type":"outcome","attributes":{"modified_at":"2023-11-01T22:17:31.68808Z","remarks":"See:
\u003ca href=\"https://app.datadoghq.com/services\"\u003eServices\u003c/a\u003e","service_name":"my-service","state":"pass"},"relationships":{"rule":{"data":{"id":"b124b446-f246-41ab-b477-99293969cc5e","type":"rule"}}}}],"meta":{"total_received":1,"total_updated":1}}'
\u003ca href=\"https://app.datadoghq.com/services\"\u003eServices\u003c/a\u003e","service_name":"my-service","state":"pass"},"relationships":{"rule":{"data":{"id":"b124b446-f246-41ab-b477-99293969cc5e","type":"rule"}}}}],"meta":{"total_received":1,"total_staged":1}}'
code: 200
duration: 0ms
headers:
Expand Down