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
440 changes: 440 additions & 0 deletions .generator/schemas/v2/openapi.yaml

Large diffs are not rendered by default.

464 changes: 464 additions & 0 deletions api/datadogV2/api_synthetics.go

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions api/datadogV2/doc.go
Original file line number Diff line number Diff line change
Expand Up @@ -633,7 +633,12 @@
// - [SpansMetricsApi.UpdateSpansMetric]
// - [StaticAnalysisApi.CreateSCAResolveVulnerableSymbols]
// - [StaticAnalysisApi.CreateSCAResult]
// - [SyntheticsApi.CreateSyntheticsSuite]
// - [SyntheticsApi.DeleteSyntheticsSuites]
// - [SyntheticsApi.EditSyntheticsSuite]
// - [SyntheticsApi.GetOnDemandConcurrencyCap]
// - [SyntheticsApi.GetSyntheticsSuite]
// - [SyntheticsApi.SearchSuites]
// - [SyntheticsApi.SetOnDemandConcurrencyCap]
// - [TeamConnectionsApi.CreateTeamConnections]
// - [TeamConnectionsApi.DeleteTeamConnections]
Expand Down
189 changes: 189 additions & 0 deletions api/datadogV2/model_deleted_suite_response_data.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,189 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV2

import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// DeletedSuiteResponseData
type DeletedSuiteResponseData struct {
//
Attributes *DeletedSuiteResponseDataAttributes `json:"attributes,omitempty"`
//
Id *string `json:"id,omitempty"`
//
Type *DeletedSuiteType `json:"type,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:"-"`
}

// NewDeletedSuiteResponseData instantiates a new DeletedSuiteResponseData 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 NewDeletedSuiteResponseData() *DeletedSuiteResponseData {
this := DeletedSuiteResponseData{}
var typeVar DeletedSuiteType = DELETEDSUITETYPE_SUITES
this.Type = &typeVar
return &this
}

// NewDeletedSuiteResponseDataWithDefaults instantiates a new DeletedSuiteResponseData 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 NewDeletedSuiteResponseDataWithDefaults() *DeletedSuiteResponseData {
this := DeletedSuiteResponseData{}
var typeVar DeletedSuiteType = DELETEDSUITETYPE_SUITES
this.Type = &typeVar
return &this
}

// GetAttributes returns the Attributes field value if set, zero value otherwise.
func (o *DeletedSuiteResponseData) GetAttributes() DeletedSuiteResponseDataAttributes {
if o == nil || o.Attributes == nil {
var ret DeletedSuiteResponseDataAttributes
return ret
}
return *o.Attributes
}

// GetAttributesOk returns a tuple with the Attributes field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeletedSuiteResponseData) GetAttributesOk() (*DeletedSuiteResponseDataAttributes, bool) {
if o == nil || o.Attributes == nil {
return nil, false
}
return o.Attributes, true
}

// HasAttributes returns a boolean if a field has been set.
func (o *DeletedSuiteResponseData) HasAttributes() bool {
return o != nil && o.Attributes != nil
}

// SetAttributes gets a reference to the given DeletedSuiteResponseDataAttributes and assigns it to the Attributes field.
func (o *DeletedSuiteResponseData) SetAttributes(v DeletedSuiteResponseDataAttributes) {
o.Attributes = &v
}

// GetId returns the Id field value if set, zero value otherwise.
func (o *DeletedSuiteResponseData) GetId() string {
if o == nil || o.Id == nil {
var ret string
return ret
}
return *o.Id
}

// GetIdOk returns a tuple with the Id field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeletedSuiteResponseData) GetIdOk() (*string, bool) {
if o == nil || o.Id == nil {
return nil, false
}
return o.Id, true
}

// HasId returns a boolean if a field has been set.
func (o *DeletedSuiteResponseData) HasId() bool {
return o != nil && o.Id != nil
}

// SetId gets a reference to the given string and assigns it to the Id field.
func (o *DeletedSuiteResponseData) SetId(v string) {
o.Id = &v
}

