From faf3a5fa84460d2a5e602e32bc5f87d7366484e9 Mon Sep 17 00:00:00 2001 From: "ci.datadog-api-spec" Date: Mon, 30 Sep 2024 16:07:57 +0000 Subject: [PATCH] Regenerate client from commit 3c5d6057 of spec repo --- .apigentools-info | 8 +- .generator/schemas/v2/openapi.yaml | 131 +++++++++++++----- examples/v2/teams/CreateTeamMembership.ts | 6 - features/v2/teams.feature | 4 +- packages/datadog-api-client-v2/index.ts | 8 +- ...ipToUserTeamTeam.ts => AbbreviatedTeam.ts} | 36 +++-- .../models/AbbreviatedTeamAttributes.ts | 103 ++++++++++++++ ...TeamTeamType.ts => AbbreviatedTeamType.ts} | 4 +- .../models/ObjectSerializer.ts | 16 ++- .../models/UserTeamIncluded.ts | 6 +- .../models/UserTeamRelationships.ts | 9 -- ...pToUserTeamTeamData.ts => UserTeamUser.ts} | 28 ++-- .../models/UserTeamUserAttributes.ts | 92 ++++++++++++ 13 files changed, 363 insertions(+), 88 deletions(-) rename packages/datadog-api-client-v2/models/{RelationshipToUserTeamTeam.ts => AbbreviatedTeam.ts} (56%) create mode 100644 packages/datadog-api-client-v2/models/AbbreviatedTeamAttributes.ts rename packages/datadog-api-client-v2/models/{UserTeamTeamType.ts => AbbreviatedTeamType.ts} (75%) rename packages/datadog-api-client-v2/models/{RelationshipToUserTeamTeamData.ts => UserTeamUser.ts} (65%) create mode 100644 packages/datadog-api-client-v2/models/UserTeamUserAttributes.ts diff --git a/.apigentools-info b/.apigentools-info index 5d7009da57a..4ffff7f3508 100644 --- a/.apigentools-info +++ b/.apigentools-info @@ -4,13 +4,13 @@ "spec_versions": { "v1": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-30 14:37:34.279249", - "spec_repo_commit": "60bc9127" + "regenerated": "2024-09-30 16:06:30.601951", + "spec_repo_commit": "3c5d6057" }, "v2": { "apigentools_version": "1.6.6", - "regenerated": "2024-09-30 14:37:34.293454", - "spec_repo_commit": "60bc9127" + "regenerated": "2024-09-30 16:06:30.616101", + "spec_repo_commit": "3c5d6057" } } } \ No newline at end of file diff --git a/.generator/schemas/v2/openapi.yaml b/.generator/schemas/v2/openapi.yaml index fc61f2c6e41..62c04555706 100644 --- a/.generator/schemas/v2/openapi.yaml +++ b/.generator/schemas/v2/openapi.yaml @@ -950,6 +950,64 @@ components: $ref: '#/components/schemas/AWSRelatedAccount' type: array type: object + AbbreviatedTeam: + description: The definition of `AbbreviatedTeam` object. + properties: + attributes: + $ref: '#/components/schemas/AbbreviatedTeamAttributes' + id: + description: ID of the team + type: string + type: + $ref: '#/components/schemas/AbbreviatedTeamType' + required: + - attributes + - type + type: object + AbbreviatedTeamAttributes: + description: The definition of `AbbreviatedTeamAttributes` object. + properties: + avatar: + description: Unicode representation of the avatar for the team, limited + to a single grapheme + nullable: true + type: string + banner: + description: Banner selection for the team + format: int64 + type: integer + handle: + description: The team's identifier + example: '' + type: string + handles: + description: The `AbbreviatedTeamAttributes` `handles`. + type: string + is_open_membership: + description: The `AbbreviatedTeamAttributes` `is_open_membership`. + readOnly: true + type: boolean + name: + description: The name of the team + example: '' + type: string + summary: + description: A brief summary of the team + readOnly: true + type: string + required: + - handle + - name + type: object + AbbreviatedTeamType: + default: team + description: The definition of `AbbreviatedTeamType` object. + enum: + - team + example: team + type: string + x-enum-varnames: + - TEAM ActiveBillingDimensionsAttributes: description: List of active billing dimensions. properties: @@ -17812,27 +17870,6 @@ 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: @@ -24823,8 +24860,8 @@ components: UserTeamIncluded: description: Included resources related to the team membership oneOf: - - $ref: '#/components/schemas/User' - - $ref: '#/components/schemas/Team' + - $ref: '#/components/schemas/AbbreviatedTeam' + - $ref: '#/components/schemas/UserTeamUser' UserTeamPermission: description: A user's permissions for a given team properties: @@ -24861,8 +24898,6 @@ components: UserTeamRelationships: description: Relationship between membership and a user properties: - team: - $ref: '#/components/schemas/RelationshipToUserTeamTeam' user: $ref: '#/components/schemas/RelationshipToUserTeamUser' type: object @@ -24893,15 +24928,6 @@ 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 @@ -24929,6 +24955,42 @@ components: required: - data type: object + UserTeamUser: + description: The definition of `UserTeamUser` object. + properties: + attributes: + $ref: '#/components/schemas/UserTeamUserAttributes' + id: + description: The `UserTeamUser` ID. + type: string + type: + $ref: '#/components/schemas/UserTeamUserType' + required: + - type + type: object + UserTeamUserAttributes: + description: The definition of `UserTeamUserAttributes` object. + properties: + disabled: + description: The `UserTeamUserAttributes` `disabled`. + type: boolean + email: + description: The `UserTeamUserAttributes` `email`. + type: string + handle: + description: The `UserTeamUserAttributes` `handle`. + type: string + icon: + description: The `UserTeamUserAttributes` `icon`. + type: string + name: + description: The `UserTeamUserAttributes` `name`. + nullable: true + type: string + service_account: + description: The `UserTeamUserAttributes` `service_account`. + type: boolean + type: object UserTeamUserType: default: users description: User team user type @@ -38900,6 +38962,7 @@ paths: name: filter[keyword] required: false schema: + description: Search query, can be user email or name. type: string responses: '200': diff --git a/examples/v2/teams/CreateTeamMembership.ts b/examples/v2/teams/CreateTeamMembership.ts index 6bf9fb48d12..42091b6fb4f 100644 --- a/examples/v2/teams/CreateTeamMembership.ts +++ b/examples/v2/teams/CreateTeamMembership.ts @@ -14,12 +14,6 @@ const params: v2.TeamsApiCreateTeamMembershipRequest = { role: "admin", }, relationships: { - team: { - data: { - id: "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", - type: "team", - }, - }, user: { data: { id: "b8626d7e-cedd-11eb-abf5-da7ad0900001", diff --git a/features/v2/teams.feature b/features/v2/teams.feature index 5d4069034c9..e60c4d8f4e9 100644 --- a/features/v2/teams.feature +++ b/features/v2/teams.feature @@ -13,7 +13,7 @@ Feature: Teams Scenario: Add a user to a team returns "API error response." response Given new "CreateTeamMembership" request And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} + And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} When the request is sent Then the response status is 409 API error response. @@ -21,7 +21,7 @@ Feature: Teams Scenario: Add a user to a team returns "Represents a user's association to a team" response Given new "CreateTeamMembership" request And request contains "team_id" parameter from "REPLACE.ME" - And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"team": {"data": {"id": "d7e15d9d-d346-43da-81d8-3d9e71d9a5e9", "type": "team"}}, "user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} + And body with value {"data": {"attributes": {"role": "admin"}, "relationships": {"user": {"data": {"id": "b8626d7e-cedd-11eb-abf5-da7ad0900001", "type": "users"}}}, "type": "team_memberships"}} When the request is sent Then the response status is 200 Represents a user's association to a team diff --git a/packages/datadog-api-client-v2/index.ts b/packages/datadog-api-client-v2/index.ts index 16a6ad73428..f6314c936f0 100644 --- a/packages/datadog-api-client-v2/index.ts +++ b/packages/datadog-api-client-v2/index.ts @@ -535,6 +535,9 @@ export { WorkflowAutomationApi, } from "./apis/WorkflowAutomationApi"; +export { AbbreviatedTeam } from "./models/AbbreviatedTeam"; +export { AbbreviatedTeamAttributes } from "./models/AbbreviatedTeamAttributes"; +export { AbbreviatedTeamType } from "./models/AbbreviatedTeamType"; export { ActiveBillingDimensionsAttributes } from "./models/ActiveBillingDimensionsAttributes"; export { ActiveBillingDimensionsBody } from "./models/ActiveBillingDimensionsBody"; export { ActiveBillingDimensionsResponse } from "./models/ActiveBillingDimensionsResponse"; @@ -1598,8 +1601,6 @@ export { RelationshipToUserData } from "./models/RelationshipToUserData"; export { RelationshipToUsers } from "./models/RelationshipToUsers"; export { RelationshipToUserTeamPermission } from "./models/RelationshipToUserTeamPermission"; export { RelationshipToUserTeamPermissionData } from "./models/RelationshipToUserTeamPermissionData"; -export { RelationshipToUserTeamTeam } from "./models/RelationshipToUserTeamTeam"; -export { RelationshipToUserTeamTeamData } from "./models/RelationshipToUserTeamTeamData"; export { RelationshipToUserTeamUser } from "./models/RelationshipToUserTeamUser"; export { RelationshipToUserTeamUserData } from "./models/RelationshipToUserTeamUserData"; export { RelationType } from "./models/RelationType"; @@ -2108,10 +2109,11 @@ export { UserTeamRequest } from "./models/UserTeamRequest"; export { UserTeamResponse } from "./models/UserTeamResponse"; export { UserTeamRole } from "./models/UserTeamRole"; export { UserTeamsResponse } from "./models/UserTeamsResponse"; -export { UserTeamTeamType } from "./models/UserTeamTeamType"; export { UserTeamType } from "./models/UserTeamType"; export { UserTeamUpdate } from "./models/UserTeamUpdate"; export { UserTeamUpdateRequest } from "./models/UserTeamUpdateRequest"; +export { UserTeamUser } from "./models/UserTeamUser"; +export { UserTeamUserAttributes } from "./models/UserTeamUserAttributes"; export { UserTeamUserType } from "./models/UserTeamUserType"; export { UserUpdateAttributes } from "./models/UserUpdateAttributes"; export { UserUpdateData } from "./models/UserUpdateData"; diff --git a/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.ts b/packages/datadog-api-client-v2/models/AbbreviatedTeam.ts similarity index 56% rename from packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.ts rename to packages/datadog-api-client-v2/models/AbbreviatedTeam.ts index eabd85ec304..6e14ca42e3e 100644 --- a/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeam.ts +++ b/packages/datadog-api-client-v2/models/AbbreviatedTeam.ts @@ -3,18 +3,27 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { RelationshipToUserTeamTeamData } from "./RelationshipToUserTeamTeamData"; +import { AbbreviatedTeamAttributes } from "./AbbreviatedTeamAttributes"; +import { AbbreviatedTeamType } from "./AbbreviatedTeamType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * Relationship between team membership and team + * The definition of `AbbreviatedTeam` object. */ -export class RelationshipToUserTeamTeam { +export class AbbreviatedTeam { /** - * The team associated with the membership + * The definition of `AbbreviatedTeamAttributes` object. */ - "data": RelationshipToUserTeamTeamData; + "attributes": AbbreviatedTeamAttributes; + /** + * ID of the team + */ + "id"?: string; + /** + * The definition of `AbbreviatedTeamType` object. + */ + "type": AbbreviatedTeamType; /** * A container for additional, undeclared properties. @@ -32,9 +41,18 @@ export class RelationshipToUserTeamTeam { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - data: { - baseName: "data", - type: "RelationshipToUserTeamTeamData", + attributes: { + baseName: "attributes", + type: "AbbreviatedTeamAttributes", + required: true, + }, + id: { + baseName: "id", + type: "string", + }, + type: { + baseName: "type", + type: "AbbreviatedTeamType", required: true, }, additionalProperties: { @@ -47,7 +65,7 @@ export class RelationshipToUserTeamTeam { * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return RelationshipToUserTeamTeam.attributeTypeMap; + return AbbreviatedTeam.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/AbbreviatedTeamAttributes.ts b/packages/datadog-api-client-v2/models/AbbreviatedTeamAttributes.ts new file mode 100644 index 00000000000..86617b652e8 --- /dev/null +++ b/packages/datadog-api-client-v2/models/AbbreviatedTeamAttributes.ts @@ -0,0 +1,103 @@ +/** + * 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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `AbbreviatedTeamAttributes` object. + */ +export class AbbreviatedTeamAttributes { + /** + * Unicode representation of the avatar for the team, limited to a single grapheme + */ + "avatar"?: string; + /** + * Banner selection for the team + */ + "banner"?: number; + /** + * The team's identifier + */ + "handle": string; + /** + * The `AbbreviatedTeamAttributes` `handles`. + */ + "handles"?: string; + /** + * The `AbbreviatedTeamAttributes` `is_open_membership`. + */ + "isOpenMembership"?: boolean; + /** + * The name of the team + */ + "name": string; + /** + * A brief summary of the team + */ + "summary"?: string; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + avatar: { + baseName: "avatar", + type: "string", + }, + banner: { + baseName: "banner", + type: "number", + format: "int64", + }, + handle: { + baseName: "handle", + type: "string", + required: true, + }, + handles: { + baseName: "handles", + type: "string", + }, + isOpenMembership: { + baseName: "is_open_membership", + type: "boolean", + }, + name: { + baseName: "name", + type: "string", + required: true, + }, + summary: { + baseName: "summary", + type: "string", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return AbbreviatedTeamAttributes.attributeTypeMap; + } + + public constructor() {} +} diff --git a/packages/datadog-api-client-v2/models/UserTeamTeamType.ts b/packages/datadog-api-client-v2/models/AbbreviatedTeamType.ts similarity index 75% rename from packages/datadog-api-client-v2/models/UserTeamTeamType.ts rename to packages/datadog-api-client-v2/models/AbbreviatedTeamType.ts index 8bbee460ae3..b6d15f730c8 100644 --- a/packages/datadog-api-client-v2/models/UserTeamTeamType.ts +++ b/packages/datadog-api-client-v2/models/AbbreviatedTeamType.ts @@ -7,8 +7,8 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; /** - * User team team type + * The definition of `AbbreviatedTeamType` object. */ -export type UserTeamTeamType = typeof TEAM | UnparsedObject; +export type AbbreviatedTeamType = typeof TEAM | UnparsedObject; export const TEAM = "team"; diff --git a/packages/datadog-api-client-v2/models/ObjectSerializer.ts b/packages/datadog-api-client-v2/models/ObjectSerializer.ts index 74e9155e2b7..c20d849f6fd 100644 --- a/packages/datadog-api-client-v2/models/ObjectSerializer.ts +++ b/packages/datadog-api-client-v2/models/ObjectSerializer.ts @@ -13,6 +13,8 @@ import { APIKeysResponseMetaPage } from "./APIKeysResponseMetaPage"; import { AWSRelatedAccount } from "./AWSRelatedAccount"; import { AWSRelatedAccountAttributes } from "./AWSRelatedAccountAttributes"; import { AWSRelatedAccountsResponse } from "./AWSRelatedAccountsResponse"; +import { AbbreviatedTeam } from "./AbbreviatedTeam"; +import { AbbreviatedTeamAttributes } from "./AbbreviatedTeamAttributes"; import { ActiveBillingDimensionsAttributes } from "./ActiveBillingDimensionsAttributes"; import { ActiveBillingDimensionsBody } from "./ActiveBillingDimensionsBody"; import { ActiveBillingDimensionsResponse } from "./ActiveBillingDimensionsResponse"; @@ -864,8 +866,6 @@ import { RelationshipToUser } from "./RelationshipToUser"; import { RelationshipToUserData } from "./RelationshipToUserData"; import { RelationshipToUserTeamPermission } from "./RelationshipToUserTeamPermission"; import { RelationshipToUserTeamPermissionData } from "./RelationshipToUserTeamPermissionData"; -import { RelationshipToUserTeamTeam } from "./RelationshipToUserTeamTeam"; -import { RelationshipToUserTeamTeamData } from "./RelationshipToUserTeamTeamData"; import { RelationshipToUserTeamUser } from "./RelationshipToUserTeamUser"; import { RelationshipToUserTeamUserData } from "./RelationshipToUserTeamUserData"; import { RelationshipToUsers } from "./RelationshipToUsers"; @@ -1215,6 +1215,8 @@ import { UserTeamRequest } from "./UserTeamRequest"; import { UserTeamResponse } from "./UserTeamResponse"; import { UserTeamUpdate } from "./UserTeamUpdate"; import { UserTeamUpdateRequest } from "./UserTeamUpdateRequest"; +import { UserTeamUser } from "./UserTeamUser"; +import { UserTeamUserAttributes } from "./UserTeamUserAttributes"; import { UserTeamsResponse } from "./UserTeamsResponse"; import { UserUpdateAttributes } from "./UserUpdateAttributes"; import { UserUpdateData } from "./UserUpdateData"; @@ -1274,6 +1276,7 @@ const enumsMap: { [key: string]: any[] } = { ], APIKeysType: ["api_keys"], AWSRelatedAccountType: ["aws_account"], + AbbreviatedTeamType: ["team"], ActiveBillingDimensionsType: ["billing_dimensions"], ApmRetentionFilterType: ["apm_retention_filter"], ApplicationKeysSort: [ @@ -1846,7 +1849,6 @@ const enumsMap: { [key: string]: any[] } = { UserResourceType: ["user"], UserTeamPermissionType: ["user_team_permissions"], UserTeamRole: ["admin"], - UserTeamTeamType: ["team"], UserTeamType: ["team_memberships"], UserTeamUserType: ["users"], UsersType: ["users"], @@ -1885,6 +1887,8 @@ const typeMap: { [index: string]: any } = { AWSRelatedAccount: AWSRelatedAccount, AWSRelatedAccountAttributes: AWSRelatedAccountAttributes, AWSRelatedAccountsResponse: AWSRelatedAccountsResponse, + AbbreviatedTeam: AbbreviatedTeam, + AbbreviatedTeamAttributes: AbbreviatedTeamAttributes, ActiveBillingDimensionsAttributes: ActiveBillingDimensionsAttributes, ActiveBillingDimensionsBody: ActiveBillingDimensionsBody, ActiveBillingDimensionsResponse: ActiveBillingDimensionsResponse, @@ -2814,8 +2818,6 @@ const typeMap: { [index: string]: any } = { RelationshipToUserData: RelationshipToUserData, RelationshipToUserTeamPermission: RelationshipToUserTeamPermission, RelationshipToUserTeamPermissionData: RelationshipToUserTeamPermissionData, - RelationshipToUserTeamTeam: RelationshipToUserTeamTeam, - RelationshipToUserTeamTeamData: RelationshipToUserTeamTeamData, RelationshipToUserTeamUser: RelationshipToUserTeamUser, RelationshipToUserTeamUserData: RelationshipToUserTeamUserData, RelationshipToUsers: RelationshipToUsers, @@ -3219,6 +3221,8 @@ const typeMap: { [index: string]: any } = { UserTeamResponse: UserTeamResponse, UserTeamUpdate: UserTeamUpdate, UserTeamUpdateRequest: UserTeamUpdateRequest, + UserTeamUser: UserTeamUser, + UserTeamUserAttributes: UserTeamUserAttributes, UserTeamsResponse: UserTeamsResponse, UserUpdateAttributes: UserUpdateAttributes, UserUpdateData: UserUpdateData, @@ -3443,7 +3447,7 @@ const oneOfMap: { [index: string]: string[] } = { UpsertCatalogEntityRequest: ["EntityV3", "string"], UpsertCatalogEntityResponseIncludedItem: ["EntityResponseIncludedSchema"], UserResponseIncludedItem: ["Organization", "Permission", "Role"], - UserTeamIncluded: ["User", "Team"], + UserTeamIncluded: ["AbbreviatedTeam", "UserTeamUser"], }; export class ObjectSerializer { diff --git a/packages/datadog-api-client-v2/models/UserTeamIncluded.ts b/packages/datadog-api-client-v2/models/UserTeamIncluded.ts index 1a6ea981314..34c2c5d7cce 100644 --- a/packages/datadog-api-client-v2/models/UserTeamIncluded.ts +++ b/packages/datadog-api-client-v2/models/UserTeamIncluded.ts @@ -3,8 +3,8 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { Team } from "./Team"; -import { User } from "./User"; +import { AbbreviatedTeam } from "./AbbreviatedTeam"; +import { UserTeamUser } from "./UserTeamUser"; import { UnparsedObject } from "../../datadog-api-client-common/util"; @@ -12,4 +12,4 @@ import { UnparsedObject } from "../../datadog-api-client-common/util"; * Included resources related to the team membership */ -export type UserTeamIncluded = User | Team | UnparsedObject; +export type UserTeamIncluded = AbbreviatedTeam | UserTeamUser | UnparsedObject; diff --git a/packages/datadog-api-client-v2/models/UserTeamRelationships.ts b/packages/datadog-api-client-v2/models/UserTeamRelationships.ts index 5d014557c1d..6711859d84e 100644 --- a/packages/datadog-api-client-v2/models/UserTeamRelationships.ts +++ b/packages/datadog-api-client-v2/models/UserTeamRelationships.ts @@ -3,7 +3,6 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { RelationshipToUserTeamTeam } from "./RelationshipToUserTeamTeam"; import { RelationshipToUserTeamUser } from "./RelationshipToUserTeamUser"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; @@ -12,10 +11,6 @@ import { AttributeTypeMap } from "../../datadog-api-client-common/util"; * Relationship between membership and a user */ export class UserTeamRelationships { - /** - * Relationship between team membership and team - */ - "team"?: RelationshipToUserTeamTeam; /** * Relationship between team membership and user */ @@ -37,10 +32,6 @@ export class UserTeamRelationships { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { - team: { - baseName: "team", - type: "RelationshipToUserTeamTeam", - }, user: { baseName: "user", type: "RelationshipToUserTeamUser", diff --git a/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.ts b/packages/datadog-api-client-v2/models/UserTeamUser.ts similarity index 65% rename from packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.ts rename to packages/datadog-api-client-v2/models/UserTeamUser.ts index 2bd60656d32..9767010ea50 100644 --- a/packages/datadog-api-client-v2/models/RelationshipToUserTeamTeamData.ts +++ b/packages/datadog-api-client-v2/models/UserTeamUser.ts @@ -3,22 +3,27 @@ * This product includes software developed at Datadog (https://www.datadoghq.com/). * Copyright 2020-Present Datadog, Inc. */ -import { UserTeamTeamType } from "./UserTeamTeamType"; +import { UserTeamUserAttributes } from "./UserTeamUserAttributes"; +import { UserTeamUserType } from "./UserTeamUserType"; import { AttributeTypeMap } from "../../datadog-api-client-common/util"; /** - * The team associated with the membership + * The definition of `UserTeamUser` object. */ -export class RelationshipToUserTeamTeamData { +export class UserTeamUser { /** - * The ID of the team associated with the membership + * The definition of `UserTeamUserAttributes` object. */ - "id": string; + "attributes"?: UserTeamUserAttributes; /** - * User team team type + * The `UserTeamUser` ID. */ - "type": UserTeamTeamType; + "id"?: string; + /** + * User team user type + */ + "type": UserTeamUserType; /** * A container for additional, undeclared properties. @@ -36,14 +41,17 @@ export class RelationshipToUserTeamTeamData { * @ignore */ static readonly attributeTypeMap: AttributeTypeMap = { + attributes: { + baseName: "attributes", + type: "UserTeamUserAttributes", + }, id: { baseName: "id", type: "string", - required: true, }, type: { baseName: "type", - type: "UserTeamTeamType", + type: "UserTeamUserType", required: true, }, additionalProperties: { @@ -56,7 +64,7 @@ export class RelationshipToUserTeamTeamData { * @ignore */ static getAttributeTypeMap(): AttributeTypeMap { - return RelationshipToUserTeamTeamData.attributeTypeMap; + return UserTeamUser.attributeTypeMap; } public constructor() {} diff --git a/packages/datadog-api-client-v2/models/UserTeamUserAttributes.ts b/packages/datadog-api-client-v2/models/UserTeamUserAttributes.ts new file mode 100644 index 00000000000..118f02507d5 --- /dev/null +++ b/packages/datadog-api-client-v2/models/UserTeamUserAttributes.ts @@ -0,0 +1,92 @@ +/** + * 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 2020-Present Datadog, Inc. + */ + +import { AttributeTypeMap } from "../../datadog-api-client-common/util"; + +/** + * The definition of `UserTeamUserAttributes` object. + */ +export class UserTeamUserAttributes { + /** + * The `UserTeamUserAttributes` `disabled`. + */ + "disabled"?: boolean; + /** + * The `UserTeamUserAttributes` `email`. + */ + "email"?: string; + /** + * The `UserTeamUserAttributes` `handle`. + */ + "handle"?: string; + /** + * The `UserTeamUserAttributes` `icon`. + */ + "icon"?: string; + /** + * The `UserTeamUserAttributes` `name`. + */ + "name"?: string; + /** + * The `UserTeamUserAttributes` `service_account`. + */ + "serviceAccount"?: boolean; + + /** + * A container for additional, undeclared properties. + * This is a holder for any undeclared properties as specified with + * the 'additionalProperties' keyword in the OAS document. + */ + "additionalProperties"?: { [key: string]: any }; + + /** + * @ignore + */ + "_unparsed"?: boolean; + + /** + * @ignore + */ + static readonly attributeTypeMap: AttributeTypeMap = { + disabled: { + baseName: "disabled", + type: "boolean", + }, + email: { + baseName: "email", + type: "string", + }, + handle: { + baseName: "handle", + type: "string", + }, + icon: { + baseName: "icon", + type: "string", + }, + name: { + baseName: "name", + type: "string", + }, + serviceAccount: { + baseName: "service_account", + type: "boolean", + }, + additionalProperties: { + baseName: "additionalProperties", + type: "any", + }, + }; + + /** + * @ignore + */ + static getAttributeTypeMap(): AttributeTypeMap { + return UserTeamUserAttributes.attributeTypeMap; + } + + public constructor() {} +}