Skip to content

Commit

Permalink
Regenerate client from commit 17275f75 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Dec 20, 2023
1 parent 289c0a5 commit 02e9d15
Show file tree
Hide file tree
Showing 11 changed files with 250 additions and 8 deletions.
8 changes: 4 additions & 4 deletions .apigentools-info
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"spec_versions": {
"v1": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-18 13:46:53.516392",
"spec_repo_commit": "f363f7b4"
"regenerated": "2023-12-20 15:11:12.824549",
"spec_repo_commit": "17275f75"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2023-12-18 13:46:53.531307",
"spec_repo_commit": "f363f7b4"
"regenerated": "2023-12-20 15:11:12.838600",
"spec_repo_commit": "17275f75"
}
}
}
46 changes: 46 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13640,6 +13640,27 @@ components:
- id
- type
type: object
RelationshipToUserTeamTeam:
description: Relationship between team membership and team
properties:
data:
$ref: '#/components/schemas/RelationshipToUserTeamTeamData'
required:
- data
type: object
RelationshipToUserTeamTeamData:
description: The team associated with the membership
properties:
id:
description: The ID of the team associated with the membership
example: d7e15d9d-d346-43da-81d8-3d9e71d9a5e9
type: string
type:
$ref: '#/components/schemas/UserTeamTeamType'
required:
- id
- type
type: object
RelationshipToUserTeamUser:
description: Relationship between team membership and user
properties:
Expand Down Expand Up @@ -19614,6 +19635,20 @@ components:
UserTeamAttributes:
description: Team membership attributes
properties:
provisioned_by:
description: 'The mechanism responsible for provisioning the team relationship.

Possible values: null for added by a user, "service_account" if added
by a service account, and "saml_mapping" if provisioned via SAML mapping.'
nullable: true
readOnly: true
type: string
provisioned_by_id:
description: UUID of the User or Service Account who provisioned this team
membership, or null if provisioned via SAML mapping.
nullable: true
readOnly: true
type: string
role:
$ref: '#/components/schemas/UserTeamRole'
type: object
Expand Down Expand Up @@ -19665,6 +19700,8 @@ components:
UserTeamRelationships:
description: Relationship between membership and a user
properties:
team:
$ref: '#/components/schemas/RelationshipToUserTeamTeam'
user:
$ref: '#/components/schemas/RelationshipToUserTeamUser'
type: object
Expand All @@ -19690,6 +19727,15 @@ components:
type: string
x-enum-varnames:
- ADMIN
UserTeamTeamType:
default: team
description: User team team type
enum:
- team
example: team
type: string
x-enum-varnames:
- TEAM
UserTeamType:
default: team_memberships
description: Team membership type
Expand Down
21 changes: 21 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -5727,6 +5727,20 @@ relationship\_to\_user\_team\_permission\_data
:members:
:show-inheritance:

relationship\_to\_user\_team\_team
----------------------------------

.. automodule:: datadog_api_client.v2.model.relationship_to_user_team_team
:members:
:show-inheritance:

relationship\_to\_user\_team\_team\_data
----------------------------------------

.. automodule:: datadog_api_client.v2.model.relationship_to_user_team_team_data
:members:
:show-inheritance:

relationship\_to\_user\_team\_user
----------------------------------

Expand Down Expand Up @@ -8919,6 +8933,13 @@ user\_team\_role
:members:
:show-inheritance:

user\_team\_team\_type
----------------------

.. automodule:: datadog_api_client.v2.model.user_team_team_type
:members:
:show-inheritance:

user\_team\_type
----------------

Expand Down
9 changes: 9 additions & 0 deletions examples/v2/teams/CreateTeamMembership.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,16 @@

from datadog_api_client import ApiClient, Configuration
from datadog_api_client.v2.api.teams_api import TeamsApi
from datadog_api_client.v2.model.relationship_to_user_team_team import RelationshipToUserTeamTeam
from datadog_api_client.v2.model.relationship_to_user_team_team_data import RelationshipToUserTeamTeamData
from datadog_api_client.v2.model.relationship_to_user_team_user import RelationshipToUserTeamUser
from datadog_api_client.v2.model.relationship_to_user_team_user_data import RelationshipToUserTeamUserData
from datadog_api_client.v2.model.user_team_attributes import UserTeamAttributes
from datadog_api_client.v2.model.user_team_create import UserTeamCreate
from datadog_api_client.v2.model.user_team_relationships import UserTeamRelationships
from datadog_api_client.v2.model.user_team_request import UserTeamRequest
from datadog_api_client.v2.model.user_team_role import UserTeamRole
from datadog_api_client.v2.model.user_team_team_type import UserTeamTeamType
from datadog_api_client.v2.model.user_team_type import UserTeamType
from datadog_api_client.v2.model.user_team_user_type import UserTeamUserType

