Skip to content

Commit 0a12724

Browse files
author
ci.datadog-api-spec
committed
Regenerate client from commit a4c8615 of spec repo
1 parent 2ece0db commit 0a12724

29 files changed

Lines changed: 3873 additions & 0 deletions

.generator/schemas/v2/openapi.yaml

Lines changed: 532 additions & 0 deletions
Large diffs are not rendered by default.

api/datadogV2/api_salesforce_integration.go

Lines changed: 478 additions & 0 deletions
Large diffs are not rendered by default.

api/datadogV2/doc.go

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -855,6 +855,12 @@
855855
// - [RumRetentionFiltersApi.OrderRetentionFilters]
856856
// - [RumRetentionFiltersApi.UpdatePermanentRetentionFilter]
857857
// - [RumRetentionFiltersApi.UpdateRetentionFilter]
858+
// - [SalesforceIntegrationApi.CreateIncidentTemplate]
859+
// - [SalesforceIntegrationApi.DeleteIncidentTemplate]
860+
// - [SalesforceIntegrationApi.DeleteSalesforceOrganization]
861+
// - [SalesforceIntegrationApi.GetIncidentTemplates]
862+
// - [SalesforceIntegrationApi.GetSalesforceOrganizations]
863+
// - [SalesforceIntegrationApi.UpdateIncidentTemplate]
858864
// - [ScorecardsApi.CreateScorecardCampaign]
859865
// - [ScorecardsApi.CreateScorecardOutcomesBatch]
860866
// - [ScorecardsApi.CreateScorecardRule]
Lines changed: 207 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,207 @@
1+
// Unless explicitly stated otherwise all files in this repository are licensed under the Apache-2.0 License.
2+
// This product includes software developed at Datadog (https://www.datadoghq.com/).
3+
// Copyright 2019-Present Datadog, Inc.
4+
5+
package datadogV2
6+
7+
import (
8+
"github.com/DataDog/datadog-api-client-go/v2/api/datadog"
9+
)
10+
11+
// SalesforceIncidentsOrganizationResponseAttributes Attributes of a Salesforce organization connected to the Datadog Salesforce integration.
12+
type SalesforceIncidentsOrganizationResponseAttributes struct {
13+
// The Salesforce instance URL used to call this organization's APIs.
14+
InstanceUrl *string `json:"instance_url,omitempty"`
15+
// Human-readable name of the Salesforce organization.
16+
Name *string `json:"name,omitempty"`
17+
// The Salesforce organization identifier (15- or 18-character Salesforce org ID).
18+
SfdcOrgId *string `json:"sfdc_org_id,omitempty"`
19+
// The Salesforce organization type (for example, `Production` or `Sandbox`).
20+
SfdcOrgType *string `json:"sfdc_org_type,omitempty"`
21+
// UnparsedObject contains the raw value of the object if there was an error when deserializing into the struct
22+
UnparsedObject map[string]interface{} `json:"-"`
23+
AdditionalProperties map[string]interface{} `json:"-"`
24+
}
25+
26+
// NewSalesforceIncidentsOrganizationResponseAttributes instantiates a new SalesforceIncidentsOrganizationResponseAttributes object.
27+
// This constructor will assign default values to properties that have it defined,
28+
// and makes sure properties required by API are set, but the set of arguments
29+
// will change when the set of required properties is changed.
30+
func NewSalesforceIncidentsOrganizationResponseAttributes() *SalesforceIncidentsOrganizationResponseAttributes {
31+
this := SalesforceIncidentsOrganizationResponseAttributes{}
32+
return &this
33+
}
34+
35+
// NewSalesforceIncidentsOrganizationResponseAttributesWithDefaults instantiates a new SalesforceIncidentsOrganizationResponseAttributes object.
36+
// This constructor will only assign default values to properties that have it defined,
37+
// but it doesn't guarantee that properties required by API are set.
38+
func NewSalesforceIncidentsOrganizationResponseAttributesWithDefaults() *SalesforceIncidentsOrganizationResponseAttributes {
39+
this := SalesforceIncidentsOrganizationResponseAttributes{}
40+
return &this
41+
}
42+
43+
// GetInstanceUrl returns the InstanceUrl field value if set, zero value otherwise.
44+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetInstanceUrl() string {
45+
if o == nil || o.InstanceUrl == nil {
46+
var ret string
47+
return ret
48+
}
49+
return *o.InstanceUrl
50+
}
51+
52+
// GetInstanceUrlOk returns a tuple with the InstanceUrl field value if set, nil otherwise
53+
// and a boolean to check if the value has been set.
54+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetInstanceUrlOk() (*string, bool) {
55+
if o == nil || o.InstanceUrl == nil {
56+
return nil, false
57+
}
58+
return o.InstanceUrl, true
59+
}
60+
61+
// HasInstanceUrl returns a boolean if a field has been set.
62+
func (o *SalesforceIncidentsOrganizationResponseAttributes) HasInstanceUrl() bool {
63+
return o != nil && o.InstanceUrl != nil
64+
}
65+
66+
// SetInstanceUrl gets a reference to the given string and assigns it to the InstanceUrl field.
67+
func (o *SalesforceIncidentsOrganizationResponseAttributes) SetInstanceUrl(v string) {
68+
o.InstanceUrl = &v
69+
}
70+
71+
// GetName returns the Name field value if set, zero value otherwise.
72+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetName() string {
73+
if o == nil || o.Name == nil {
74+
var ret string
75+
return ret
76+
}
77+
return *o.Name
78+
}
79+
80+
// GetNameOk returns a tuple with the Name field value if set, nil otherwise
81+
// and a boolean to check if the value has been set.
82+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetNameOk() (*string, bool) {
83+
if o == nil || o.Name == nil {
84+
return nil, false
85+
}
86+
return o.Name, true
87+
}
88+
89+
// HasName returns a boolean if a field has been set.
90+
func (o *SalesforceIncidentsOrganizationResponseAttributes) HasName() bool {
91+
return o != nil && o.Name != nil
92+
}
93+
94+
// SetName gets a reference to the given string and assigns it to the Name field.
95+
func (o *SalesforceIncidentsOrganizationResponseAttributes) SetName(v string) {
96+
o.Name = &v
97+
}
98+
99+
// GetSfdcOrgId returns the SfdcOrgId field value if set, zero value otherwise.
100+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetSfdcOrgId() string {
101+
if o == nil || o.SfdcOrgId == nil {
102+
var ret string
103+
return ret
104+
}
105+
return *o.SfdcOrgId
106+
}
107+
108+
// GetSfdcOrgIdOk returns a tuple with the SfdcOrgId field value if set, nil otherwise
109+
// and a boolean to check if the value has been set.
110+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetSfdcOrgIdOk() (*string, bool) {
111+
if o == nil || o.SfdcOrgId == nil {
112+
return nil, false
113+
}
114+
return o.SfdcOrgId, true
115+
}
116+
117+
// HasSfdcOrgId returns a boolean if a field has been set.
118+
func (o *SalesforceIncidentsOrganizationResponseAttributes) HasSfdcOrgId() bool {
119+
return o != nil && o.SfdcOrgId != nil
120+
}
121+
122+
// SetSfdcOrgId gets a reference to the given string and assigns it to the SfdcOrgId field.
123+
func (o *SalesforceIncidentsOrganizationResponseAttributes) SetSfdcOrgId(v string) {
124+
o.SfdcOrgId = &v
125+
}
126+
127+
// GetSfdcOrgType returns the SfdcOrgType field value if set, zero value otherwise.
128+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetSfdcOrgType() string {
129+
if o == nil || o.SfdcOrgType == nil {
130+
var ret string
131+
return ret
132+
}
133+
return *o.SfdcOrgType
134+
}
135+
136+
// GetSfdcOrgTypeOk returns a tuple with the SfdcOrgType field value if set, nil otherwise
137+
// and a boolean to check if the value has been set.
138+
func (o *SalesforceIncidentsOrganizationResponseAttributes) GetSfdcOrgTypeOk() (*string, bool) {
139+
if o == nil || o.SfdcOrgType == nil {
140+
return nil, false
141+
}
142+
return o.SfdcOrgType, true
143+
}
144+
145+
// HasSfdcOrgType returns a boolean if a field has been set.
146+
func (o *SalesforceIncidentsOrganizationResponseAttributes) HasSfdcOrgType() bool {
147+
return o != nil && o.SfdcOrgType != nil
148+
}
149+
150+
// SetSfdcOrgType gets a reference to the given string and assigns it to the SfdcOrgType field.
151+
func (o *SalesforceIncidentsOrganizationResponseAttributes) SetSfdcOrgType(v string) {
152+
o.SfdcOrgType = &v
153+
}
154+
155+
// MarshalJSON serializes the struct using spec logic.
156+
func (o SalesforceIncidentsOrganizationResponseAttributes) MarshalJSON() ([]byte, error) {
157+
toSerialize := map[string]interface{}{}
158+
if o.UnparsedObject != nil {
159+
return datadog.Marshal(o.UnparsedObject)
160+
}
161+
if o.InstanceUrl != nil {
162+
toSerialize["instance_url"] = o.InstanceUrl
163+
}
164+
if o.Name != nil {
165+
toSerialize["name"] = o.Name
166+
}
167+
if o.SfdcOrgId != nil {
168+
toSerialize["sfdc_org_id"] = o.SfdcOrgId
169+
}
170+
if o.SfdcOrgType != nil {
171+
toSerialize["sfdc_org_type"] = o.SfdcOrgType
172+
}
173+
174+
for key, value := range o.AdditionalProperties {
175+
toSerialize[key] = value
176+
}
177+
return datadog.Marshal(toSerialize)
178+
}
179+
180+
// UnmarshalJSON deserializes the given payload.
181+
func (o *SalesforceIncidentsOrganizationResponseAttributes) UnmarshalJSON(bytes []byte) (err error) {
182+
all := struct {
183+
InstanceUrl *string `json:"instance_url,omitempty"`
184+
Name *string `json:"name,omitempty"`
185+
SfdcOrgId *string `json:"sfdc_org_id,omitempty"`
186+
SfdcOrgType *string `json:"sfdc_org_type,omitempty"`
187+
}{}
188+
if err = datadog.Unmarshal(bytes, &all); err != nil {
189+
return datadog.Unmarshal(bytes, &o.UnparsedObject)
190+
}
191+
additionalProperties := make(map[string]interface{})
192+
if err = datadog.UnmarshalUseNumber(bytes, &additionalProperties); err == nil {
193+
datadog.DeleteKeys(additionalProperties, &[]string{"instance_url", "name", "sfdc_org_id", "sfdc_org_type"})
194+
} else {
195+
return err
196+
}
197+
o.InstanceUrl = all.InstanceUrl
198+
o.Name = all.Name
199+
o.SfdcOrgId = all.SfdcOrgId
200+
o.SfdcOrgType = all.SfdcOrgType
201+
202+
if len(additionalProperties) > 0 {
203+
o.AdditionalProperties = additionalProperties
204+
}
205+
206+
return nil
207+
}

0 commit comments

Comments
 (0)