Skip to content

Commit

Permalink
RUM Applications Management API add client_token (#1243)
Browse files Browse the repository at this point in the history
Co-authored-by: ci.datadog-api-spec <packages@datadoghq.com>
Co-authored-by: api-clients-generation-pipeline[bot] <54105614+api-clients-generation-pipeline[bot]@users.noreply.github.com>
  • Loading branch information
api-clients-generation-pipeline[bot] and ci.datadog-api-spec committed Dec 6, 2022
1 parent 9df27c1 commit 77e6830
Show file tree
Hide file tree
Showing 25 changed files with 359 additions and 45 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.4",
"regenerated": "2022-11-30 16:38:27.467657",
"spec_repo_commit": "0035b416"
"regenerated": "2022-12-05 18:23:44.363298",
"spec_repo_commit": "1cc231e1"
},
"v2": {
"apigentools_version": "1.6.4",
"regenerated": "2022-11-30 16:38:27.608166",
"spec_repo_commit": "0035b416"
"regenerated": "2022-12-05 18:23:44.375782",
"spec_repo_commit": "1cc231e1"
}
}
}
91 changes: 88 additions & 3 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6913,6 +6913,10 @@ components:
description: ID of the RUM application.
example: abcd1234-0000-0000-abcd-1234abcd5678
type: string
client_token:
description: Client token of the RUM application.
example: abcd1234efgh5678ijkl90abcd1234efgh0
type: string
created_at:
description: Timestamp in ms of the creation date.
example: 1659479836169
Expand All @@ -6923,9 +6927,12 @@ components:
example: john.doe
type: string
hash:
description: Client token of the RUM application.
example: abcd1234efgh5678ijkl90abcd1234efgh0
description: Hash of the RUM application. Optional.
type: string
is_active:
description: Indicates if the RUM application is active.
example: true
type: boolean
name:
description: Name of the RUM application.
example: my_rum_application
Expand All @@ -6952,6 +6959,7 @@ components:
type: string
required:
- application_id
- client_token
- created_at
- created_by_handle
- name
Expand Down Expand Up @@ -7003,6 +7011,83 @@ components:
type: string
x-enum-varnames:
- RUM_APPLICATION_CREATE
RUMApplicationList:
description: RUM application list.
properties:
attributes:
$ref: '#/components/schemas/RUMApplicationListAttributes'
type:
$ref: '#/components/schemas/RUMApplicationListType'
required:
- attributes
- type
type: object
RUMApplicationListAttributes:
description: RUM application list attributes.
properties:
application_id:
description: ID of the RUM application.
example: abcd1234-0000-0000-abcd-1234abcd5678
type: string
created_at:
description: Timestamp in ms of the creation date.
example: 1659479836169
format: int64
type: integer
created_by_handle:
description: Handle of the creator user.
example: john.doe
type: string
hash:
description: Hash of the RUM application. Optional.
type: string
is_active:
description: Indicates if the RUM application is active.
example: true
type: boolean
name:
description: Name of the RUM application.
example: my_rum_application
type: string
org_id:
description: Org ID of the RUM application.
example: 999
format: int32
maximum: 2147483647
type: integer
type:
description: Type of the RUM application. Supported values are `browser`,
`ios`, `android`, `react-native`, `flutter`.
example: browser
type: string
updated_at:
description: Timestamp in ms of the last update date.
example: 1659479836169
format: int64
type: integer
updated_by_handle:
description: Handle of the updater user.
example: jane.doe
type: string
required:
- application_id
- created_at
- created_by_handle
- name
- org_id
- type
- updated_at
- updated_by_handle
type: object
RUMApplicationListType:
default: rum_application
description: RUM application list type.
enum:
- rum_application
example: rum_application
type: string
x-enum-varnames:
- RUM_APPLICATION
RUMApplicationResponse:
description: RUM application response.
properties:
Expand Down Expand Up @@ -7069,7 +7154,7 @@ components:
data:
description: RUM applications array response.
items:
$ref: '#/components/schemas/RUMApplication'
$ref: '#/components/schemas/RUMApplicationList'
type: array
type: object
RUMBucketResponse:
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 @@ -3389,6 +3389,27 @@ rum\_application\_create\_type
:members:
:show-inheritance:

rum\_application\_list
----------------------

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

rum\_application\_list\_attributes
----------------------------------

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

rum\_application\_list\_type
----------------------------

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

rum\_application\_response
--------------------------

Expand Down
17 changes: 16 additions & 1 deletion src/datadog_api_client/v2/model/rum_application_attributes.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,11 @@ class RUMApplicationAttributes(ModelNormal):
def openapi_types(_):
return {
"application_id": (str,),
"client_token": (str,),
"created_at": (int,),
"created_by_handle": (str,),
"hash": (str,),
"is_active": (bool,),
"name": (str,),
"org_id": (int,),
"type": (str,),
Expand All @@ -36,9 +38,11 @@ def openapi_types(_):

attribute_map = {
"application_id": "application_id",
"client_token": "client_token",
"created_at": "created_at",
"created_by_handle": "created_by_handle",
"hash": "hash",
"is_active": "is_active",
"name": "name",
"org_id": "org_id",
"type": "type",
Expand All @@ -49,6 +53,7 @@ def openapi_types(_):
def __init__(
self_,
application_id: str,
client_token: str,
created_at: int,
created_by_handle: str,
name: str,
Expand All @@ -57,6 +62,7 @@ def __init__(
updated_at: int,
updated_by_handle: str,
hash: Union[str, UnsetType] = unset,
is_active: Union[bool, UnsetType] = unset,
**kwargs,
):
"""
Expand All @@ -65,15 +71,21 @@ def __init__(
:param application_id: ID of the RUM application.
:type application_id: str
:param client_token: Client token of the RUM application.
:type client_token: str
:param created_at: Timestamp in ms of the creation date.
:type created_at: int
:param created_by_handle: Handle of the creator user.
:type created_by_handle: str
:param hash: Client token of the RUM application.
:param hash: Hash of the RUM application. Optional.
:type hash: str, optional
:param is_active: Indicates if the RUM application is active.
:type is_active: bool, optional
:param name: Name of the RUM application.
:type name: str
Expand All @@ -91,9 +103,12 @@ def __init__(
"""
if hash is not unset:
kwargs["hash"] = hash
if is_active is not unset:
kwargs["is_active"] = is_active
super().__init__(kwargs)

self_.application_id = application_id
self_.client_token = client_token
self_.created_at = created_at
self_.created_by_handle = created_by_handle
self_.name = name
Expand Down
48 changes: 48 additions & 0 deletions src/datadog_api_client/v2/model/rum_application_list.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
# 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.rum_application_list_attributes import RUMApplicationListAttributes
from datadog_api_client.v2.model.rum_application_list_type import RUMApplicationListType


class RUMApplicationList(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.rum_application_list_attributes import RUMApplicationListAttributes
from datadog_api_client.v2.model.rum_application_list_type import RUMApplicationListType

return {
"attributes": (RUMApplicationListAttributes,),
"type": (RUMApplicationListType,),
}

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

def __init__(self_, attributes: RUMApplicationListAttributes, type: RUMApplicationListType, **kwargs):
"""
RUM application list.
:param attributes: RUM application list attributes.
:type attributes: RUMApplicationListAttributes
:param type: RUM application list type.
:type type: RUMApplicationListType
"""
super().__init__(kwargs)

self_.attributes = attributes
self_.type = type
Loading

0 comments on commit 77e6830

Please sign in to comment.