-
Notifications
You must be signed in to change notification settings - Fork 43
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Include user data with team membership resource (#1863)
Co-authored-by: ci.datadog-api-spec <[email protected]> Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
- Loading branch information
1 parent
0707019
commit b2664c5
Showing
6 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
# 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. | ||
from __future__ import annotations | ||
|
||
|
||
from datadog_api_client.model_utils import ( | ||
ModelComposed, | ||
cached_property, | ||
) | ||
|
||
|
||
class UserTeamIncluded(ModelComposed): | ||
def __init__(self, **kwargs): | ||
""" | ||
Included resources related to the team membership | ||
:param attributes: Attributes of user object returned by the API. | ||
:type attributes: UserAttributes, optional | ||
:param id: ID of the user. | ||
:type id: str, optional | ||
:param relationships: Relationships of the user object returned by the API. | ||
:type relationships: UserResponseRelationships, optional | ||
:param type: Users resource type. | ||
:type type: UsersType, optional | ||
""" | ||
super().__init__(kwargs) | ||
|
||
@cached_property | ||
def _composed_schemas(_): | ||
# we need this here to make our import statements work | ||
# we must store _composed_schemas in here so the code is only run | ||
# when we invoke this method. If we kept this at the class | ||
# level we would get an error because the class level | ||
# code would be run when this module is imported, and these composed | ||
# classes don't exist yet because their module has not finished | ||
# loading | ||
from datadog_api_client.v2.model.user import User | ||
|
||
return { | ||
"oneOf": [ | ||
User, | ||
], | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters