@@ -14,6 +14,8 @@ import (
1414//
1515// **Supported pipeline types:** logs, metrics
1616type ObservabilityPipelineDatadogAgentSource struct {
17+ // Name of the environment variable or secret that holds the listen address for the Datadog Agent source.
18+ AddressKey * string `json:"address_key,omitempty"`
1719 // The unique identifier for this component. Used in other parts of the pipeline to reference this component (for example, as the `input` to downstream components).
1820 Id string `json:"id"`
1921 // Configuration for enabling TLS encryption between the pipeline component and external services.
@@ -46,6 +48,34 @@ func NewObservabilityPipelineDatadogAgentSourceWithDefaults() *ObservabilityPipe
4648 return & this
4749}
4850
51+ // GetAddressKey returns the AddressKey field value if set, zero value otherwise.
52+ func (o * ObservabilityPipelineDatadogAgentSource ) GetAddressKey () string {
53+ if o == nil || o .AddressKey == nil {
54+ var ret string
55+ return ret
56+ }
57+ return * o .AddressKey
58+ }
59+
60+ // GetAddressKeyOk returns a tuple with the AddressKey field value if set, nil otherwise
61+ // and a boolean to check if the value has been set.
62+ func (o * ObservabilityPipelineDatadogAgentSource ) GetAddressKeyOk () (* string , bool ) {
63+ if o == nil || o .AddressKey == nil {
64+ return nil , false
65+ }
66+ return o .AddressKey , true
67+ }
68+
69+ // HasAddressKey returns a boolean if a field has been set.
70+ func (o * ObservabilityPipelineDatadogAgentSource ) HasAddressKey () bool {
71+ return o != nil && o .AddressKey != nil
72+ }
73+
74+ // SetAddressKey gets a reference to the given string and assigns it to the AddressKey field.
75+ func (o * ObservabilityPipelineDatadogAgentSource ) SetAddressKey (v string ) {
76+ o .AddressKey = & v
77+ }
78+
4979// GetId returns the Id field value.
5080func (o * ObservabilityPipelineDatadogAgentSource ) GetId () string {
5181 if o == nil {
@@ -126,6 +156,9 @@ func (o ObservabilityPipelineDatadogAgentSource) MarshalJSON() ([]byte, error) {
126156 if o .UnparsedObject != nil {
127157 return datadog .Marshal (o .UnparsedObject )
128158 }
159+ if o .AddressKey != nil {
160+ toSerialize ["address_key" ] = o .AddressKey
161+ }
129162 toSerialize ["id" ] = o .Id
130163 if o .Tls != nil {
131164 toSerialize ["tls" ] = o .Tls
@@ -141,9 +174,10 @@ func (o ObservabilityPipelineDatadogAgentSource) MarshalJSON() ([]byte, error) {
141174// UnmarshalJSON deserializes the given payload.
142175func (o * ObservabilityPipelineDatadogAgentSource ) UnmarshalJSON (bytes []byte ) (err error ) {
143176 all := struct {
144- Id * string `json:"id"`
145- Tls * ObservabilityPipelineTls `json:"tls,omitempty"`
146- Type * ObservabilityPipelineDatadogAgentSourceType `json:"type"`
177+ AddressKey * string `json:"address_key,omitempty"`
178+ Id * string `json:"id"`
179+ Tls * ObservabilityPipelineTls `json:"tls,omitempty"`
180+ Type * ObservabilityPipelineDatadogAgentSourceType `json:"type"`
147181 }{}
148182 if err = datadog .Unmarshal (bytes , & all ); err != nil {
149183 return datadog .Unmarshal (bytes , & o .UnparsedObject )
@@ -156,12 +190,13 @@ func (o *ObservabilityPipelineDatadogAgentSource) UnmarshalJSON(bytes []byte) (e
156190 }
157191 additionalProperties := make (map [string ]interface {})
158192 if err = datadog .Unmarshal (bytes , & additionalProperties ); err == nil {
159- datadog .DeleteKeys (additionalProperties , & []string {"id" , "tls" , "type" })
193+ datadog .DeleteKeys (additionalProperties , & []string {"address_key" , " id" , "tls" , "type" })
160194 } else {
161195 return err
162196 }
163197
164198 hasInvalidField := false
199+ o .AddressKey = all .AddressKey
165200 o .Id = * all .Id
166201 if all .Tls != nil && all .Tls .UnparsedObject != nil && o .UnparsedObject == nil {
167202 hasInvalidField = true
0 commit comments