Skip to content

Commit

Permalink
Regenerate client from commit 837921b8 of spec repo
Browse files Browse the repository at this point in the history
  • Loading branch information
ci.datadog-api-spec committed Jun 6, 2024
1 parent 29cfc00 commit ead33b4
Show file tree
Hide file tree
Showing 6 changed files with 77 additions and 4 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": "2024-06-05 15:00:50.301173",
"spec_repo_commit": "8e7244ae"
"regenerated": "2024-06-06 18:35:51.916734",
"spec_repo_commit": "837921b8"
},
"v2": {
"apigentools_version": "1.6.6",
"regenerated": "2024-06-05 15:00:50.318168",
"spec_repo_commit": "8e7244ae"
"regenerated": "2024-06-06 18:35:51.934015",
"spec_repo_commit": "837921b8"
}
}
}
14 changes: 14 additions & 0 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -1376,6 +1376,15 @@ components:
team:
$ref: '#/components/schemas/RelationshipToTeam'
type: object
AuthNMappingResourceType:
description: The type of resource being mapped to.
enum:
- role
- team
type: string
x-enum-varnames:
- ROLE
- TEAM
AuthNMappingResponse:
description: AuthN Mapping response from the API.
properties:
Expand Down Expand Up @@ -24104,6 +24113,11 @@ paths:
required: false
schema:
type: string
- description: Filter by mapping resource type. Defaults to "role" if not specified.
in: query
name: resource_type
schema:
$ref: '#/components/schemas/AuthNMappingResourceType'
responses:
'200':
content:
Expand Down
7 changes: 7 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -400,6 +400,13 @@ authn\_mapping\_relationships
:members:
:show-inheritance:

authn\_mapping\_resource\_type
------------------------------

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

authn\_mapping\_response
------------------------

Expand Down
12 changes: 12 additions & 0 deletions src/datadog_api_client/v2/api/authn_mappings_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
)
from datadog_api_client.v2.model.authn_mappings_response import AuthNMappingsResponse
from datadog_api_client.v2.model.authn_mappings_sort import AuthNMappingsSort
from datadog_api_client.v2.model.authn_mapping_resource_type import AuthNMappingResourceType
from datadog_api_client.v2.model.authn_mapping_response import AuthNMappingResponse
from datadog_api_client.v2.model.authn_mapping_create_request import AuthNMappingCreateRequest
from datadog_api_client.v2.model.authn_mapping_update_request import AuthNMappingUpdateRequest
Expand Down Expand Up @@ -126,6 +127,11 @@ def __init__(self, api_client=None):
"attribute": "filter",
"location": "query",
},
"resource_type": {
"openapi_types": (AuthNMappingResourceType,),
"attribute": "resource_type",
"location": "query",
},
},
headers_map={
"accept": ["application/json"],
Expand Down Expand Up @@ -216,6 +222,7 @@ def list_authn_mappings(
page_number: Union[int, UnsetType] = unset,
sort: Union[AuthNMappingsSort, UnsetType] = unset,
filter: Union[str, UnsetType] = unset,
resource_type: Union[AuthNMappingResourceType, UnsetType] = unset,
) -> AuthNMappingsResponse:
"""List all AuthN Mappings.
Expand All @@ -229,6 +236,8 @@ def list_authn_mappings(
:type sort: AuthNMappingsSort, optional
:param filter: Filter all mappings by the given string.
:type filter: str, optional
:param resource_type: Filter by mapping resource type. Defaults to "role" if not specified.
:type resource_type: AuthNMappingResourceType, optional
:rtype: AuthNMappingsResponse
"""
kwargs: Dict[str, Any] = {}
Expand All @@ -244,6 +253,9 @@ def list_authn_mappings(
if filter is not unset:
kwargs["filter"] = filter

if resource_type is not unset:
kwargs["resource_type"] = resource_type

return self._list_authn_mappings_endpoint.call_with_http_info(**kwargs)

def update_authn_mapping(
Expand Down
38 changes: 38 additions & 0 deletions src/datadog_api_client/v2/model/authn_mapping_resource_type.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# 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 AuthNMappingResourceType(ModelSimple):
"""
The type of resource being mapped to.
:param value: Must be one of ["role", "team"].
:type value: str
"""

allowed_values = {
"role",
"team",
}
ROLE: ClassVar["AuthNMappingResourceType"]
TEAM: ClassVar["AuthNMappingResourceType"]

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


AuthNMappingResourceType.ROLE = AuthNMappingResourceType("role")
AuthNMappingResourceType.TEAM = AuthNMappingResourceType("team")
2 changes: 2 additions & 0 deletions src/datadog_api_client/v2/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@
from datadog_api_client.v2.model.authn_mapping_relationship_to_role import AuthNMappingRelationshipToRole
from datadog_api_client.v2.model.authn_mapping_relationship_to_team import AuthNMappingRelationshipToTeam
from datadog_api_client.v2.model.authn_mapping_relationships import AuthNMappingRelationships
from datadog_api_client.v2.model.authn_mapping_resource_type import AuthNMappingResourceType
from datadog_api_client.v2.model.authn_mapping_response import AuthNMappingResponse
from datadog_api_client.v2.model.authn_mapping_team import AuthNMappingTeam
from datadog_api_client.v2.model.authn_mapping_team_attributes import AuthNMappingTeamAttributes
Expand Down Expand Up @@ -1870,6 +1871,7 @@
"AuthNMappingRelationshipToRole",
"AuthNMappingRelationshipToTeam",
"AuthNMappingRelationships",
"AuthNMappingResourceType",
"AuthNMappingResponse",
"AuthNMappingTeam",
"AuthNMappingTeamAttributes",
Expand Down

0 comments on commit ead33b4

Please sign in to comment.