// GetType returns the Type field value if set, zero value otherwise.
func (o *DeletedSuiteResponseData) GetType() DeletedSuiteType {
if o == nil || o.Type == nil {
var ret DeletedSuiteType
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 *DeletedSuiteResponseData) GetTypeOk() (*DeletedSuiteType, bool) {
if o == nil || o.Type == nil {
return nil, false
}
return o.Type, true
}

// HasType returns a boolean if a field has been set.
func (o *DeletedSuiteResponseData) HasType() bool {
return o != nil && o.Type != nil
}

// SetType gets a reference to the given DeletedSuiteType and assigns it to the Type field.
func (o *DeletedSuiteResponseData) SetType(v DeletedSuiteType) {
o.Type = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o DeletedSuiteResponseData) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.Attributes != nil {
toSerialize["attributes"] = o.Attributes
}
if o.Id != nil {
toSerialize["id"] = o.Id
}
if o.Type != nil {
toSerialize["type"] = o.Type
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return datadog.Marshal(toSerialize)
}

// UnmarshalJSON deserializes the given payload.
func (o *DeletedSuiteResponseData) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
Attributes *DeletedSuiteResponseDataAttributes `json:"attributes,omitempty"`
Id *string `json:"id,omitempty"`
Type *DeletedSuiteType `json:"type,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{"attributes", "id", "type"})
} else {
return err
}

hasInvalidField := false
if all.Attributes != nil && all.Attributes.UnparsedObject != nil && o.UnparsedObject == nil {
hasInvalidField = true
}
o.Attributes = all.Attributes
o.Id = all.Id
if all.Type != nil && !all.Type.IsValid() {
hasInvalidField = true
} else {
o.Type = all.Type
}

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}

if hasInvalidField {
return datadog.Unmarshal(bytes, &o.UnparsedObject)
}

return nil
}
137 changes: 137 additions & 0 deletions api/datadogV2/model_deleted_suite_response_data_attributes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,137 @@
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
// This product includes software developed at Datadog (https://www.datadoghq.com/).
// Copyright 2019-Present Datadog, Inc.

package datadogV2

import (
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
)

// DeletedSuiteResponseDataAttributes
type DeletedSuiteResponseDataAttributes struct {
// Deletion timestamp of the Synthetic suite ID.
DeletedAt *string `json:"deleted_at,omitempty"`
// The Synthetic suite ID deleted.
PublicId *string `json:"public_id,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:"-"`
}

// NewDeletedSuiteResponseDataAttributes instantiates a new DeletedSuiteResponseDataAttributes 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 NewDeletedSuiteResponseDataAttributes() *DeletedSuiteResponseDataAttributes {
this := DeletedSuiteResponseDataAttributes{}
return &this
}

// NewDeletedSuiteResponseDataAttributesWithDefaults instantiates a new DeletedSuiteResponseDataAttributes 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 NewDeletedSuiteResponseDataAttributesWithDefaults() *DeletedSuiteResponseDataAttributes {
this := DeletedSuiteResponseDataAttributes{}
return &this
}

// GetDeletedAt returns the DeletedAt field value if set, zero value otherwise.
func (o *DeletedSuiteResponseDataAttributes) GetDeletedAt() string {
if o == nil || o.DeletedAt == nil {
var ret string
return ret
}
return *o.DeletedAt
}

// GetDeletedAtOk returns a tuple with the DeletedAt field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeletedSuiteResponseDataAttributes) GetDeletedAtOk() (*string, bool) {
if o == nil || o.DeletedAt == nil {
return nil, false
}
return o.DeletedAt, true
}

// HasDeletedAt returns a boolean if a field has been set.
func (o *DeletedSuiteResponseDataAttributes) HasDeletedAt() bool {
return o != nil && o.DeletedAt != nil
}

// SetDeletedAt gets a reference to the given string and assigns it to the DeletedAt field.
func (o *DeletedSuiteResponseDataAttributes) SetDeletedAt(v string) {
o.DeletedAt = &v
}

// GetPublicId returns the PublicId field value if set, zero value otherwise.
func (o *DeletedSuiteResponseDataAttributes) GetPublicId() string {
if o == nil || o.PublicId == nil {
var ret string
return ret
}
return *o.PublicId
}

// GetPublicIdOk returns a tuple with the PublicId field value if set, nil otherwise
// and a boolean to check if the value has been set.
func (o *DeletedSuiteResponseDataAttributes) GetPublicIdOk() (*string, bool) {
if o == nil || o.PublicId == nil {
return nil, false
}
return o.PublicId, true
}

// HasPublicId returns a boolean if a field has been set.
func (o *DeletedSuiteResponseDataAttributes) HasPublicId() bool {
return o != nil && o.PublicId != nil
}

// SetPublicId gets a reference to the given string and assigns it to the PublicId field.
func (o *DeletedSuiteResponseDataAttributes) SetPublicId(v string) {
o.PublicId = &v
}

// MarshalJSON serializes the struct using spec logic.
func (o DeletedSuiteResponseDataAttributes) MarshalJSON() ([]byte, error) {
toSerialize := map[string]interface{}{}
if o.UnparsedObject != nil {
return datadog.Marshal(o.UnparsedObject)
}
if o.DeletedAt != nil {
toSerialize["deleted_at"] = o.DeletedAt
}
if o.PublicId != nil {
toSerialize["public_id"] = o.PublicId
}

for key, value := range o.AdditionalProperties {
toSerialize[key] = value
}
return datadog.Marshal(toSerialize)
}

// UnmarshalJSON deserializes the given payload.
func (o *DeletedSuiteResponseDataAttributes) UnmarshalJSON(bytes []byte) (err error) {
all := struct {
DeletedAt *string `json:"deleted_at,omitempty"`
PublicId *string `json:"public_id,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{"deleted_at", "public_id"})
} else {
return err
}
o.DeletedAt = all.DeletedAt
o.PublicId = all.PublicId

if len(additionalProperties) > 0 {
o.AdditionalProperties = additionalProperties
}

return nil
}
Loading