Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
111 changes: 107 additions & 4 deletions .generator/schemas/v2/openapi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11227,6 +11227,62 @@ components:
required:
- type
type: object
ConfiguredScheduleTarget:
description: Represents a configured schedule target with a specific position
(previous, current, or next).
properties:
attributes:
$ref: '#/components/schemas/ConfiguredScheduleTargetAttributes'
id:
description: Specifies the unique identifier of the configured schedule
target.
example: 00000000-aba1-0000-0000-000000000000_previous
type: string
relationships:
$ref: '#/components/schemas/ConfiguredScheduleTargetRelationships'
type:
$ref: '#/components/schemas/ConfiguredScheduleTargetType'
required:
- type
- id
- attributes
- relationships
type: object
ConfiguredScheduleTargetAttributes:
description: Attributes for a configured schedule target, including position.
example:
position: previous
properties:
position:
$ref: '#/components/schemas/ScheduleTargetPosition'
required:
- position
type: object
ConfiguredScheduleTargetRelationships:
description: Represents the relationships of a configured schedule target.
properties:
schedule:
$ref: '#/components/schemas/ConfiguredScheduleTargetRelationshipsSchedule'
required:
- schedule
type: object
ConfiguredScheduleTargetRelationshipsSchedule:
description: Holds the schedule reference for a configured schedule target.
properties:
data:
$ref: '#/components/schemas/ScheduleTarget'
required:
- data
type: object
ConfiguredScheduleTargetType:
default: schedule_target
description: Indicates that the resource is of type `schedule_target`.
enum:
- schedule_target
example: schedule_target
type: string
x-enum-varnames:
- SCHEDULE_TARGET
ConfluentAccountCreateRequest:
description: Payload schema when adding a Confluent account.
properties:
Expand Down Expand Up @@ -19014,6 +19070,7 @@ components:
name:
description: Specifies the name for the new escalation policy.
example: On-Call Escalation Policy
minLength: 1
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand All @@ -19023,12 +19080,16 @@ components:
description: Specifies how many times the escalation sequence is retried
if there is no response.
format: int64
maximum: 10
minimum: 0
type: integer
steps:
description: A list of escalation steps, each defining assignment, escalation
timeout, and targets for the new policy.
items:
$ref: '#/components/schemas/EscalationPolicyCreateRequestDataAttributesStepsItems'
maxItems: 10
minItems: 1
type: array
required:
- name
Expand All @@ -19045,6 +19106,8 @@ components:
step.
example: 3600
format: int64
maximum: 36000
minimum: 60
type: integer
targets:
description: Specifies the collection of escalation targets for this step.
Expand Down Expand Up @@ -19096,6 +19159,7 @@ components:
name:
description: Specifies the name of the escalation policy.
example: On-Call Escalation Policy
minLength: 1
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand All @@ -19105,6 +19169,8 @@ components:
description: Specifies how many times the escalation sequence is retried
if there is no response.
format: int64
maximum: 10
minimum: 0
type: integer
required:
- name
Expand Down Expand Up @@ -19171,6 +19237,7 @@ components:
- $ref: '#/components/schemas/EscalationPolicyStep'
- $ref: '#/components/schemas/EscalationPolicyUser'
- $ref: '#/components/schemas/ScheduleData'
- $ref: '#/components/schemas/ConfiguredScheduleTarget'
EscalationPolicyStep:
description: Represents a single step in an escalation policy, including its
attributes, relationships, and resource type.
Expand Down Expand Up @@ -19218,15 +19285,29 @@ components:
type: object
EscalationPolicyStepTarget:
description: Defines a single escalation target within a step for an escalation
policy creation request. Contains `id` and `type`.
policy creation request. Contains `id`, `type`, and optional `config`.
properties:
config:
$ref: '#/components/schemas/EscalationPolicyStepTargetConfig'
id:
description: Specifies the unique identifier for this target.
example: 00000000-aba1-0000-0000-000000000000
type: string
type:
$ref: '#/components/schemas/EscalationPolicyStepTargetType'
type: object
EscalationPolicyStepTargetConfig:
description: Configuration for an escalation target, such as schedule position.
properties:
schedule:
$ref: '#/components/schemas/EscalationPolicyStepTargetConfigSchedule'
type: object
EscalationPolicyStepTargetConfigSchedule:
description: Schedule-specific configuration for an escalation target.
properties:
position:
$ref: '#/components/schemas/ScheduleTargetPosition'
type: object
EscalationPolicyStepTargetType:
description: Specifies the type of escalation target (example `users`, `schedules`,
or `teams`).
Expand Down Expand Up @@ -19307,6 +19388,7 @@ components:
name:
description: Specifies the name of the escalation policy.
example: On-Call Escalation Policy
minLength: 1
type: string
resolve_page_on_policy_end:
description: Indicates whether the page is automatically resolved when the
Expand All @@ -19316,12 +19398,16 @@ components:
description: Specifies how many times the escalation sequence is retried
if there is no response.
format: int64
maximum: 10
minimum: 0
type: integer
steps:
description: A list of escalation steps, each defining assignment, escalation
timeout, and targets.
items:
$ref: '#/components/schemas/EscalationPolicyUpdateRequestDataAttributesStepsItems'
maxItems: 10
minItems: 1
type: array
required:
- name
Expand All @@ -19339,6 +19425,8 @@ components:
step.
example: 3600
format: int64
maximum: 36000
minimum: 60
type: integer
id:
description: Specifies the unique identifier of this step.
Expand Down Expand Up @@ -19447,12 +19535,13 @@ components:
x-enum-varnames:
- USERS
EscalationTarget:
description: Represents an escalation target, which can be a team, user, or
schedule.
description: Represents an escalation target, which can be a team, user, schedule,
or configured schedule target.
oneOf:
- $ref: '#/components/schemas/TeamTarget'
- $ref: '#/components/schemas/UserTarget'
- $ref: '#/components/schemas/ScheduleTarget'
- $ref: '#/components/schemas/ConfiguredScheduleTarget'
EscalationTargets:
description: A list of escalation targets for a step
properties:
Expand Down Expand Up @@ -44917,7 +45006,8 @@ components:
type: object
ScheduleTarget:
description: Represents a schedule target for an escalation policy step, including
its ID and resource type.
its ID and resource type. This is a shortcut for a configured schedule target
with position set to 'current'.
properties:
id:
description: Specifies the unique identifier of the schedule resource.
Expand All @@ -44929,6 +45019,19 @@ components:
- type
- id
type: object
ScheduleTargetPosition:
description: Specifies the position of a schedule target (example `previous`,
`current`, or `next`).
enum:
- previous
- current
- next
example: previous
type: string
x-enum-varnames:
- PREVIOUS
- CURRENT
- NEXT
ScheduleTargetType:
default: schedules
description: Indicates that the resource is of type `schedules`.
Expand Down
56 changes: 56 additions & 0 deletions docs/datadog_api_client.v2.model.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4344,6 +4344,41 @@ datadog\_api\_client.v2.model.config\_cat\_sdk\_key\_update module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.configured\_schedule\_target module
-----------------------------------------------------------------

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

