@@ -10,6 +10,8 @@ import (
1010
1111// EntityV3ServiceSpec The definition of Entity V3 Service Spec object.
1212type EntityV3ServiceSpec struct {
13+ // A list of components the service is a part of
14+ ComponentOf []string `json:"componentOf,omitempty"`
1315 // A list of components the service depends on.
1416 DependsOn []string `json:"dependsOn,omitempty"`
1517 // The service's programming language.
@@ -41,6 +43,34 @@ func NewEntityV3ServiceSpecWithDefaults() *EntityV3ServiceSpec {
4143 return & this
4244}
4345
46+ // GetComponentOf returns the ComponentOf field value if set, zero value otherwise.
47+ func (o * EntityV3ServiceSpec ) GetComponentOf () []string {
48+ if o == nil || o .ComponentOf == nil {
49+ var ret []string
50+ return ret
51+ }
52+ return o .ComponentOf
53+ }
54+
55+ // GetComponentOfOk returns a tuple with the ComponentOf field value if set, nil otherwise
56+ // and a boolean to check if the value has been set.
57+ func (o * EntityV3ServiceSpec ) GetComponentOfOk () (* []string , bool ) {
58+ if o == nil || o .ComponentOf == nil {
59+ return nil , false
60+ }
61+ return & o .ComponentOf , true
62+ }
63+
64+ // HasComponentOf returns a boolean if a field has been set.
65+ func (o * EntityV3ServiceSpec ) HasComponentOf () bool {
66+ return o != nil && o .ComponentOf != nil
67+ }
68+
69+ // SetComponentOf gets a reference to the given []string and assigns it to the ComponentOf field.
70+ func (o * EntityV3ServiceSpec ) SetComponentOf (v []string ) {
71+ o .ComponentOf = v
72+ }
73+
4474// GetDependsOn returns the DependsOn field value if set, zero value otherwise.
4575func (o * EntityV3ServiceSpec ) GetDependsOn () []string {
4676 if o == nil || o .DependsOn == nil {
@@ -187,6 +217,9 @@ func (o EntityV3ServiceSpec) MarshalJSON() ([]byte, error) {
187217 if o .UnparsedObject != nil {
188218 return datadog .Marshal (o .UnparsedObject )
189219 }
220+ if o .ComponentOf != nil {
221+ toSerialize ["componentOf" ] = o .ComponentOf
222+ }
190223 if o .DependsOn != nil {
191224 toSerialize ["dependsOn" ] = o .DependsOn
192225 }
@@ -208,15 +241,17 @@ func (o EntityV3ServiceSpec) MarshalJSON() ([]byte, error) {
208241// UnmarshalJSON deserializes the given payload.
209242func (o * EntityV3ServiceSpec ) UnmarshalJSON (bytes []byte ) (err error ) {
210243 all := struct {
211- DependsOn []string `json:"dependsOn,omitempty"`
212- Languages []string `json:"languages,omitempty"`
213- Lifecycle * string `json:"lifecycle,omitempty"`
214- Tier * string `json:"tier,omitempty"`
215- Type * string `json:"type,omitempty"`
244+ ComponentOf []string `json:"componentOf,omitempty"`
245+ DependsOn []string `json:"dependsOn,omitempty"`
246+ Languages []string `json:"languages,omitempty"`
247+ Lifecycle * string `json:"lifecycle,omitempty"`
248+ Tier * string `json:"tier,omitempty"`
249+ Type * string `json:"type,omitempty"`
216250 }{}
217251 if err = datadog .Unmarshal (bytes , & all ); err != nil {
218252 return datadog .Unmarshal (bytes , & o .UnparsedObject )
219253 }
254+ o .ComponentOf = all .ComponentOf
220255 o .DependsOn = all .DependsOn
221256 o .Languages = all .Languages
222257 o .Lifecycle = all .Lifecycle
0 commit comments