Expand All @@ -20,6 +23,12 @@
role=UserTeamRole.ADMIN,
),
relationships=UserTeamRelationships(
team=RelationshipToUserTeamTeam(
data=RelationshipToUserTeamTeamData(
id="d7e15d9d-d346-43da-81d8-3d9e71d9a5e9",
type=UserTeamTeamType.TEAM,
),
),
user=RelationshipToUserTeamUser(
data=RelationshipToUserTeamUserData(
id="b8626d7e-cedd-11eb-abf5-da7ad0900001",
Expand Down
40 changes: 40 additions & 0 deletions src/datadog_api_client/v2/model/relationship_to_user_team_team.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# 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 typing import TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.relationship_to_user_team_team_data import RelationshipToUserTeamTeamData


class RelationshipToUserTeamTeam(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.relationship_to_user_team_team_data import RelationshipToUserTeamTeamData

return {
"data": (RelationshipToUserTeamTeamData,),
}

attribute_map = {
"data": "data",
}

def __init__(self_, data: RelationshipToUserTeamTeamData, **kwargs):
"""
Relationship between team membership and team
:param data: The team associated with the membership
:type data: RelationshipToUserTeamTeamData
"""
super().__init__(kwargs)

self_.data = data
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# 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 typing import TYPE_CHECKING

from datadog_api_client.model_utils import (
ModelNormal,
cached_property,
)


if TYPE_CHECKING:
from datadog_api_client.v2.model.user_team_team_type import UserTeamTeamType


class RelationshipToUserTeamTeamData(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.user_team_team_type import UserTeamTeamType

return {
"id": (str,),
"type": (UserTeamTeamType,),
}

attribute_map = {
"id": "id",
"type": "type",
}

def __init__(self_, id: str, type: UserTeamTeamType, **kwargs):
"""
The team associated with the membership
:param id: The ID of the team associated with the membership
:type id: str
:param type: User team team type
:type type: UserTeamTeamType
"""
super().__init__(kwargs)

self_.id = id
self_.type = type
27 changes: 26 additions & 1 deletion src/datadog_api_client/v2/model/user_team_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,20 +24,45 @@ def openapi_types(_):
from datadog_api_client.v2.model.user_team_role import UserTeamRole

return {
"provisioned_by": (str, none_type),
"provisioned_by_id": (str, none_type),
"role": (UserTeamRole,),
}

attribute_map = {
"provisioned_by": "provisioned_by",
"provisioned_by_id": "provisioned_by_id",
"role": "role",
}
read_only_vars = {
"provisioned_by",
"provisioned_by_id",
}

def __init__(self_, role: Union[UserTeamRole, none_type, UnsetType] = unset, **kwargs):
def __init__(
self_,
provisioned_by: Union[str, none_type, UnsetType] = unset,
provisioned_by_id: Union[str, none_type, UnsetType] = unset,
role: Union[UserTeamRole, none_type, UnsetType] = unset,
**kwargs,
):
"""
Team membership attributes
:param provisioned_by: The mechanism responsible for provisioning the team relationship.
Possible values: null for added by a user, "service_account" if added by a service account, and "saml_mapping" if provisioned via SAML mapping.
:type provisioned_by: str, none_type, optional
:param provisioned_by_id: UUID of the User or Service Account who provisioned this team membership, or null if provisioned via SAML mapping.
:type provisioned_by_id: str, none_type, optional
:param role: The user's role within the team
:type role: UserTeamRole, none_type, optional
"""
if provisioned_by is not unset:
kwargs["provisioned_by"] = provisioned_by
if provisioned_by_id is not unset:
kwargs["provisioned_by_id"] = provisioned_by_id
if role is not unset:
kwargs["role"] = role
super().__init__(kwargs)
16 changes: 15 additions & 1 deletion src/datadog_api_client/v2/model/user_team_relationships.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,43 @@


if TYPE_CHECKING:
from datadog_api_client.v2.model.relationship_to_user_team_team import RelationshipToUserTeamTeam
from datadog_api_client.v2.model.relationship_to_user_team_user import RelationshipToUserTeamUser


class UserTeamRelationships(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.relationship_to_user_team_team import RelationshipToUserTeamTeam
from datadog_api_client.v2.model.relationship_to_user_team_user import RelationshipToUserTeamUser

return {
"team": (RelationshipToUserTeamTeam,),
"user": (RelationshipToUserTeamUser,),
}

attribute_map = {
"team": "team",
"user": "user",
}

def __init__(self_, user: Union[RelationshipToUserTeamUser, UnsetType] = unset, **kwargs):
def __init__(
self_,
team: Union[RelationshipToUserTeamTeam, UnsetType] = unset,
user: Union[RelationshipToUserTeamUser, UnsetType] = unset,
**kwargs,
):
"""
Relationship between membership and a user
:param team: Relationship between team membership and team
:type team: RelationshipToUserTeamTeam, optional
:param user: Relationship between team membership and user
:type user: RelationshipToUserTeamUser, optional
"""
if team is not unset:
kwargs["team"] = team
if user is not unset:
kwargs["user"] = user
super().__init__(kwargs)
35 changes: 35 additions & 0 deletions src/datadog_api_client/v2/model/user_team_team_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# 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 (
ModelSimple,
cached_property,
)

from typing import ClassVar


class UserTeamTeamType(ModelSimple):
"""
User team team type
:param value: If omitted defaults to "team". Must be one of ["team"].
:type value: str
"""

allowed_values = {
"team",
}
TEAM: ClassVar["UserTeamTeamType"]

@cached_property
def openapi_types(_):
return {
"value": (str,),
}


UserTeamTeamType.TEAM = UserTeamTeamType("team")
Loading

0 comments on commit 02e9d15

Please sign in to comment.