datadog\_api\_client.v2.model.configured\_schedule\_target\_attributes module
-----------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.configured\_schedule\_target\_relationships module
--------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.configured\_schedule\_target\_relationships\_schedule module
------------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.configured\_schedule\_target\_type module
-----------------------------------------------------------------------

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

datadog\_api\_client.v2.model.confluent\_account\_create\_request module
------------------------------------------------------------------------

Expand Down Expand Up @@ -7963,6 +7998,20 @@ datadog\_api\_client.v2.model.escalation\_policy\_step\_target module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_config module
-----------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_config\_schedule module
---------------------------------------------------------------------------------------

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

datadog\_api\_client.v2.model.escalation\_policy\_step\_target\_type module
---------------------------------------------------------------------------

Expand Down Expand Up @@ -19982,6 +20031,13 @@ datadog\_api\_client.v2.model.schedule\_target module
:members:
:show-inheritance:

datadog\_api\_client.v2.model.schedule\_target\_position module
---------------------------------------------------------------

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

datadog\_api\_client.v2.model.schedule\_target\_type module
-----------------------------------------------------------

Expand Down
73 changes: 73 additions & 0 deletions src/datadog_api_client/v2/model/configured_schedule_target.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
# 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.configured_schedule_target_attributes import ConfiguredScheduleTargetAttributes
from datadog_api_client.v2.model.configured_schedule_target_relationships import (
ConfiguredScheduleTargetRelationships,
)
from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType


class ConfiguredScheduleTarget(ModelNormal):
@cached_property
def openapi_types(_):
from datadog_api_client.v2.model.configured_schedule_target_attributes import ConfiguredScheduleTargetAttributes
from datadog_api_client.v2.model.configured_schedule_target_relationships import (
ConfiguredScheduleTargetRelationships,
)
from datadog_api_client.v2.model.configured_schedule_target_type import ConfiguredScheduleTargetType

return {
"attributes": (ConfiguredScheduleTargetAttributes,),
"id": (str,),
"relationships": (ConfiguredScheduleTargetRelationships,),
"type": (ConfiguredScheduleTargetType,),
}

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

def __init__(
self_,
attributes: ConfiguredScheduleTargetAttributes,
id: str,
relationships: ConfiguredScheduleTargetRelationships,
type: ConfiguredScheduleTargetType,
**kwargs,
):
"""
Represents a configured schedule target with a specific position (previous, current, or next).

:param attributes: Attributes for a configured schedule target, including position.
:type attributes: ConfiguredScheduleTargetAttributes

:param id: Specifies the unique identifier of the configured schedule target.
:type id: str

:param relationships: Represents the relationships of a configured schedule target.
:type relationships: ConfiguredScheduleTargetRelationships

:param type: Indicates that the resource is of type ``schedule_target``.
:type type: ConfiguredScheduleTargetType
"""
super().__init__(kwargs)

self_.attributes = attributes
self_.id = id
self_.relationships = relationships
self_.type = type
Loading